Want to work with us? We're on the lookout for a Magento Developer.

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.