Vimeo videos without 'www' now accepted by member
authorLaury GvR <laury@gaslightmedia.com>
Fri, 12 Jan 2018 21:37:16 +0000 (16:37 -0500)
committerLaury GvR <laury@gaslightmedia.com>
Fri, 12 Jan 2018 21:40:36 +0000 (16:40 -0500)
Vimeo videos now all have a pattern of https://vimeo.com/<video>
but the pattern it was checking against included a 'www.'. This
has now been fixed and vimeo videos can be properly included in
member profiles.

models/front/members/detail.php

index ea3d1e1..0a63333 100644 (file)
@@ -332,7 +332,7 @@ class GlmMembersFront_members_detail extends GlmDataMemberInfo
                 if (strpos($video_url, 'player') !== false) {
                     $memberData['video_embed'] = '<iframe width="100%" height="315" src="'.$video_url.'" frameborder="0" allowfullscreen></iframe>';
                 } else {
-                    $memberData['video_embed'] = preg_replace("/\s*[a-zA-Z\/\/:\.]*www.vimeo.com\/([a-zA-Z0-9\-_]+)([a-zA-Z0-9\/\*\-\_\?\&\;\%\=\.]*)/i","<iframe width=\"100%\" height=\"315\" src=\"//player.vimeo.com/video/$1\" frameborder=\"0\" allowfullscreen></iframe>",$video_url);
+                    $memberData['video_embed'] = preg_replace("/\s*[a-zA-Z\/\/:\.]*vimeo.com\/([a-zA-Z0-9\-_]+)([a-zA-Z0-9\/\*\-\_\?\&\;\%\=\.]*)/i","<iframe width=\"100%\" height=\"315\" src=\"//player.vimeo.com/video/$1\" frameborder=\"0\" allowfullscreen></iframe>",$video_url);
                 }
             } else {
                 $memberData['video_embed'] = "Could not find video";