Пример #1
0
 function get_dailymotion_playlists_from_username($user_id = false, $slidedeck = null)
 {
     $playlists = false;
     $args = array('sslverify' => false);
     // Get the last 100 playlists (max)
     $feed_url = "https://api.dailymotion.com/user/{$user_id}/playlists?limit=100&fields=id,name,created_time";
     if (isset($user_id) && !empty($user_id)) {
         $playlists = array();
         $response = wp_remote_get($feed_url, $args);
         if (!is_wp_error($response)) {
             $response_json = json_decode($response['body']);
             if (!empty($response_json)) {
                 foreach ($response_json->list as $key => $entry) {
                     $playlists[] = array('href' => "https://api.dailymotion.com/playlist/{$entry->id}/videos", 'title' => $entry->name, 'created' => $entry->created_time, 'updated' => $entry->created_time);
                 }
             }
         }
     }
     // Dailymotion User playlists Call
     $playlists_select = array('recent' => __('Recent Uploads', $this->namespace));
     if ($playlists) {
         foreach ($playlists as $playlist) {
             $playlists_select[$playlist['href']] = $playlist['title'];
         }
     }
     $html_input = array('type' => 'select', 'label' => "Playlist", 'attr' => array('class' => 'fancy'), 'values' => $playlists_select);
     return slidedeck2_html_input('options[dailymotion_playlist]', $slidedeck['options']['dailymotion_playlist'], $html_input, false);
 }
Пример #2
0
 function get_vimeo_playlists_from_username($user_id = false, $slidedeck = null)
 {
     $playlists = false;
     $args = array('sslverify' => false);
     $feed_url = "http://vimeo.com/api/v2/{$user_id}/albums.json";
     if (isset($user_id) && !empty($user_id)) {
         // Attempt to read the cache (no cache here)
         $playlists = false;
         // If cache doesn't exist
         if (!$playlists) {
             $playlists = array();
             $response = wp_remote_get($feed_url, $args);
             if (!is_wp_error($response)) {
                 $response_json = json_decode($response['body']);
                 if (!empty($response_json)) {
                     foreach ($response_json as $key => $entry) {
                         $playlists[] = array('href' => "http://vimeo.com/api/v2/album/{$entry->id}/videos.json", 'title' => $entry->title, 'created' => $entry->created_on, 'updated' => $entry->last_modified);
                     }
                 }
             } else {
                 return false;
             }
         }
     }
     // Vimeo User playlists Call
     $playlists_select = array('recent' => __('Recent Uploads', $this->namespace));
     if ($playlists) {
         foreach ($playlists as $playlist) {
             $playlists_select[$playlist['href']] = $playlist['title'];
         }
     }
     $html_input = array('type' => 'select', 'label' => "Vimeo Album", 'attr' => array('class' => 'fancy'), 'values' => $playlists_select);
     return slidedeck2_html_input('options[vimeo_album]', $slidedeck['options']['vimeo_album'], $html_input, false);
 }
Пример #3
0
 function get_youtube_playlists_from_username($user_id = false, $slidedeck = null)
 {
     $playlists = false;
     $args = array('sslverify' => false);
     $feed_url = "https://gdata.youtube.com/feeds/api/users/{$user_id}/playlists?alt=json&orderby=updated&max-results=50";
     if (isset($user_id) && !empty($user_id)) {
         // Create a cache key
         $cache_key = $slidedeck['id'] . $feed_url;
         // Attempt to read the cache (no cache)
         $playlists = false;
         // If cache doesn't exist
         if (!$playlists) {
             $playlists = array();
             $response = wp_remote_get($feed_url, $args);
             if (!is_wp_error($response)) {
                 $response_json = json_decode($response['body']);
                 /**
                  * If this is empty, the user probably has no playlists
                  */
                 if (isset($response_json->feed->entry) && !empty($response_json->feed->entry)) {
                     foreach ((array) $response_json->feed->entry as $key => $entry) {
                         $playlist_feed = $entry->{'yt$playlistId'}->{'$t'};
                         $playlists[] = array('href' => 'https://gdata.youtube.com/feeds/api/playlists/' . $playlist_feed, 'title' => $entry->title->{'$t'}, 'created' => $entry->published->{'$t'}, 'updated' => $entry->updated->{'$t'});
                     }
                 }
             } else {
                 return false;
             }
         }
     }
     // YouTube User playlists Call
     $playlists_select = array('recent' => __('Recent Uploads', $this->namespace));
     if ($playlists) {
         foreach ($playlists as $playlist) {
             $playlists_select[$playlist['href']] = $playlist['title'];
         }
     }
     $html_input = array('type' => 'select', 'label' => "YouTube Playlist", 'attr' => array('class' => 'fancy'), 'values' => $playlists_select);
     return slidedeck2_html_input('options[youtube_playlist]', $slidedeck['options']['youtube_playlist'], $html_input, false);
 }
Пример #4
0
         }
         $input_html .= slidedeck2_html_input("options[{$name}]", $slidedeck['options'][$name], $option, false);
     } else {
         foreach ($option as $sub_name => $sub_option) {
             if (!isset($sub_option['interface']) || empty($sub_option['interface'])) {
                 // Create attr property if it doesn't exist
                 if (!isset($sub_option['attr'])) {
                     $sub_option['attr'] = array('class' => "");
                 }
                 // Create class attribute if it doesn't exist
                 if (!isset($sub_option['attr']['class'])) {
                     $sub_option['attr']['class'] = "";
                 }
                 $sub_option['attr']['class'] .= " fancy";
             }
             $input_html .= slidedeck2_html_input('options[' . $name . '][' . $sub_name . ']', $slidedeck['options'][$name][$sub_name], $sub_option, false);
         }
     }
     if (array_key_exists('type', $option) && $option['type'] == 'hidden') {
         $hidden_options .= $input_html;
     } else {
         $html .= $input_html;
     }
     if ($is_hidden !== true) {
         $html .= "</li>";
     }
     echo $html;
 }
 ?>
                         
                     <?php 
Пример #5
0
            </li>
            <li<?php 
echo $tags_hidden;
?>
>
                <?php 
slidedeck2_html_input('options[flickr_tags_mode]', $slidedeck['options']['flickr_tags_mode'], array('type' => 'radio', 'attr' => array('class' => 'fancy'), 'label' => __('Tag mode: ', $this->namespace), 'values' => array('any' => __('Any of these', $this->namespace), 'all' => __('All of these', $this->namespace))));
?>
            </li>
            <li class="add-button-li"<?php 
echo $tags_hidden;
?>
>
                <div class="add-button-wrapper flickr">
                    <?php 
$tooltip = __('Enter one or more tags separated by commas.') . "<br />" . __('Tags can only be used with recent photos.');
slidedeck2_html_input('flickr-add-tag-field', '', array('label' => __("Flickr Tags", $this->namespace) . '<span class="tooltip" title="' . $tooltip . '"></span>', 'attr' => array('size' => 10, 'maxlength' => 255)));
?>
                    <a class="flickr-tag-add add-button" href="#add"><?php 
_e("Add", $this->namespace);
?>
</a>
                </div>
                <div id="flickr-tags-wrapper"><?php 
echo $tags_html;
?>
</div>
            </li>
        </ul>
    </div>
</div>
Пример #6
0
 /**
  * Append options to bottom of the setup list
  * 
  * @param array $slidedeck
  */
 function slidedeck_setup_options_bottom($slidedeck)
 {
     if ($this->is_valid($slidedeck['lens'])) {
         echo '<li>' . slidedeck2_html_input("options[navigation-position]", $slidedeck['options']['navigation-position'], $this->options_model['Setup']['navigation-position'], false) . '</li>';
     }
 }
Пример #7
0
        <strong><?php 
_e("Preferred Image Size", $namespace);
?>
</strong>
        <?php 
slidedeck2_html_input('_preferred_image_size', $slide->meta['_preferred_image_size'], $preferred_image_size_params);
?>
    </li>
    
    <li class="image-scaling option">
        <strong><?php 
_e("Image Scaling", $namespace);
?>
</strong>
        <?php 
slidedeck2_html_input("_image_scaling", $slide->meta['_image_scaling'], $image_scaling_params);
?>
    </li>
    
    <li class="last text-position option">
        <strong><?php 
_e("Caption Position", $namespace);
?>
</strong>
        <?php 
foreach ($caption_positions as $position => $label) {
    ?>
            <label><input type="radio" class="fancy" name="_caption_position" value="<?php 
    echo $position;
    ?>
"<?php 
Пример #8
0
 function get_youtube_playlists_from_username($user_id = false, $slidedeck = null)
 {
     $playlists = false;
     $args = array('sslverify' => false);
     /* Get youtube api key which is passed as query parameter to get the response */
     $last_used_youtube_api_key = get_option($this->namespace . '_last_saved_youtube_api_key');
     /* 
      * Added by Ranjith
      * Build the channel url to retrieve all channels id's asociated with the user 
      */
     $channel_url = 'https://www.googleapis.com/youtube/v3/channels?part=id&forUsername='******'&key=' . $last_used_youtube_api_key;
     $response = wp_remote_get($channel_url, $args);
     if (!is_wp_error($response)) {
         $response_json = json_decode($response['body']);
         if (isset($response_json->items)) {
             $channel_count = count($response_json->items);
         } else {
             $channel_count = 0;
         }
         /* Loop through the channels to get the playlist */
         for ($j = 0; $j < $channel_count; $j++) {
             $channel_id = $response_json->items[$j]->id;
             /* 
              * Added by Ranjith
              * Build playlist url to retrieve all the playlists available in channel 
              */
             if (isset($channel_id) && !empty($channel_id)) {
                 $feed_url = 'https://www.googleapis.com/youtube/v3/playlists?part=snippet&channelId=' . $channel_id . '&maxResults=50&key=' . $last_used_youtube_api_key;
             }
             if (isset($user_id) && !empty($user_id)) {
                 // Create a cache key
                 $cache_key = $slidedeck['id'] . $feed_url;
                 // Attempt to read the cache (no cache)
                 $playlists = false;
                 // If cache doesn't exist
                 if (!$playlists) {
                     $playlists = array();
                     $response = wp_remote_get($feed_url, $args);
                     if (!is_wp_error($response)) {
                         $response_json = json_decode($response['body']);
                         $item_count = count($response_json->items);
                         /**
                          * If this is empty, the user probably has no playlists
                          */
                         if ($item_count) {
                             /* Build playlist items url to retreive items from playlist */
                             for ($i = 0; $i < $item_count; $i++) {
                                 $playlist_id = $response_json->items[$i]->id;
                                 $playlists[] = array('href' => 'https://www.googleapis.com/youtube/v3/playlistItems?playlistId=' . $playlist_id, 'title' => $response_json->items[$i]->snippet->title, 'created' => $response_json->items[$i]->snippet->publishedAt, 'updated' => $response_json->items[$i]->snippet->publishedAt);
                             }
                         }
                     } else {
                         return false;
                     }
                 }
             }
         }
     }
     // YouTube User playlists Call
     $playlists_select = array('recent' => __('Recent Uploads', $this->namespace));
     if ($playlists) {
         foreach ($playlists as $playlist) {
             $playlists_select[$playlist['href']] = $playlist['title'];
         }
     }
     $html_input = array('type' => 'select', 'label' => "YouTube Playlist", 'attr' => array('class' => 'fancy'), 'values' => $playlists_select);
     return slidedeck2_html_input('options[youtube_playlist]', $slidedeck['options']['youtube_playlist'], $html_input, false);
 }
?>
                            </li>
                            <li>
                            	<?php 
slidedeck2_html_input('data[disable_edit_create]', $data['disable_edit_create'], array('attr' => array('class' => 'fancy'), 'type' => 'checkbox', 'label' => "Disable the ability to Add New and Edit SlideDecks for non Admins"));
?>
                            </li>
                            <li>
                            	<?php 
slidedeck2_html_input('data[twitter_user]', $data['twitter_user'], array('attr' => array('class' => 'fancy'), 'label' => "Twitter user to tweet via for overlays"));
?>
                            </li>
                            <li>
                            	<?php 
slidedeck2_html_input('last_saved_instagram_access_token', $last_saved_instagram_access_token, array('attr' => array('class' => 'fancy'), 'label' => "Last used Instagram Access Token"));
?>
                            </li>
                            <li>
                            	<?php 
slidedeck2_html_input('last_saved_gplus_api_key', $last_saved_gplus_api_key, array('attr' => array('class' => 'fancy'), 'label' => "Last used Google+ API Key"));
?>
                            </li>
                        </ul>
                    </div>
                    <input type="submit" class="button-primary" value="Update Options" />
                </formset>
            </form>
        </div>
    </div>
</div>
Пример #10
0
?>
" />
    <div class="inner">
        <ul class="content-source-fields">
            <li>
				<?php 
slidedeck2_html_input('options[feedUrl]', $slidedeck['options']['feedUrl'], array('label' => __("RSS Feed URL", $this->namespace), 'attr' => array('rows' => 3), 'required' => true, 'type' => 'textarea'));
?>
                
                <em><?php 
echo __('(you can enter multiple feeds, one per line)', $this->namespace);
?>
</em>
                <em><?php 
echo sprintf(__('Needs to be a valid RSS feed. See the %1$sW3C Feed Validator Service%2$s to check your feed. NOTE: Some servers are not configured to follow redirects, make sure you are using the feed URL&rsquo;s final destination URL.', $this->namespace), "<a href='http://validator.w3.org/feed/' target='_blank'>", "</a>");
?>
</em>
            </li>
            <li>
				<?php 
slidedeck2_html_input('options[rssImageSource]', $slidedeck['options']['rssImageSource'], $this->options_model['Setup']['rssImageSource']);
?>
            </li>
            <li>
				<?php 
slidedeck2_html_input('options[rssValidateImages]', $slidedeck['options']['rssValidateImages'], $this->options_model['Setup']['rssValidateImages']);
?>
            </li>
        </ul>
    </div>
</div>
Пример #11
0
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with SlideDeck.  If not, see <http://www.gnu.org/licenses/>.
*/
?>

<div id="content-source-pinterest">
    <input type="hidden" name="source[]" value="<?php 
echo $this->name;
?>
" />
    <div class="inner">
        <ul class="content-source-fields">
            <li>
                <?php 
slidedeck2_html_input('options[pinterest_url]', $slidedeck['options']['pinterest_url'], array('label' => __("A Pinterest URL", $this->namespace), 'attr' => array('size' => 20, 'maxlength' => 255), 'required' => true));
?>
            </li>
        </ul>
        <em class="note-below">
        	eg: A user - <strong><a href="http://pinterest.com/hbwsl/">http://pinterest.com/hbwsl/</a></strong><br />
        	eg: A board - <strong><a href="http://pinterest.com/dtelepathy/innovation-inspiration/">http://pinterest.com/hbwsl/innovation-inspiration/</a></strong>
        </em>
        <em class="note-below disclaimer">
        	We are using an unofficial API (RSS) for this Pinterest source.<br />This could and probably will change in the future.
        </em>
    </div>
</div>
Пример #12
0
            </li>
            <li>
				<?php 
$tooltip = __('Choose whether to show all posts or just your own.', $namespace);
?>
			    <?php 
slidedeck2_html_input('options[facebook_page_show_other_users]', $slidedeck['options']['facebook_page_show_other_users'], array('type' => 'radio', 'attr' => array('class' => 'fancy'), 'label' => __('Which Posts?', $namespace), 'values' => array('page' => __('Posts by Page', $namespace), 'everyone' => __('All Posts', $namespace)), 'description' => "Choose whether to show all posts or just posts by page owner."));
?>
            </li>
            <li>
				<?php 
$tooltip = __('Facebook\'s API requires an access token to get your content.', $namespace);
$tooltip .= '<br />';
?>
				<?php 
slidedeck2_html_input('options[facebook_access_token]', $token, array('type' => 'password', 'label' => __("Access Token", $namespace) . '<span class="tooltip" title="' . $tooltip . '"></span>', array('size' => 40, 'maxlength' => 255), 'required' => true));
?>
				<em class="note-below">Facebook expires access tokens after 60 days, we will still display your cached content in the event that your access token expires.<br/><br/>Get your access token <a href="<?php 
echo admin_url('admin-ajax.php');
?>
?action=<?php 
echo $namespace;
?>
_get_facebook_access_token&_wpnonce_get_facebook_access_token=<?php 
echo wp_create_nonce($namespace . '-get-facebook-access-token');
?>
" id="get-facebook-access-token-link">here</a>.</em>
            </li>
        </ul>
    </div>
</div>
        <input type="hidden" name="action" value="slidedeck_medialibrary_image_properties" />
        <input type="hidden" name="ID" value="<?php 
echo $media['post']->ID;
?>
" />
        <?php 
wp_nonce_field('slidedeck-medialibrary-image-properties');
?>
        
        <p><?php 
slidedeck2_html_input("title", $media['post']->post_title, array('label' => "Title"));
?>
</p>
        <p><?php 
slidedeck2_html_input("caption", $media['post']->post_excerpt, array('label' => "Caption"));
?>
</p>
        <p><?php 
slidedeck2_html_input("media_link", $media['media_link'], array('label' => "Link"));
?>
</p>
        
    </fieldset>
    
    <p class="submit-row">
        <a href="#close" class="close-modal">Cancel</a>
        <input type="submit" value="Save Changes" class="button button-primary" />
    </p>
    
</form>
Пример #14
0
$tooltip .= '<br />';
$tooltip .= sprintf(__('Click %1$shere%2$s to get your token. (You only need to do this once)', $this->namespace), "<a href='https://instagram.com/oauth/authorize/?client_id=529dede105394ad79dd253e0ec0ac090&redirect_uri=http%3A%2F%2Fwww.slidedeck.com%2Finstagram%3Fautofill_url%3D" . urlencode(WP_PLUGIN_URL) . "%2F&response_type=code' target='_blank'>", '</a>');
?>
				<?php 
slidedeck2_html_input('options[instagram_access_token]', $token, array('label' => __("Access Token" . '<span class="tooltip" title="' . $tooltip . '"></span>', $this->namespace), array('size' => 40, 'maxlength' => 255), 'required' => true));
?>
				<em class="note-below">Get your access token <a href="https://instagram.com/oauth/authorize/?client_id=529dede105394ad79dd253e0ec0ac090&redirect_uri=http%3A%2F%2Fwww.slidedeck.com%2Finstagram%3Fautofill_url%3D<?php 
echo base64_encode(admin_url('admin.php?') . http_build_query($_GET));
?>
&response_type=code">here</a>.</em>
            </li>
            <li>
				<?php 
$tooltip = __('This can be your Username or another user\'s Username', $this->namespace);
?>
			    <?php 
slidedeck2_html_input('options[instagram_username]', $slidedeck['options']['instagram_username'], array('label' => __("Username" . '<span class="tooltip" title="' . $tooltip . '"></span>', $this->namespace), array('size' => 20, 'maxlength' => 255)));
?>
            </li>
            <li class="last dribbble cache-duration">
            	<?php 
$tooltip = __('This is how often we will fetch new data from Instagram', $this->namespace);
include SLIDEDECK2_DIRNAME . '/views/elements/_feed_cache_dration_slider.php';
?>
            </li>
        </ul>
    </div>
    <?php 
include SLIDEDECK2_DIRNAME . '/views/elements/_flyout-action-row.php';
?>
</div>
Пример #15
0
?>
            </li>
            <li class="twitter-username"<?php 
echo $username_hidden;
?>
>
        		<?php 
slidedeck2_html_input('options[twitter_username]', $slidedeck['options']['twitter_username'], array('label' => __('Twitter Username', $this->namespace), 'attr' => array('size' => 20, 'maxlength' => 255), 'required' => true));
?>
            </li>
            <?php 
if (false) {
    ?>
            <li>
                <?php 
    slidedeck2_html_input('options[twitter_scrape_images]', $slidedeck['options']['twitter_scrape_images'], array('type' => 'checkbox', 'label' => __("Image Scraping?", $this->namespace), 'attr' => array('class' => 'fancy')));
    ?>
            </li>
            <?php 
}
?>
            <li class="last twitter cache-duration">
            	<?php 
$tooltip = __('This is how often we will fetch new data from Twitter', $this->namespace);
include SLIDEDECK2_DIRNAME . '/views/elements/_feed_cache_dration_slider.php';
?>
            </li>
        </ul>
    </div>
    <?php 
include SLIDEDECK2_DIRNAME . '/views/elements/_flyout-action-row.php';
Пример #16
0
?>
" />
        
        <div class="inner clearfix">
            
            <ul class="options-list global-options">
                <?php 
foreach ($global_options as $option) {
    ?>
                    <li<?php 
    if ($option == "variation" && empty($variations[$cover['cover_style']])) {
        echo ' style="display:none;"';
    }
    ?>
><span class="inner"><?php 
    slidedeck2_html_input($option, $cover[$option], $cover_options_model[$option]);
    ?>
</span></li>
                <?php 
}
?>
            </ul>
            
        </div>
    
    </fieldset>
    
    <p class="submit-row">
        <a href="#cancel" class="cancel-modal">Cancel</a>
        <input type="submit" class="button button-primary" value="Save Changes" />
    </p>
Пример #17
0
?>

<div id="content-source-gplus">
    <input type="hidden" name="source[]" value="<?php 
echo $this->name;
?>
" />
    <div class="inner">
        <ul class="content-source-fields">
            <li>
				<?php 
slidedeck2_html_input('options[gplus_api_key]', $slidedeck['options']['gplus_api_key'], array('type' => 'password', 'label' => "Google+ API key", 'attr' => array('size' => 40, 'maxlength' => 255), 'required' => true));
?>
				<em class="note-below"><?php 
printf(__('You need an API Key to view your/someone else\'s Google+ Posts.%1$sHere\'s %2$show to get one%3$s. (you only need to do this once)'), "<br />", "<a id='gplus-how-to' href='#'>", "</a>");
?>
</em>
            </li>
            <li>
				<?php 
$tooltip = sprintf(__('The number in the URL when you visit: %1$sYour Google+ Profile%2$s.'), "<a href='https://plus.google.com/me' target='_blank'>", "</a>");
slidedeck2_html_input('options[gplusUserId]', $slidedeck['options']['gplusUserId'], array('label' => "Google+ User Id" . '<span class="tooltip" title="' . __("You can use yours, or someone else's user ID", $namespace) . '"></span>', 'attr' => array('size' => 40, 'maxlength' => 255), 'required' => true));
?>
				<em class="note-below"><?php 
echo $tooltip;
?>
</em>
            </li>
        </ul>
    </div>
</div>
Пример #18
0
echo $this->available_filters($slidedeck['options']['post_type'], $slidedeck);
?>
</div>
    	</div>
        <div class="right" style="<?php 
echo $slidedeck['options']['filter_by_tax'] == '1' ? '' : 'display:none';
?>
">
            <div class="trailblazer" style="display:none;">
                <p><?php 
_e("Toggle one or more taxonomies in the left column to see the selection boxes appear here.", $this->namespace);
?>
</p>
            </div>
            <div id="any-or-all-taxonomies" style="display:none;"><?php 
slidedeck2_html_input("options[query_any_all]", $slidedeck['options']['query_any_all'], $this->options_model['Setup']['query_any_all']);
?>
</div>
	        <div id="poststuff">
		        <div id="slidedeck-terms">
		        	<?php 
// Loop through the selected taxonomies and output the current terms.
foreach ((array) $slidedeck['options']['taxonomies'] as $taxonomy => $value) {
    echo $this->available_terms($slidedeck['options']['post_type'], $slidedeck, $taxonomy);
}
?>
		    	</div>
	        </div>
            <div class="slidedeck-ajax-loading" style="display:none;"><?php 
_e("Loading terms chooser...", $this->namespace);
?>
Пример #19
0
?>
            </li>
            <li class="youtube-search"<?php 
echo $search_hidden;
?>
>
                <?php 
slidedeck2_html_input('options[youtube_q]', $slidedeck['options']['youtube_q'], array('label' => __("Search Terms", $this->namespace), 'attr' => array('size' => 20, 'maxlength' => 255), 'required' => true));
?>
            </li>
            <li class="youtube-username"<?php 
echo $username_hidden;
?>
>
                <?php 
slidedeck2_html_input('options[youtube_username]', $slidedeck['options']['youtube_username'], array('label' => __("YouTube Username", $this->namespace), 'attr' => array('size' => 20, 'maxlength' => 255), 'required' => true));
?>
                <a class="youtube-username-ajax-update button" href="#update"><?php 
_e("Update", $this->namespace);
?>
</a>
            </li>
            <li class="youtube-username"<?php 
echo $username_hidden;
?>
>
                <?php 
if ($playlists_select) {
    ?>
                <div id="youtube-user-playlists">
                    <?php 
Пример #20
0
?>
" />
    <div class="inner">
<?php 
if ($ngg_active) {
    ?>
        <ul class="content-source-fields">
    <?php 
    if ($at_least_one_gallery) {
        ?>
        <?php 
        if ($at_least_one_album) {
            ?>
            <li>
                <?php 
            slidedeck2_html_input('options[ngg_gallery_or_album]', $slidedeck['options']['ngg_gallery_or_album'], array('type' => 'radio', 'label' => __("Images From", $this->namespace), 'attr' => array('class' => 'fancy'), 'values' => array('gallery' => __("Gallery", $this->namespace), 'album' => __("Album", $this->namespace))));
            ?>
            </li>
        <?php 
        }
        ?>

            <li class="nextgen-album"<?php 
        echo $album_hidden;
        ?>
>
                <?php 
        if ($ngg_album_select) {
            ?>
                <div id="ngg_albums">
                    <?php 
Пример #21
0
                            	<?php 
slidedeck2_html_input('data[twitter_user]', $data['twitter_user'], array('attr' => array('class' => 'fancy'), 'label' => "Twitter user to tweet via for overlays"));
?>
                            </li>
                            <li>
                            	<?php 
slidedeck2_html_input('last_saved_instagram_access_token', $last_saved_instagram_access_token, array('type' => 'password', 'attr' => array('class' => 'fancy'), 'label' => "Last used Instagram Access Token"));
?>
                            </li>
                            <li>
                            	<?php 
slidedeck2_html_input('last_saved_gplus_api_key', $last_saved_gplus_api_key, array('type' => 'password', 'attr' => array('class' => 'fancy'), 'label' => "Last used Google+ API Key"));
?>
                            </li>
                            <li>
                                <?php 
slidedeck2_html_input('data[flush_wp_object_cache]', $data['flush_wp_object_cache'], array('attr' => array('class' => 'fancy'), 'type' => 'radio', 'label' => "Enable aggressive cache flushing", 'description' => "Enables a brute force wp_cache_flush() call whenever a SlideDeck is saved."));
?>
<br />
                            </li>
                        </ul>
                    </div>
                    <div class="save-wrapper">
                        <input type="submit" class="button-primary" value="Update Options" />
                    </div>
                </formset>
            </form>
        </div>
    </div>
</div>
Пример #22
0
 function slidedeck_form_content_source($slidedeck, $source)
 {
     // Fail silently if the SlideDeck is not this type or source
     if (!$this->is_valid($source)) {
         return false;
     }
     global $wpdb;
     $ngg_active = false;
     $at_least_one_gallery = false;
     $at_least_one_album = false;
     // Check if NextGEN is activated
     if (is_plugin_active('nextgen-gallery/nggallery.php')) {
         $ngg_active = true;
     }
     if ($ngg_active) {
         // Get list of albums
         $sql = "\n                SELECT id, name FROM {$wpdb->prefix}ngg_album\n            ";
         $albums = $wpdb->get_results($sql, ARRAY_A);
         $ngg_albums = array('none' => __('Choose an album', $this->namespace));
         if ($albums) {
             foreach ($albums as $album) {
                 $ngg_albums[$album['id']] = $album['name'];
             }
             $at_least_one_album = true;
         }
         $html_input = array('type' => 'select', 'label' => "NextGEN Album", 'attr' => array('class' => 'fancy'), 'values' => $ngg_albums);
         $ngg_album_select = slidedeck2_html_input('options[ngg_album]', $slidedeck['options']['ngg_album'], $html_input, false);
         // Get list of galleries
         $sql = "\n                SELECT gid, title FROM {$wpdb->prefix}ngg_gallery\n            ";
         $galleries = $wpdb->get_results($sql, ARRAY_A);
         $ngg_galleries = array('none' => __('Choose a gallery', $this->namespace));
         if ($galleries) {
             foreach ($galleries as $gallery) {
                 $ngg_galleries[$gallery['gid']] = $gallery['title'];
             }
             $at_least_one_gallery = true;
         }
         $html_input = array('type' => 'select', 'label' => "NextGEN Gallery", 'attr' => array('class' => 'fancy'), 'values' => $ngg_galleries);
         $ngg_gallery_select = slidedeck2_html_input('options[ngg_gallery]', $slidedeck['options']['ngg_gallery'], $html_input, false);
     }
     include dirname(__FILE__) . '/views/show.php';
 }
You should have received a copy of the GNU General Public License
along with SlideDeck.  If not, see <http://www.gnu.org/licenses/>.
*/
if (!empty($taxonomies)) {
    ?>
	<ul>
	<?php 
    foreach ($taxonomies as &$taxonomy) {
        ?>
	    <?php 
        if (!empty($taxonomy->terms)) {
            $value = false;
            if (!empty($slidedeck['options']['taxonomies'][$taxonomy->name])) {
                $value = $slidedeck['options']['taxonomies'][$taxonomy->name];
            }
            ?>
	    	
	        <li class="taxonomy">
	        	<?php 
            slidedeck2_html_input("options[taxonomies][{$taxonomy->name}]", $value, array('type' => 'radio', 'label' => $taxonomy->label . ' <span class="count">(' . count($taxonomy->terms) . ')</span>', 'attr' => array('class' => 'fancy')));
            ?>
	    	</li>
	    <?php 
        }
        ?>
	<?php 
    }
    ?>
	</ul>
<?php 
}
<label class="label" for="options-feedCacheDuration"><?php 
_e("Cache Duration" . '<span class="tooltip" title="' . $tooltip . '"></span>', $this->namespace);
?>
</label>
<div class="jqueryui-slider-wrapper">
	<div id="cache-duration-slider" class="cache-slider content-source-slider"></div>
	<span class="ui-slider-value cache-slider-value"></span>
</div>
<?php 
if (!isset($slidedeck['options']['feedCacheDuration'])) {
    $slidedeck['options']['feedCacheDuration'] = 1800;
}
slidedeck2_html_input('options[feedCacheDuration]', $slidedeck['options']['feedCacheDuration'], array('type' => 'hidden', 'attr' => array('class' => 'feed-cache-duration', 'size' => 5, 'maxlength' => 5)));
?>

<div id="content-source-listofvideos">
    <input type="hidden" name="source" value="<?php 
echo $slidedeck['source'];
?>
" />
    <input type="hidden" name="type" value="<?php 
echo $this->type;
?>
" />
    <div class="inner">
        <div class="add-button-wrapper">
            <?php 
$tooltip = __("You can add video urls from YouTube, Vimeo, and Dailymotion", $this->namespace);
slidedeck2_html_input('add-video-field', '', array('label' => __("Enter URL" . '<span class="tooltip" title="' . $tooltip . '"></span>', $this->namespace), 'attr' => array('size' => 40, 'maxlength' => 255), 'required' => true));
?>
            <a class="list-of-videos-add add-button" href="#add"><?php 
_e("Add", $this->namespace);
?>
</a>
        </div>
    </div>
    <ul id="videos-sortable"><?php 
echo $urls_html;
?>
</ul>
    <?php 
include SLIDEDECK2_DIRNAME . '/views/elements/_flyout-action-row.php';
?>
</div>
Пример #26
0
foreach ((array) $_REQUEST as $key => $val) {
    ?>
            			<input type="hidden" name="<?php 
    echo $key;
    ?>
" value="<?php 
    echo $val;
    ?>
" />
        			<?php 
}
?>
        			<?php 
if (empty($license_key) && isset($_REQUEST['license_key']) && !empty($_REQUEST['license_key'])) {
    $license_key = $_REQUEST['license_key'];
}
?>
	                <?php 
slidedeck2_html_input('data[license_key]', $license_key, array('type' => 'password', 'attr' => array('class' => 'fancy license-key-text-field'), 'label' => "Update Your SlideDeck License Key"));
?>
	                <?php 
wp_nonce_field("{$this->namespace}_verify_addons_license_key", 'verify_addons_nonce');
?>
	                <a href="#verify" class="verify-license-key button">Verify</a>
            	</form>
            </div>
            <div class="addon-verification-response"></div>
        </div>
    </div>
</div>
Пример #27
0
            }
        </style>
    </head>
    <body class="insert-iframe-modal">
        <form action="<?php 
echo admin_url('admin-ajax.php');
?>
" method="GET" id="slidedeck-insert-iframe-form">
            <div id="slidedeck-insert-iframe-section-header" class="slidedeck-header">
                <h1><?php 
_e("Choose a SlideDeck to insert:", $namespace);
?>
</h1>
                
                <?php 
slidedeck2_html_input('orderby', $orderby, array('type' => 'select', 'label' => "Arrange by:", 'attr' => array('class' => 'fancy'), 'values' => $order_options));
?>
                
                <input type="hidden" name="action" value="<?php 
echo $namespace;
?>
_insert_iframe_update" />
                <?php 
wp_nonce_field("slidedeck-update-insert-iframe", "_wpnonce_insert_update", false);
?>
                <?php 
wp_nonce_field("slidedeck-insert");
?>
            </div>
            
            <div id="slidedeck-insert-iframe-wrapper">
Пример #28
0
 /**
  * Gets the List of albums from a gplus user
  * 
  * @return string The HTML necessary for sselecting an album.
  */
 function get_gplus_albums_from_userid($user_id = false, $slidedeck = null)
 {
     $albums = false;
     $args = array('sslverify' => false);
     $feed_url = "https://picasaweb.google.com/data/feed/api/user/{$user_id}?alt=json&orderby=updated";
     if (isset($user_id) && !empty($user_id)) {
         // Create a cache key
         $cache_key = $slidedeck['id'] . $feed_url;
         // Attempt to read the cache (no cache)
         $albums = false;
         // If cache doesn't exist
         if (!$albums) {
             $albums = array();
             $response = wp_remote_get($feed_url, $args);
             if (!is_wp_error($response)) {
                 $response_json = json_decode($response['body']);
                 if (!empty($response_json)) {
                     foreach ($response_json->feed->entry as $key => $entry) {
                         // Only if the album has photos in it.
                         if (intval($entry->{'gphoto$numphotos'}->{'$t'}) > 0) {
                             $albums[$key] = array('album_id' => $entry->{'gphoto$id'}->{'$t'}, 'title' => $entry->title->{'$t'} . sprintf(_n(" (%d photo)", " (%d photos)", $entry->{'gphoto$numphotos'}->{'$t'}, $this->namespace), $entry->{'gphoto$numphotos'}->{'$t'}), 'thumbnail' => $entry->{'media$group'}->{'media$thumbnail'}[0]->url);
                         }
                     }
                 }
             } else {
                 return false;
             }
         }
     }
     $albums_select = array('recent' => __('Recent Images', $this->namespace));
     if ($albums) {
         foreach ($albums as $album) {
             $albums_select[$album['album_id']] = $album['title'];
         }
     }
     return slidedeck2_html_input('options[gplus_images_album]', $slidedeck['options']['gplus_images_album'], array('type' => 'select', 'label' => "Album", 'attr' => array('class' => 'fancy'), 'values' => $albums_select), false);
 }
Пример #29
0
You should have received a copy of the GNU General Public License
along with SlideDeck.  If not, see <http://www.gnu.org/licenses/>.
*/
?>

<div id="content-source-fivehundredpixels">
    <input type="hidden" name="source[]" value="<?php 
echo $this->name;
?>
" />
    <div class="inner">
        <ul class="content-source-fields">
            <li>
                <?php 
slidedeck2_html_input('options[fivehundredpixels_username]', $slidedeck['options']['fivehundredpixels_username'], array('label' => __("500px Username", $this->namespace), 'attr' => array('size' => 20, 'maxlength' => 255), 'required' => true));
?>
            </li>
            <li>
                <?php 
slidedeck2_html_input('options[fivehundredpixels_feed_type]', $slidedeck['options']['fivehundredpixels_feed_type'], array('type' => 'select', 'label' => __("Fetch From", $this->namespace), 'attr' => array('class' => 'fancy'), 'values' => $feed_types));
?>
            </li>
            <li>
                <?php 
slidedeck2_html_input('options[fivehundredpixels_category]', $slidedeck['options']['fivehundredpixels_category'], array('type' => 'select', 'label' => __("Only This Category", $this->namespace), 'attr' => array('class' => 'fancy'), 'values' => $categories));
?>
            </li>
        </ul>
    </div>
</div>
Пример #30
0
?>

<div id="content-source-rss">
    <input type="hidden" name="source" value="<?php 
echo $slidedeck['source'];
?>
" />
    <input type="hidden" name="type" value="<?php 
echo $this->type;
?>
" />
    <div class="inner">
        <ul class="content-source-fields">
            <li>
				<?php 
slidedeck2_html_input('options[feedUrl]', $slidedeck['options']['feedUrl'], array('label' => __("RSS Feed URL", $this->namespace), 'attr' => array('size' => 40, 'maxlength' => 255), 'required' => true));
?>
				<em><?php 
echo sprintf(__('Needs to be a valid RSS feed. See the %1$sW3C Feed Validator Service%2$s to check your feed. NOTE: Some servers are not configured to follow redirects, make sure you are using the feed URL&rsquo;s final destination URL.', $this->namespace), "<a href='http://validator.w3.org/feed/' target='_blank'>", "</a>");
?>
</em>
            </li>
            <li class="last rss cache-duration">
            	<?php 
$tooltip = __('This is how often we will fetch new data from the RSS feed', $this->namespace);
include SLIDEDECK2_DIRNAME . '/views/elements/_feed_cache_dration_slider.php';
?>
            </li>
        </ul>
    </div>
    <?php