Ejemplo n.º 1
0
 /**
  * ContusVideoShortcodeView constructor function
  */
 public function __construct()
 {
     parent::__construct();
     /** Get current video id 
      * and report send response  */
     $this->_vId = absint(filter_input(INPUT_GET, 'vid'));
     $this->_reportsent = filter_input(INPUT_POST, 'report_send');
     /** Get post type, page post type 
      * and  video more page id */
     $this->_post_type = filter_input(INPUT_GET, 'post_type');
     $this->_page_post_type = get_post_type(get_the_ID());
     $this->_mPageid = morePageID();
     /** Get plugin site URL, 
      * plugin images directory URL, 
      * upload directory URL 
      * and swf file URL   */
     $this->_site_url = get_site_url();
     $this->_imagePath = getImagesDirURL();
     $this->_uploadPath = getUploadDirURL();
     $this->_swfPath = APPTHA_VGALLERY_BASEURL . 'hdflvplayer' . DS . 'hdplayer.swf';
     /** Function to check
      * whether the SSL is enabled in site */
     $this->_protocolURL = getPluginProtocol();
     /** Object for home page controller */
     $this->_contOBJ = new ContusVideoController();
 }
Ejemplo n.º 2
0
 /**
  * ContusMoreView constructor starts
  */
 public function __construct()
 {
     parent::__construct();
     global $wp_query;
     /**
      * Call plugin helper function
      * to get plugin settings
      * and more page id 
      * for more pages
      */
     $this->_settingsData = getPluginSettings();
     $this->_player_colors = unserialize($this->_settingsData->player_colors);
     $this->_recent_video_order = $this->_player_colors['recentvideo_order'];
     $this->_mPageid = morePageID();
     /**
      * Get video id , playlist id,
      * page number and userid
      * from request URL
      */
     $this->_vId = absint(filter_input(INPUT_GET, 'vid'));
     $this->_pagenum = absint(filter_input(INPUT_GET, 'pagenum'));
     $this->_playid =& $wp_query->query_vars['playid'];
     $this->_userid =& $wp_query->query_vars['userid'];
     /** Get search keyword */
     $searchVal = str_replace(' ', '%20', __('Video Search ...', APPTHA_VGALLERY));
     if (!empty($wp_query->query_vars) && isset($wp_query->query_vars['video_search'])) {
         $video_search = $wp_query->query_vars['video_search'];
         if ($video_search !== $searchVal) {
             $video_search = $video_search;
         } else {
             $video_search = '';
         }
         /** Get serach value */
         $this->_video_search = stripslashes(urldecode($video_search));
     }
     /**
      * Get row, column for more
      * videos from settings
      */
     $this->_rowF = $this->_settingsData->rowMore;
     $this->_colF = $this->_settingsData->colMore;
     $this->_perMore = $this->_rowF * $this->_colF;
     /**
      * Get row, column for category 
      * videos from settings
      * and calculate total values
      */
     $this->_colCat = $this->_settingsData->colCat;
     $this->_rowCat = $this->_settingsData->rowCat;
     $this->_perCat = $this->_colCat * $this->_rowCat;
     /**
      * Get plugin images directory path
      * and upload path 
      * from plugin helper
      */
     $this->_imagePath = getImagesDirURL();
 }
Ejemplo n.º 3
0
                                    <th scope='row'><?php 
esc_attr_e('Logo Path', APPTHA_VGALLERY);
?>
</th> 
                                    <td> <input type='file' id="logopath" name="logopath" value="" size=40  /> 
                                        <input type='hidden' id="logopathvalue" name="logopathvalue" value="<?php 
echo $settingsGrid->logopath;
?>
" /> 
                                        <div class="videogallery_logo_cancel"> <span id="logoname" style="float: left;"><?php 
echo $settingsGrid->logopath;
?>
</span> 
                                            <span id="removepng"><?php 
if ($settingsGrid->logopath) {
    echo '<img src="' . getImagesDirURL() . 'cancel.png" onclick="removeLogo();" alt="removelogo" />';
}
?>
</span>
                                        </div>
                                    </td> 
                                </tr> 
                                <?php 
/** Display logo Target */
?>
                                <?php 
echo $gallerySeparatorDiv;
?>
  
                                <?php 
/** Display filed to get logo target */
Ejemplo n.º 4
0
 /**
  * Function is used to display palyer and video information
  *
  * @param array $arguments          
  * @return unknown number string
  */
 function hdflv_sharerender($arguments = array())
 {
     global $wpdb, $current_user;
     /** Variable initialization for ContusVideoDetailView */
     $output = $videourl = $imgurl = $vid = $playlistid = $homeplayerData = $rate = $no_views = $windo = $post_date = '';
     $video_playlist_id = $videoId = $hitcount = $show_posted_by = $show_added_on = $show_social_icon = $ratecount = $videodivId = 0;
     $fetched = array();
     /** Get random number to attach */
     $videodivId = rand();
     /** Check admin logged in */
     $isAdmin = absint(filter_input(INPUT_GET, 'admin'));
     /**  Query to get settings data from db */
     $configXML = getPluginSettings();
     /** Generate flashvars detail 
      * for player starts here */
     $flashvars = $pluginflashvars = 'baserefW=' . home_url();
     /**  Get width from settings */
     $width = $configXML->width;
     if (isset($arguments['width']) && !empty($arguments['width'])) {
         /** Get width from short code */
         $width = $arguments['width'];
     }
     /** Get height from settings */
     $height = $configXML->height;
     if (isset($arguments['height']) && !empty($arguments['height'])) {
         /** Get height from short code */
         $height = $arguments['height'];
     }
     /** Get playor colors, posted by, social icon, rss icon 
      * and related videos count from settings object */
     $player_color = unserialize($configXML->player_colors);
     $show_posted_by = $player_color['show_posted_by'];
     $show_social_icon = $player_color['show_social_icon'];
     $show_rss_icon = $player_color['show_rss_icon'];
     $number_related_video = get_related_video_count();
     /** If related video is not given in settings page,
      * then assign default value 100 */
     if (empty($number_related_video)) {
         $number_related_video = 100;
     }
     /** Get show added on option from settings*/
     if (isset($player_color['show_added_on'])) {
         $show_added_on = $player_color['show_added_on'];
     }
     /** Send report for video */
     if (isset($arguments['id'])) {
         /** Get video id from short code */
         $videodivId .= $arguments['id'];
         $vid = $arguments['id'];
     }
     if (!empty($vid)) {
         $wp_user = wp_get_current_user();
         $wp_user_id = $wp_user->ID;
         /** Call function to get video details  */
         $homeplayerData = $this->short_video_detail($vid, $number_related_video);
         $fetched[] = $homeplayerData;
     }
     /** Store video details in variables */
     if (!empty($homeplayerData)) {
         /** Get video detials from model */
         $videoUrl = $homeplayerData->file;
         $videoId = $homeplayerData->vid;
         $video_title = $homeplayerData->name;
         $video_slug = $homeplayerData->slug;
         $video_file_type = $homeplayerData->file_type;
         $video_playlist_id = $homeplayerData->playlist_id;
         $description = $homeplayerData->description;
         $tag_name = $homeplayerData->tags_name;
         $hitcount = $homeplayerData->hitcount;
         $uploadedby = $homeplayerData->display_name;
         $uploadedby_id = $homeplayerData->ID;
         $ratecount = $homeplayerData->ratecount;
         $rate = $homeplayerData->rate;
         $post_date = $homeplayerData->post_date;
         $video_thumb = getImagesValue($homeplayerData->image, $video_file_type, $homeplayerData->amazon_buckets, '');
     }
     /** Get playlist id from short code */
     if (isset($arguments['playlistid'])) {
         /** Get video id */
         $videodivId .= $arguments['playlistid'];
         /** Get playlist id */
         $playlistid = $arguments['playlistid'];
         /** Set flash vars */
         $flashvars .= '&amp;mtype=playerModule';
     }
     /** Check view is from admin */
     if (!empty($isAdmin)) {
         $flashvars .= '&amp;adminview=true';
     }
     /** Generate flashvars detail for player starts here */
     if (!empty($playlistid) && !empty($vid)) {
         $flashvars .= '&amp;pid=' . $playlistid . '&amp;vid=' . $vid;
     } elseif (!empty($playlistid)) {
         $flashvars .= '&amp;pid=' . $playlistid . '&showPlaylist=true';
         $playlist_videos = $this->_contOBJ->video_pid_detail($playlistid, 'detailpage', $number_related_video);
         /** Get video details based on the playlist id */
         if (!empty($playlist_videos)) {
             $videoId = $playlist_videos[0]->vid;
             $video_playlist_id = $playlist_videos[0]->playlist_id;
             $hitcount = $playlist_videos[0]->hitcount;
             $uploadedby = $playlist_videos[0]->display_name;
             $uploadedby_id = $playlist_videos[0]->ID;
             $ratecount = $playlist_videos[0]->ratecount;
             $rate = $playlist_videos[0]->rate;
             $fetched[] = $playlist_videos[0];
         }
     } else {
         if ($this->_post_type !== APPTHAVIDEOGALLERY && $this->_page_post_type !== APPTHAVIDEOGALLERY) {
             $flashvars .= '&amp;vid=' . $vid . '&showPlaylist=false';
         } else {
             $flashvars .= '&amp;vid=' . $vid;
         }
     }
     /** Set flashvars based on the short code arguments */
     if (isset($arguments['flashvars'])) {
         $flashvars .= '&amp;' . $arguments['flashvars'];
     }
     if (!isset($arguments['playlistid']) && isset($arguments['id']) && $this->_post_type !== APPTHAVIDEOGALLERY && $this->_page_post_type !== APPTHAVIDEOGALLERY) {
         $flashvars .= '&amp;playlist_autoplay=false&amp;playlist_auto=false';
     }
     /** Generate flashvars detail for player ends here */
     $player_not_support = __('Player doesnot support this video.', APPTHA_VGALLERY);
     $htmlplayer_not_support = __('Html5 Not support This video Format.', APPTHA_VGALLERY);
     $output .= ' <script> var videoPage;                      
               videoPage = "' . $this->_mPageid . '"; </script>';
     if (isset($arguments['title']) && $arguments['title'] == 'on') {
         $output .= '<h2 id="video_title' . $videodivId . '" class="videoplayer_title" ></h2>';
         $pluginflashvars .= $flashvars .= '&amp;videodata=current_video_' . $videodivId;
     }
     /** Player starts here */
     $output .= '<div id="mediaspace' . $videodivId . '" class="videoplayer">';
     $mobile = vgallery_detect_mobile();
     /** Embed player code */
     if (isset($fetched) && $fetched[0]->file_type == 5 && !empty($fetched[0]->embedcode)) {
         $playerembedcode = stripslashes($fetched[0]->embedcode);
         $playeriframewidth = str_replace('width=', 'width="' . $width . '"', $playerembedcode);
         if ($mobile) {
             $output .= $playerembedcode;
         } else {
             $output .= str_replace('height=', 'height="' . $height . '"', $playeriframewidth);
             watchedVideoHitCount($fetched[0]->vid, false);
         }
     } else {
         if ($mobile) {
             /** Check mobile device is detected */
             /** Get video detail for HTML5 player
              * Load video details */
             foreach ($fetched as $media) {
                 $videourl = $media->file;
                 $file_type = $media->file_type;
                 $imgurl = getImagesValue($media->image, $file_type, $media->amazon_buckets, '');
             }
             /** Check file type youtube, viddler,dailymotion */
             if ($file_type == 3 || $file_type == 1) {
                 if (strpos($videourl, 'youtube') > 0) {
                     $videoid = getYoutubeVideoID($videourl);
                     $output = '<div id="player"></div><script>var tag = document.createElement("script");tag.src = "https://www.youtube.com/iframe_api";var firstScriptTag = document.getElementsByTagName("script")[0];firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);var player;function onYouTubeIframeAPIReady() {player = new YT.Player("player", {width: "100%",videoId: "' . $videoid . '",playerVars: {"rel": 0,"showinfo":0,"modestbranding":0},events: {"onStateChange": onPlayerStateChange}});}var done = false;function onPlayerStateChange(event) {if (event.data == YT.PlayerState.PLAYING && !done) {currentVideoP(' . $videoId . ');done = true;}}</script>';
                     echo $output;
                     /** Generate youtube embed code for html5 player */
                 } else {
                     if (strpos($videourl, 'viddler') > 0) {
                         /** For viddler videos in URL method */
                         $imgstr = explode('/', $videourl);
                         $viddler_id = $imgstr[4];
                         $output = '<script type="text/javascript" src="//static.cdn-ec.viddler.com/js/arpeggio/v3/build/main-built.js"></script><div id="my-player"></div><script>var embed = new ViddlerEmbed({videoId: "' . $viddler_id . '",width: "100%",target: "#my-player"});var done = false;embed.manager.events.on("videoPlayer:play", function() {if (!done) {currentVideoP(' . $videoId . ');done = true;}});</script>';
                     } elseif (strpos($videourl, 'dailymotion') > 0) {
                         /** For dailymotion videos in URL method */
                         $split_id = getDailymotionVideoID($videourl);
                         $video = $videourl = $this->_protocolURL . 'www.dailymotion.com/embed/video/' . $split_id[0];
                         $output = '<script src="http://api.dmcdn.net/all.js"></script><div id="player"></div><script>var player = DM.player(document.getElementById("player"),{video: "' . $split_id[0] . '",width: "100%",params: {html: 0,wmode: "opaque"},events: {playing: function(){onPlayerStateChange();}}});var done = false;function onPlayerStateChange(){if (!done) {currentVideoP(' . $videoId . ');done = true;}}</script>';
                         echo $output;
                     } else {
                         $output .= '<video width="100%" height="' . $height . '" id="video" poster="' . $imgurl . '"   src="' . $videourl . '" autobuffer controls onerror="failed( event )">' . $htmlplayer_not_support . '</video>';
                     }
                 }
             } else {
                 /** For uploaded videos, get video URL */
                 $video_url = getVideosValue($videoFile, $file_type, $amazonBucket);
                 /** Check for RTMP videos */
                 if ($file_type == 4) {
                     $streamer = str_replace('rtmp://', 'http://', $media->streamer_path);
                     $video_url = $streamer . '_definst_/mp4:' . $videourl . '/playlist.m3u8';
                 }
                 /** Generate video code for html5 player */
                 $output .= '<video width="100%" height="' . $height . '" id="video" poster="' . $imgurl . '"   src="' . $video_url . '" autobuffer controls onerror="failed( event )">' . $htmlplayer_not_support . '</video>';
             }
         } else {
             $output .= '<div id="flashplayer"><embed src="' . $this->_swfPath . '" flashvars="' . $flashvars . '" width="' . $width . '" height="' . $height . '" allowfullscreen="true" allowscriptaccess="always" type="application/x-shockwave-flash" wmode="transparent"></div>';
             /** Google adsense code Start */
             if ($player_color['googleadsense_visible'] == 1 && !$mobile && ($this->_post_type === APPTHAVIDEOGALLERY || $this->_page_post_type === APPTHAVIDEOGALLERY)) {
                 if ($homeplayerData->google_adsense && $homeplayerData->google_adsense_value) {
                     $output .= '<div>';
                     /**
                      * Call function to dipaly google adsense on player
                      */
                     $output .= $this->displayGoogleAdsense($width, $vid, $homeplayerData->vid);
                 }
             }
         }
     }
     $output .= '</div>';
     /** End Google adsense End. */
     /** Get current user agent */
     $useragent = $_SERVER['HTTP_USER_AGENT'];
     if (strpos($useragent, 'Windows Phone') > 0) {
         /** Check for windows phone */
         $windo = 'Windows Phone';
     }
     /**  Check platform */
     /** Call script to display error message within player */
     $output .= '<script type="text/javascript">
         function current_video_' . $videodivId . '( video_id,d_title ){  
             if( d_title == undefined ) { 
               document.getElementById( "video_title' . $videodivId . '" ).innerHTML=""; 
             } else { 
               document.getElementById( "video_title' . $videodivId . '" ).innerHTML=""; 
               document.getElementById( "video_title' . $videodivId . '" ).innerHTML=d_title; 
             } 
         } var txt =  navigator.platform ; 
         var windo = "' . $windo . '"; 
         function failed( e ) { 
             if( txt =="iPod"|| txt =="iPad" || txt == "iPhone" || windo=="Windows Phone" || txt == "Linux armv7l" || txt == "Linux armv6l" ) { 
               alert( "' . $player_not_support . '" ); 
             } 
         } </script>';
     /** Player ends here
      * Display description, views, tags, playlist names detail under player */
     if (isset($arguments['views']) && $arguments['views'] == 'on') {
         $videogalleryviews = true;
     } else {
         if (($this->_post_type === APPTHAVIDEOGALLERY || $this->_page_post_type === APPTHAVIDEOGALLERY) && $configXML->view_visible == 1) {
             $videogalleryviews = true;
         } else {
             $videogalleryviews = false;
             $no_views = 'noviews';
         }
     }
     /** Call function to display view count, posted on details in video detail page   */
     $output .= $this->displayViewsPostedON($show_added_on, $videogalleryviews, $no_views, $post_date, $hitcount);
     /** Display user name under player */
     $output .= '<div class="clearfix"></div>';
     if ($this->_post_type === APPTHAVIDEOGALLERY || $this->_page_post_type === APPTHAVIDEOGALLERY) {
         $user_url = get_user_permalink($this->_mPageid, $uploadedby_id, $uploadedby);
         if ($show_posted_by) {
             $output .= '<div class="video-page-username"><strong>' . __('Posted&nbsp;by', APPTHA_VGALLERY) . '&nbsp;:&nbsp;</strong><a href="' . $user_url . '">' . $uploadedby . '</a></div>';
         }
         /** Display category name under player  */
         if ($configXML->categorydisplay == 1) {
             /** Category display function */
             $output .= $this->displayCategory($vid);
         }
     }
     /**  Rating starts here for video details page  */
     if ($this->_post_type === APPTHAVIDEOGALLERY || $this->_page_post_type === APPTHAVIDEOGALLERY) {
         /** Set ratings control if enabled for player */
         if ($configXML->ratingscontrol == 1) {
             $ratingscontrol = true;
         } else {
             $ratingscontrol = false;
         }
     } else {
         if (isset($arguments['ratingscontrol']) && $arguments['ratingscontrol'] == 'on') {
             $ratingscontrol = true;
         } else {
             $ratingscontrol = false;
         }
     }
     /** Show ratings star avg */
     if ($ratingscontrol) {
         $ratestar = getRatingValue($rate, $ratecount, 'calc');
         /** Display ratings under player */
         $output .= $this->displayRatings($ratestar, $ratecount, $videodivId, $vid, $videoId);
     }
     /** Rating ends here */
     $output .= '</div>';
     if ($this->_post_type === APPTHAVIDEOGALLERY || $this->_page_post_type === APPTHAVIDEOGALLERY) {
         /** Display tag info */
         if (!empty($tag_name) && $configXML->tagdisplay == 1) {
             $output .= '<div class="video-page-tag"><strong>' . __('Tags', APPTHA_VGALLERY) . '          </strong>: ' . $tag_name . ' ' . '</div>';
         }
         /** Check if video url is YouTube */
         if (strpos($videoUrl, 'youtube') > 0) {
             $video_thumb = $this->_protocolURL . 'img.youtube.com/vi/' . getYoutubeVideoID($videoUrl) . '/hqdefault.jpg';
         }
         /** Display description */
         if (!empty($description)) {
             $removequotedescription = str_replace('"', '', $description);
             $videodescription = str_replace("'", '', $removequotedescription);
         } else {
             $videodescription = get_bloginfo('name');
         }
         /** Check amazon s3 bucket is enabled */
         if ($fetched[0]->amazon_buckets == 1) {
             $video_thumb = '';
         }
         /** Load rss url link */
         $rs_url = $this->_site_url . '/wp-admin/admin-ajax.php?action=rss&type=video&vid=' . $vid;
         $rss_image = getImagesDirURL() . '/rss_icon.png';
         /** Show social icons below player */
         if ($show_social_icon) {
             /** Function to display social icons
              * and rss icon */
             $output .= $this->displaySocialIcons($configXML->keyApps, $videodescription, $video_thumb, $video_title);
             /** Show rss url link and image
              * Build rss icon div */
             if ($show_rss_icon) {
                 $output .= '<div class="floatleft rssfeed">&nbsp;&nbsp;<a href="' . $rs_url . '"><img src="' . $rss_image . '"></a></div>';
             }
             $output .= '</div>';
             $output .= '<div class="clearfix">';
         }
         $output .= '<div class="video-cat-thumb">';
         /** Show rss icon enable / disable  */
         if ($show_rss_icon && !$show_social_icon) {
             $rs_url = $this->_site_url . '/wp-admin/admin-ajax.php?action=rss&type=video&vid=' . $vid;
             $rss_image = getImagesDirURL() . '/rss_icon.png';
             $output .= '<div class="video-socialshare"><div class="floatleft rssfeed">&nbsp;&nbsp;<a href="' . $rs_url . '"><img src="' . $rss_image . '"></a></div></div>';
         }
         /** Show or hide embed /iframe/report video option code for video detail page..  */
         if ($configXML->embed_visible == 1) {
             $output .= '<a href="javascript:void( 0 )" onclick="enableEmbed();" class="embed" id="allowEmbed"><span class="embed_text">' . __('Embed&nbsp;Code', APPTHA_VGALLERY) . '</span><span class="embed_arrow"></span></a>';
         }
         if (isset($player_color['iframe_visible']) && $player_color['iframe_visible']) {
             $output .= '<a href="javascript::void(0);" onclick="view_iframe_code();" id="iframe_code" class="embed"><span class="embed_text">' . __('Iframe', APPTHA_VGALLERY) . '</span><span class="embed_arrow"></span></a>';
         }
         if (isset($player_color['report_visible']) && $player_color['report_visible']) {
             $output .= '<a href="javascript:void(0)" onclick="reportVideo();" class="embed" id="allowReport"><span class="embed_text">' . __('Report&nbsp;Video', APPTHA_VGALLERY) . '</span><span class="embed_arrow"></span></a>';
         }
         /** Condition for embed code */
         if ($fetched[0]->file_type == 5 && !empty($fetched[0]->embedcode)) {
             $embed_code = stripslashes($fetched[0]->embedcode);
         } else {
             /** Display embed code */
             $embed_code = '<embed src="' . $this->_swfPath . '" flashvars="' . $flashvars . '&amp;shareIcon=false&amp;email=false&amp;showPlaylist=false&amp;zoomIcon=false&amp;copylink=' . get_permalink() . '&amp;embedplayer=true" width="' . $width . '" height="' . $height . '" allowfullscreen="true" allowscriptaccess="always" type="application/x-shockwave-flash" wmode="transparent">';
         }
         /** Call fucntion to display report video option */
         $output .= $this->displayReportVideo($embed_code, $video_slug, $current_user->user_email);
         /** Load embed code */
         if ($fetched[0]->file_type == 5 && $fetched[0]->embedcode) {
             $iframe_code = stripslashes($fetched[0]->embedcode);
         } else {
             /** Load iframe code */
             $iframe_code = '<iframe src="' . $this->_swfPath . '?' . $flashvars . '&amp;shareIcon=false&amp;email=false&amp;showPlaylist=false&amp;zoomIcon=false&amp;copylink=' . get_permalink() . '&amp;embedplayer=true" frameborder="0" width="' . $width . '" height="' . $height . '" ></iframe>';
         }
         $output .= '<textarea row="7" col="60" id="iframe-content" name="iframe-content" style="display:none;" onclick="this.select();">' . $iframe_code . '</textarea><input type="hidden" value="" id="iframeflag" name="iframeflag" />';
         /** Show /hide video description. */
         if ($configXML->showTag) {
             $output .= '<div style="clear: both;"></div><div class="video-page-desc">' . apply_filters('the_content', $description) . '</div>';
         }
         $output .= '</div></div>';
     }
     $output .= '</div></div>';
     /** Enable/disable Related videos slider */
     $flag = 0;
     if ($vid && isset($arguments['playlistid']) && isset($arguments['relatedvideos']) && $arguments['relatedvideos'] == 'on') {
         $flag = 1;
     }
     if ($flag == 1 || ($this->_post_type === APPTHAVIDEOGALLERY || $this->_page_post_type === APPTHAVIDEOGALLERY) && $player_color['show_related_video'] == 1) {
         /** Call function to display related videos slider */
         $output .= $this->relatedVideoSlider($vid, $video_playlist_id, $pluginflashvars, $width, $height, $videodivId);
     }
     /** To display video comments section */
     return $output . $this->videoComments($configXML);
 }
Ejemplo n.º 5
0
                            href="<?php 
            echo $statURL;
            ?>
 
                       <?php 
        } else {
            esc_attr_e('publish');
            ?>
"
                            href="#" onclick="return alert('Publish option was disabled by admin')";   
                       <?php 
        }
        ?>
" > 
                        <img src="<?php 
        echo getImagesDirURL() . $image;
        ?>
" /> </a>
						<?php 
    }
    ?>
						</td> 
                        <?php 
    /** Display videos ordering */
    ?>
                        <td class="column-ordering"> <?php 
    echo $videoView->ordering;
    ?>
 </td> 
                    </tr> 
                    <?php 
Ejemplo n.º 6
0
function videogallery_addpages()
{
    global $wpdb;
    /** Get player color settings from db  */
    $setting_member_upload = getPlayerColorArray();
    /** Set menu icon path */
    $menuIcon = getImagesDirURL() . 'apptha.png';
    /** Define menu constant */
    defineAction('VG_MENU', 'videogallery_menu');
    /** Add menu, videos page for member user */
    if (isset($setting_member_upload['member_upload_enable']) && $setting_member_upload['member_upload_enable'] == 1) {
        add_menu_page(APPTHAVGALLERY, APPTHAVGALLERY, 'read', 'video', VG_MENU, $menuIcon);
        add_submenu_page('video', APPTHAVGALLERY, 'All Videos', 'read', 'video', VG_MENU);
        add_submenu_page('', 'New Videos', '', 'read', 'newvideo', VG_MENU);
    } else {
        /** Add menu, videos page for admin */
        add_menu_page(APPTHAVGALLERY, APPTHAVGALLERY, 'manage_options', 'video', VG_MENU, $menuIcon);
        add_submenu_page('video', APPTHAVGALLERY, 'All Videos', 'manage_options', 'video', VG_MENU);
        add_submenu_page('', 'New Videos', '', 'manage_options', 'newvideo', VG_MENU);
    }
    /** Add menu, Categories page */
    add_submenu_page('video', APPTHAVGALLERY, 'Categories', 'manage_options', 'playlist', VG_MENU);
    /** Add menu, Categories page */
    add_submenu_page('video', APPTHAVGALLERY, 'Playlist', 'manage_options', 'userplaylist', VG_MENU);
    /** Add Ajax Category page */
    add_submenu_page('', APPTHAVGALLERY, 'Ajax Category', 'manage_options', 'ajaxplaylist', VG_MENU);
    /** Add New Category page */
    add_submenu_page('', 'New Category', '', 'manage_options', 'newplaylist', VG_MENU);
    /** Add menu, Video Ads page */
    add_submenu_page('video', 'Video Ads', 'Video Ads', 'manage_options', 'videoads', VG_MENU);
    /** Add New Video Ads page */
    add_submenu_page('', 'New Videos', '', 'manage_options', 'newvideoad', VG_MENU);
    /** Add menu, Google AdSense page */
    add_submenu_page('video', 'Google AdSense', 'Google AdSense', 'manage_options', 'googleadsense', VG_MENU);
    /** Add New Google AdSense page */
    add_submenu_page('', 'New Google AdSense', 'New Google AdSense', 'manage_options', 'addgoogleadsense', VG_MENU);
    /** Add Gallery Settings page */
    add_submenu_page('video', 'GallerySettings', 'Settings', 'manage_options', 'hdflvvideosharesettings', VG_MENU);
    /** Add Video Gallery Instruction page */
    add_submenu_page('', ' Video Gallery Instruction', 'Video Gallery Instruction', 'menu_options', 'videogallery_instruction', VG_MENU);
}
Ejemplo n.º 7
0
                } else {
                    /** Else fetch featured videos by default */
                    if ($featured) {
                        $singleVideodata = $pageOBJ->_featuredvideodata;
                    }
                }
            }
        }
    }
}
/** Get setting values from helper */
$settingsContent = getPluginSettings();
/** Get plugin "uploads/ videogallery" directory URL */
$uploadPath = getUploadDirURL();
/** Get images directory path */
$pageOBJ->_imagePath = getImagesDirURL();
/** Set default value for playlist autoplay */
$ap = 'false';
/** Check playlist autoplay and set value */
if ($settingsContent->playlistauto == 1) {
    $ap = 'true';
}
/** Set content type and char set for playlist xml */
header('content-type:text/xml;charset = utf-8');
/** Set XML version and encoding */
echo '<?xml version = "1.0" encoding = "utf-8"?>';
/** Playlist XML starts */
echo '<playlist autoplay = "' . $ap . '" random = "false">';
/** Looping all video details */
foreach ($singleVideodata as $media) {
    $fbPath = $duration = '';
Ejemplo n.º 8
0
/**
 * Fucntion to set image value based on file types
 * 
 * @param unknown $image
 * @param unknown $file_type
 * @param unknown $amazonBucket
 * @param unknown $type
 * @return Ambigous <string, unknown>
 */
function getImagesValue($image, $file_type, $amazonBucket, $type)
{
    /** Get videogallery plugin images directoy path */
    $imagePath = getImagesDirURL();
    /** Get videogallery plugin upload directory path */
    $uploadPath = getUploadDirURL();
    /** GEt image name */
    $imageFileURL = $image;
    /** If type is 1 then set defult image for preview image
     * Else set thumb defualt */
    if ($type == 1) {
        $imageDefault = $imagePath . 'noimage.jpg';
    } else {
        $imageDefault = $imagePath . 'nothumbimage.jpg';
    }
    /** If there is no thumb image for video */
    if ($imageFileURL == '') {
        /** Set default image as thumb image */
        $imageFileURL = $imageDefault;
    } else {
        /** Check file type is 2 or 5 */
        if ($file_type == 2 || $file_type == 5) {
            /**
             * Get thumb image full uploaded path 
             */
            $imageFileURL = $uploadPath . $imageFileURL;
            /** For Amazon S3 Buckets images */
            if ($amazonBucket && strpos($image, '/')) {
                /** Get thumb image bucket URL */
                $imageFileURL = $image;
            }
        }
    }
    /** Return thumb image URL */
    return $imageFileURL;
}
Ejemplo n.º 9
0
/** Playlist admin page Starts
 * Call function to display admin tabs in playlist page */
echo displayAdminTabs('userplaylist');
/**  Playlist add/ grid section Starts */
?>
    <div id="<?php 
echo VIDEOGALLERY_USER_PLAYLIST;
?>
" class="wrap"> 
      <h2 id="<?php 
echo VIDEOGALLERY_USER_PLAYLIST;
?>
" class="option_title"> 
        <?php 
/** Display page title and icon image */
echo "<img src='" . getImagesDirURL() . "manage_list.png' id='userplaylistImg' alt='move' width='30'/>";
?>
 
        <?php 
esc_attr_e('Playlist', APPTHA_VGALLERY);
?>
 
      </h2> 
      
      <?php 
/** Playlist add page starts */
?>
      <div id="<?php 
echo VIDEOGALLERY_USER_PLAYLIST;
?>
" class="floatleft category_addpages">  
Ejemplo n.º 10
0
 /**
  * ContusHomeVideoView constructor starts
  */
 public function __construct()
 {
     parent::__construct();
     /**
      * Call plugin helper function
      * to get plugin settings
      * and more page id */
     $this->_settingsData = getPluginSettings();
     $this->_player_colors = unserialize($this->_settingsData->player_colors);
     $this->_mPageid = morePageID();
     /** Get video id from request URL for home page */
     $this->_vId = absint(filter_input(INPUT_GET, 'vid'));
     /** Get pid from request URL for home page */
     $this->_pId = absint(filter_input(INPUT_GET, 'pid'));
     /** Get pagenum from request URL for home page */
     $this->_pagenum = filter_input(INPUT_GET, 'pagenum');
     /** Get Category column count from settings */
     $this->_colCat = $this->_settingsData->colCat;
     /** Get featured videos data */
     $this->_featuredvideodata = $this->home_featuredvideodata();
     /** Get WordPress admin URL */
     $this->_site_url = get_site_url();
     /** Get WordPress site URL */
     $this->_siteURL = home_url();
     /** Set banner player swf path */
     $this->_bannerswfPath = APPTHA_VGALLERY_BASEURL . 'hdflvplayer' . DS . 'hdplayer_banner.swf';
     /** Set plugin player swf path */
     $this->_swfPath = APPTHA_VGALLERY_BASEURL . 'hdflvplayer' . DS . 'hdplayer.swf';
     /**
      * Get protocol URL,
      * uploads / videogallery
      * and plugin images directory path
      * from plugin helper
      */
     $this->_imagePath = getImagesDirURL();
     $this->_pluginProtocol = getPluginProtocol();
     $this->_uploadPath = getUploadDirURL();
 }
Ejemplo n.º 11
0
 * @category   Apptha
 * @package    Contus video Gallery
 * @version    3.0
 * @author     Apptha Team <*****@*****.**>
 * @copyright  Copyright (C) 2015 Apptha. All rights reserved.
 * @license    GNU General Public License http://www.gnu.org/copyleft/gpl.html 
 */
/** Include plugin configuration file */
require_once dirname(__FILE__) . '/hdflv-config.php';
/** Variable Initialization for rss feed */
$where = $tag_name = $vid = '';
$dataLimit = 1000;
/** Get "uploads/videogallery" URL for rss feed*/
$uploadPath = getUploadDirURL();
/** Get images folder URL */
$_imagePath = getImagesDirURL();
/** Get task parameter from request */
$type = filter_input(INPUT_GET, 'task');
/** Get vid parameter from request */
$vid = intval(filter_input(INPUT_GET, 'vid'));
/** Create object for ContusVideoController class */
$contusOBJ = new ContusVideoController();
/** Check type vlaue and get relevant data from db */
switch ($type) {
    case 'recent':
        /** Set thumb image order to fetch recent videos */
        $thumImageorder = ' w.vid DESC ';
        /** Get video detials for recent videos to generate feed */
        $TypeOFvideos = $contusOBJ->home_thumbdata($thumImageorder, $where, $dataLimit);
        break;
    case 'featured':
Ejemplo n.º 12
0
?>
									<b><?php 
esc_attr_e('Supported video formats:', APPTHA_VGALLERY);
?>
</b>
									<?php 
esc_attr_e('(  MP4, M4V, M4A, MOV, Mp4v or F4V )', APPTHA_VGALLERY);
?>
								</div>
								<?php 
/** Display upload video message */
?>
								<span id="uploadmessage" style="display: block; margin-top:10px;margin-left:300px;color:red;font-size:12px;font-weight:bold;"></span>
								<div id="f1-upload-progress" style="display:none">
									<div style="float:left"><img id="f1-upload-image" src="<?php 
echo getImagesDirURL() . 'empty.gif';
?>
" alt="Uploading"  style="padding-top:2px"/>
										<label style="padding-top:0px;padding-left:4px;font-size:14px;font-weight:bold;vertical-align:top"  id="f1-upload-filename">PostRoll.flv</label></div>
									<div class="apptha_add_new_video_ad"> <span id="f1-upload-cancel">
											<a style="float:right;padding-right:10px;" href="javascript:cancelUpload( 'normalvideoform' );" name="submitcancel">Cancel</a>
										</span>
										<label id="f1-upload-status" style="float:left;padding-right:40px;padding-left:20px;">Uploading</label>
										<span id="f1-upload-message" style="float:left;font-size:10px;background:#FFAFAE;padding:8px;">
											<b><?php 
esc_attr_e('Upload Failed:', APPTHA_VGALLERY);
?>
</b> 
											<?php 
esc_attr_e(USERCANCELUPLOAD, APPTHA_VGALLERY);
?>
/** Display title, icons in header */
if (isset($editGoogleAdsense->id)) {
    ?>
    <h2 class="option_title"><?php 
    echo '<img src="' . getImagesDirURL() . 'google_adsense.png" alt="move" width="30"/>';
    ?>
          <?php 
    esc_attr_e('Update Google AdSense', APPTHA_VGALLERY);
    ?>
</h2> 
<?php 
} else {
    ?>
 
    <h2 class="option_title"><?php 
    echo '<img src="' . getImagesDirURL() . 'google_adsense.png" alt="move" width="30"/>';
    ?>
            <?php 
    esc_attr_e('Add new Google AdSense', APPTHA_VGALLERY);
    ?>
</h2> 
<?php 
}
/** Display status for the corresponding action */
if (isset($msg)) {
    ?>
 
         <div class="updated below-h2"> <p> <?php 
    echo $msg;
    ?>
 </p> </div> 
Ejemplo n.º 14
0
									name="filepath" size="50" value="<?php 
if (isset($videoEdit->file_type) && $videoEdit->file_type == 1) {
    echo $videoEdit->link;
}
?>
" id="filepath1" onPaste="setTimeout(function(){generate12();}, 4);" />&nbsp;&nbsp;
        <?php 
/** Youtube video generate detail section starts */
?>
                                    <input id="generate" type="button" name="youtube_media" class="button-primary" value="<?php 
esc_attr_e('Generate details', APPTHA_VGALLERY);
?>
" onClick="return getyoutube_details();" />
									<div id="loading_image" align="center" style="display: none;">
										<img src="<?php 
echo getImagesDirURL() . 'ajax-loader.gif';
?>
" />
									</div> <span id="Youtubeurlmessage" style="display: block;"></span>
									<?php 
/** Display sample videos link and message for user */
?>
									<div class="youtubelinkinfo">
									    <p><?php 
esc_attr_e('Here you need to enter the video URL', APPTHA_VGALLERY);
?>
</p>
										<p><?php 
esc_attr_e('It accepts YouTube links like', APPTHA_VGALLERY) . esc_attr_e(' : https://www.youtube.com/watch?v=K0PsYfEyvJY or http://youtu.be/0vrdgDdPApQ');
?>
</p>