Show error message if no member detail video found
authorLaury GvR <laury@gaslightmedia.com>
Tue, 19 Jul 2016 15:12:54 +0000 (11:12 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 19 Jul 2016 15:12:54 +0000 (11:12 -0400)
If a video is not found for a member, show a "video not found"
error on the member detail section instead of just the default
blank video box

models/front/members/detail.php

index 09fab02..0067157 100644 (file)
@@ -311,6 +311,8 @@ class GlmMembersFront_members_detail extends GlmDataMemberInfo
                 } 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);
                 }
+            } else {
+                $memberData['video_embed'] = "Could not find video";
             }
             
         }