function srz_yt_album_shortcode($atts) { if (!isset($atts['id'])) { return 'Invalid shortcode... ID missing'; } $albumid = $atts['id']; $album = SrizonYTDB::GetAlbum($albumid); if (!$album) { return 'Album Not found. Check the shortcode'; } if (isset($_GET['debugsrzyt'])) { echo '<pre>'; print_r($album); echo '</pre>'; } $videos = srz_yt_get_album_api($album); $output = ''; if (isset($GLOBALS['scroller_id'])) { $GLOBALS['scroller_id']++; } else { $GLOBALS['scroller_id'] = 1; } $scroller_id = 'srizonytscroller' . $GLOBALS['scroller_id']; $paging_id = 'ytpage' . $GLOBALS['scroller_id']; if (is_array($videos)) { if (count($videos) > $album['totalvid']) { $videos = array_slice($videos, 0, $album['totalvid']); } if ($album['liststyle'] == 'fullpage') { include 'srizon-yt-album-fullpage.php'; } else { if ($album['liststyle'] == 'description') { include 'srizon-yt-album-description.php'; } else { if ($album['liststyle'] == 'respslider') { $output .= 'This layout is available on pro version only'; } } } } return $output; //else return 'will process album with id: '.$atts['id']. ' now!'; }
static function SyncAlbum($id) { $album = SrizonYTDB::GetAlbum($id); delete_transient(md5($album['api_id'])); }
function srz_yt_albums_edit() { if (isset($_GET['id'])) { echo '<div id="icon-edit-pages" class="icon32 icon32-posts-page"><br></div><h2>Edit Album</h2>'; $value_arr = SrizonYTDB::GetAlbum($_GET['id']); } else { echo '<div id="icon-edit-pages" class="icon32 icon32-posts-page"><br></div><h2>Add New Album</h2>'; $value_arr = array('title' => '', 'username' => '', 'playlist' => '', 'source' => 'userupload', 'updatefeed' => '600', 'totalvid' => '20', 'liststyle' => 'fullpage', 'tpltheme' => 'white', 'paginatenum' => '18', 'largerow' => '3', 'smallrow' => '1', 'thumbpadding' => '5', 'showtitle' => 'yes', 'titleboxheight' => '30', 'conrnerrounding' => '7', 'thumbshadow' => '5l', 'iconoverlay' => 'yes', 'tdratio' => '2575', 'conrnerroundingd' => '7', 'thumbshadowd' => '5l', 'iconoverlayd' => 'yes', 'trimdesc' => '200', 'respslidespeed' => '500', 'respslidestart' => '0', 'targetheight' => '200', 'api_key' => 'AIzaSyBbRXlCqwT1TmkWZoh_OyuzgJHoTdoZffY'); } SrizonYTUI::OptionWrapperStart(); SrizonYTUI::RightColStart(); SrizonYTUI::BoxHeader('box1', "Youtube Album"); echo '<div>Fill up the video source and other parameters properly. Save to get the shortcode. Use the shortcode on your post or page</div>'; SrizonYTUI::BoxFooter(); SrizonYTUI::RightColEnd(); SrizonYTUI::LeftColStart(); include 'srizon-yt-album-option-form.php'; SrizonYTUI::LeftColEnd(); SrizonYTUI::OptionWrapperEnd(); }