Want to work with us? We're on the lookout for digital experts.

We're hiring

Short youtube urls not working with prettyphoto

Web Bureau

03 November 2011 by Web Bureau

This is a simple solution to help over come issues with users entering the short url's for youtube videos, which isn't compatibile with many jquery libraries out there.

Basically this function detects wether the url entered is a short url and if so re-writes the url to the long version.

Public Function fun_FormatYouTubeUrl(ByVal Url As String) As String

        Dim value As String = String.Empty

            If InStr(Url, "", CompareMethod.Text) Then
                value = "" & Replace(Url, "", "")
                value = Url
            End If

        Catch ex As Exception

        End Try

        Return value

    End Function 

 No more problems with prettyphoto not working with youtube url's.


Grow your businessStart a project with us today.

This site uses essential cookies for parts of the site to operate and have already been set. Find out more about how we use cookies and how you may delete them. You may delete cookies, but parts of the site will not work.