Changeset 913656
- Timestamp:
- 05/14/2014 03:30:33 AM (10 years ago)
- Location:
- flickr-badges-widget
- Files:
-
- 12 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
flickr-badges-widget/trunk/css/dialog.css
r756020 r913656 229 229 } 230 230 .widget .ntotalWidgetBg { 231 background: url("../img/background.png") no-repeat scroll left top transparent;231 background: url("../img/background.png") no-repeat scroll left top ; 232 232 border-top: 1px solid #E4E4E4; 233 233 position: relative; -
flickr-badges-widget/trunk/index.php
r756020 r913656 2 2 /* 3 3 Plugin Name: Flickr Badges Widget 4 Plugin URI: http:// zourbuth.com/archives/500/flickr-badge-widget/4 Plugin URI: http://-widget/ 5 5 Description: Display your Flickr latest photostream in widget area using javascript. Easy to customize, just put your Flickr id and your widget ready to lunch. 6 Version: 1.2. 56 Version: 1.2. 7 7 Author: zourbuth 8 8 Author URI: http://zourbuth.com 9 9 License: Under GPL2 10 10 11 Copyright 201 3zourbuth (email : zourbuth@gmail.com)11 Copyright 201 zourbuth (email : zourbuth@gmail.com) 12 12 13 13 This program is free software; you can redistribute it and/or modify … … 38 38 * @since 1.0 39 39 */ 40 define( 'FLICKR_BADGES_WIDGET_VERSION', '1.2. 5' );40 define( 'FLICKR_BADGES_WIDGET_VERSION', '1.2.' ); 41 41 define( 'FLICKR_BADGES_WIDGET_DIR', plugin_dir_path( __FILE__ ) ); 42 42 define( 'FLICKR_BADGES_WIDGET_URL', plugin_dir_url( __FILE__ ) ); -
flickr-badges-widget/trunk/readme.txt
r756020 r913656 2 2 Contributors: zourbuth 3 3 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W6D3WAJTVKAFC 4 Tags: flickr, widget, badge, feed, photostream, javascript, sidebar, gallery, photo, photo gallery, photography, sidebar, user, group, image, images, recent, random 5 Requires at least: 3. 64 Tags: flickr, widget, badge, feed, photostream, javascript, sidebar, gallery, photo, photo gallery, photography, sidebar, user, group, image, images, recent, random 5 Requires at least: 3. 6 6 Tested up to: 3.0 7 Stable tag: 1.2. 57 Stable tag: 1.2. 8 8 9 Display your Flickr latest photostream in a sidebar widget area.9 . 10 10 11 11 == Description == … … 22 22 <li>Flickr NSID support.</li> 23 23 <li>Get the image from recent or use random function.</li> 24 24 25 <li>Intro text for additional text before the widget content.</li> 25 26 <li>Outro text for additional text after the widget content.</li> … … 28 29 29 30 <h3><strong>Usefull Links</strong></h3> 30 <a href="http:// zourbuth.com/?p=500">Flickr Badges Widget - Free WordPress Plugin</a><br />31 <a href="http://</a><br /> 31 32 <a href="http://goo.gl/PM6rZ">Flickr NSID Lookup</a> 32 33 … … 35 36 Having trouble installing? Or need some custom modifications that aren’t already included? 36 37 Or you want more features on next release? Please leave messages or comments here:<br /> 37 http:// zourbuth.com/archives/500/flickr-badges-widget-free-wordpress-plugin/38 http:/// 38 39 39 40 == Installation == … … 46 47 47 48 = Features Request & Support = 48 http:// zourbuth.com/archives/500/flickr-badges-widget-free-wordpress-plugin/49 http:/// 49 50 50 51 = Flickr NSID Lookup = … … 53 54 54 55 == Screenshots == 55 56 More screenshots at http://www.ground6.com/wordpress-plugins/flickr-badges-widget/screenshots/ 56 57 1. Widget Settings 57 58 2. Widget in frontend 58 59 59 60 == Changelog == 61 62 63 64 60 65 61 66 = 1.2.5 = -
flickr-badges-widget/trunk/widget.php
r756020 r913656 40 40 // Load additional scripts and styles file to the widget admin area 41 41 add_action( 'load-widgets.php', array(&$this, 'widget_admin') ); 42 add_action('wp_ajax_fes_load_utility', array(&$this, 'fes_load_utility') );43 42 44 43 // Load the widget stylesheet for the widgets screen. … … 70 69 wp_enqueue_style( 'z-flickr-admin', FLICKR_BADGES_WIDGET_URL . 'css/dialog.css' ); 71 70 wp_enqueue_script( 'jquery' ); 72 wp_enqueue_script( 'z-flickr-admin', FLICKR_BADGES_WIDGET_URL . 'js/jquery.dialog.js' ); 73 wp_localize_script( 'z-flickr-admin', 'fes', array( 74 'nonce' => wp_create_nonce( 'fes-nonce' ), // generate a nonce for further checking below 75 'action' => 'fes_load_utility' 76 )); 71 wp_enqueue_script( 'z-flickr-admin', FLICKR_BADGES_WIDGET_URL . 'js/jquery.dialog.js' ); 77 72 } 78 73 … … 86 81 function fes_load_utility() { 87 82 // Check the nonce and if not isset the id, just die. 88 $nonce = $_POST['nonce']; 89 if ( ! wp_verify_nonce( $nonce, 'fes-nonce' ) ) 90 die(); 91 92 $ch = curl_init('http://marketplace.envato.com/api/edge/new-files-from-user:zourbuth,codecanyon.json'); 93 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 94 $data = curl_exec($ch); 95 curl_close($ch); 96 $data = json_decode($data); 97 98 $i = 0; $html = ''; 99 if( $data ) { 100 $i = 0; 101 foreach( $data->{'new-files-from-user'} as $key => $value ) { 102 if( $i < 15 ) { 103 $html .= '<a href="'.$value->url.'?ref=zourbuth"><img src="'.$value->thumbnail.'"></a> '; 104 $i++; 105 } 106 } 83 //$nonce = $_POST['nonce']; 84 //if ( ! wp_verify_nonce( $nonce, 'fes-nonce' ) ) 85 // die(); 86 87 if ( false === ( $res = get_transient( '_premium_plugins' ) ) ) { 88 89 $request = wp_remote_get( "http://marketplace.envato.com/api/edge/collection:4204349.json" ); 90 91 if ( ! is_wp_error( $request ) ) 92 $res = json_decode( wp_remote_retrieve_body( $request ) ); 93 94 set_transient( '_premium_plugins', $res, 60*60*24*7 ); // cache for a week 107 95 } 108 echo $html; 109 exit; 96 97 if( isset( $res->collection ) ) 98 foreach( $res->collection as $item ) 99 echo "<a href='{$item->url}?ref=zourbuth'><img src='{$item->thumbnail}'></a> "; 110 100 } 111 101 … … 145 135 echo '<p>' . do_shortcode( $instance['intro_text'] ) . '</p>'; 146 136 147 echo "<div class=' zframe-flickr-wrap-$dir'>";137 echo "<div class='zframe-flickr-wrap-$dir'>"; 148 138 149 139 // If the widget have an ID, we can continue … … 343 333 <ul> 344 334 <li> 345 <h 3><?php _e( 'Zourbuth Blog Feeds', $this->textdomain ) ; ?></h3>346 <?php wp_widget_rss_output( 'http:// zourbuth.com/feed/', array( 'items' => 10 ) ); ?>335 <h> 336 <?php wp_widget_rss_output( 'http:///feed/', array( 'items' => 10 ) ); ?> 347 337 </li> 348 338 </ul> … … 352 342 <li> 353 343 <p><strong>Our Premium Plugins</strong></p> 354 < div class="fesem"></div>344 <> 355 345 </li> 356 346 <li> 347 348 357 349 <a href="http://feedburner.google.com/fb/a/mailverify?uri=zourbuth&loc=en_US">Subscribe to zourbuth by Email</a><br /> 358 350 <?php _e( 'Like my work? Please consider to ', $this->textdomain ); ?><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W6D3WAJTVKAFC" title="Donate"><?php _e( 'donate', $this->textdomain ); ?></a>.<br /><br /> … … 366 358 367 359 </ul> 368 </div> 369 <script type='text/javascript'> 370 jQuery(document).ready(function($){ 371 $(document).on("click", ".fes-3", function(){ 372 var c, t; 373 t = $(this); 374 c = t.parents(".totalControls").find(".fesem"); 375 376 if ( c.is(':empty')) { 377 c.append("<span class='fes-loading total-loading'>Loading item...</span>"); 378 $.post( ajaxurl, { action: fes.action, nonce : fes.nonce }, function(data){ 379 $(".fes-loading").remove(); 380 c.append(data); 381 }); 382 } 383 }); 384 }); 385 </script> 360 </div> 386 361 <?php 387 362 }
Note: See TracChangeset
for help on using the changeset viewer.