Flickr Badges Widget - Version 1.2.6

Version Description

  • Fixed widget transparent background
  • Updated to WordPress 3.9 compliance
Download this release

Release Info

Developer zourbuth
Plugin Icon 128x128 Flickr Badges Widget
Version 1.2.6
Comparing to
See all releases

Code changes from version 1.2.5 to 1.2.6

Files changed (4) hide show
  1. css/dialog.css +1 -1
  2. index.php +4 -4
  3. readme.txt +22 -12
  4. widget.php +22 -47
css/dialog.css CHANGED
@@ -228,7 +228,7 @@
228
  text-shadow: 1px 1px #FFFFFF;
229
  }
230
  .widget .ntotalWidgetBg {
231
- background: url("../img/background.png") no-repeat scroll left top transparent;
232
  border-top: 1px solid #E4E4E4;
233
  position: relative;
234
  }
228
  text-shadow: 1px 1px #FFFFFF;
229
  }
230
  .widget .ntotalWidgetBg {
231
+ background: url("../img/background.png") no-repeat scroll left top #F7F7F7;
232
  border-top: 1px solid #E4E4E4;
233
  position: relative;
234
  }
index.php CHANGED
@@ -1,14 +1,14 @@
1
  <?php
2
  /*
3
  Plugin Name: Flickr Badges Widget
4
- Plugin URI: http://zourbuth.com/archives/500/flickr-badge-widget/
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.5
7
  Author: zourbuth
8
  Author URI: http://zourbuth.com
9
  License: Under GPL2
10
 
11
- Copyright 2013 zourbuth (email : zourbuth@gmail.com)
12
 
13
  This program is free software; you can redistribute it and/or modify
14
  it under the terms of the GNU General Public License, version 2, as
@@ -37,7 +37,7 @@ if ( ! defined( 'ABSPATH' ) )
37
  * Set constant path to the members plugin directory
38
  * @since 1.0
39
  */
40
- define( 'FLICKR_BADGES_WIDGET_VERSION', '1.2.5' );
41
  define( 'FLICKR_BADGES_WIDGET_DIR', plugin_dir_path( __FILE__ ) );
42
  define( 'FLICKR_BADGES_WIDGET_URL', plugin_dir_url( __FILE__ ) );
43
 
1
  <?php
2
  /*
3
  Plugin Name: Flickr Badges Widget
4
+ Plugin URI: http://www.ground6.com/wordpress-plugins/flickr-badges-widget/
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.6
7
  Author: zourbuth
8
  Author URI: http://zourbuth.com
9
  License: Under GPL2
10
 
11
+ Copyright 2014 zourbuth (email : zourbuth@gmail.com)
12
 
13
  This program is free software; you can redistribute it and/or modify
14
  it under the terms of the GNU General Public License, version 2, as
37
  * Set constant path to the members plugin directory
38
  * @since 1.0
39
  */
40
+ define( 'FLICKR_BADGES_WIDGET_VERSION', '1.2.6' );
41
  define( 'FLICKR_BADGES_WIDGET_DIR', plugin_dir_path( __FILE__ ) );
42
  define( 'FLICKR_BADGES_WIDGET_URL', plugin_dir_url( __FILE__ ) );
43
 
readme.txt CHANGED
@@ -1,12 +1,12 @@
1
  === Flickr Badges Widget ===
2
  Contributors: zourbuth
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.6
6
  Tested up to: 3.0
7
- Stable tag: 1.2.5
8
 
9
- Display your Flickr latest photostream in a sidebar widget area.
10
 
11
  == Description ==
12
 
@@ -21,20 +21,25 @@ Just put your Flickr ID and your widget will be ready to lunch.
21
  <li>The type of images from user or group.</li>
22
  <li>Flickr NSID support.</li>
23
  <li>Get the image from recent or use random function.</li>
 
 
24
  <li>Intro text for additional text before the widget content.</li>
25
  <li>Outro text for additional text after the widget content.</li>
26
- <li>Custom scripts and stylesheets for each widget</li>
 
27
  </ul>
28
 
29
  <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://goo.gl/PM6rZ">Flickr NSID Lookup</a>
 
 
32
 
33
  <h3><strong>Question & Supports</strong></h3>
34
  This plugin does not match to your site style? Is this script not quite working as it should?
35
  Having trouble installing? Or need some custom modifications that aren’t already included?
36
  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
 
39
  == Installation ==
40
 
@@ -44,20 +49,25 @@ You can use the built in installer and upgrader, or you can install the plugin m
44
 
45
  == Frequently Asked Questions ==
46
 
 
 
 
47
  = Features Request & Support =
48
- http://zourbuth.com/archives/500/flickr-badges-widget-free-wordpress-plugin/
49
 
50
  = Flickr NSID Lookup =
51
  http://goo.gl/PM6rZ
52
 
53
 
54
  == Screenshots ==
55
-
56
- 1. Widget Settings
57
- 2. Widget in frontend
58
 
59
  == Changelog ==
60
 
 
 
 
 
61
  = 1.2.5 =
62
  * Image size added
63
 
1
  === Flickr Badges Widget ===
2
  Contributors: zourbuth
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, picture, image-widget
5
+ Requires at least: 3.9
6
  Tested up to: 3.0
7
+ Stable tag: 1.2.6
8
 
9
+ A fast plugin toisplay your Flickr photostream in a sidebar easily without authentication.
10
 
11
  == Description ==
12
 
21
  <li>The type of images from user or group.</li>
22
  <li>Flickr NSID support.</li>
23
  <li>Get the image from recent or use random function.</li>
24
+ <li>Displays up to 10 images.</li>
25
+ <li>Optional image sizes.</li>
26
  <li>Intro text for additional text before the widget content.</li>
27
  <li>Outro text for additional text after the widget content.</li>
28
+ <li>Custom scripts and stylesheets for each widget.</li>
29
+ <li>Free supports.</li>
30
  </ul>
31
 
32
  <h3><strong>Usefull Links</strong></h3>
33
+ <a href="http://www.ground6.com/wordpress-plugins/flickr-badges-widget/">Flickr Badges Widget Homepage</a><br />
34
+ <a href="http://www.ground6.com/wordpress-plugins/flickr-badges-widget/customizations/">Flickr Badges Widget Customizations</a><br />
35
+ <a href="http://goo.gl/PM6rZ">Flickr NSID Lookup</a><br />
36
+ <a href="http://www.flickr.com/badge_code_v2.gne">Flickr Badge Generator</a>
37
 
38
  <h3><strong>Question & Supports</strong></h3>
39
  This plugin does not match to your site style? Is this script not quite working as it should?
40
  Having trouble installing? Or need some custom modifications that aren’t already included?
41
  Or you want more features on next release? Please leave messages or comments here:<br />
42
+ http://www.ground6.com/wordpress-plugins/flickr-badges-widget/supports/
43
 
44
  == Installation ==
45
 
49
 
50
  == Frequently Asked Questions ==
51
 
52
+ = Customizations =
53
+ http://www.ground6.com/wordpress-plugins/flickr-badges-widget/customizations/
54
+
55
  = Features Request & Support =
56
+ http://www.ground6.com/wordpress-plugins/flickr-badges-widget/
57
 
58
  = Flickr NSID Lookup =
59
  http://goo.gl/PM6rZ
60
 
61
 
62
  == Screenshots ==
63
+ http://www.ground6.com/wordpress-plugins/flickr-badges-widget/screenshots/
 
 
64
 
65
  == Changelog ==
66
 
67
+ = 1.2.6 =
68
+ * Fixed widget transparent background
69
+ * Updated to WordPress 3.9 compliance
70
+
71
  = 1.2.5 =
72
  * Image size added
73
 
widget.php CHANGED
@@ -39,7 +39,6 @@ class Flickr_Badges_Widget extends WP_Widget {
39
 
40
  // Load additional scripts and styles file to the widget admin area
41
  add_action( 'load-widgets.php', array(&$this, 'widget_admin') );
42
- add_action('wp_ajax_fes_load_utility', array(&$this, 'fes_load_utility') );
43
 
44
  // Load the widget stylesheet for the widgets screen.
45
  if ( is_active_widget(false, false, $this->id_base, true) && !is_admin() ) {
@@ -69,11 +68,7 @@ class Flickr_Badges_Widget extends WP_Widget {
69
  function widget_admin() {
70
  wp_enqueue_style( 'z-flickr-admin', FLICKR_BADGES_WIDGET_URL . 'css/dialog.css' );
71
  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
- ));
77
  }
78
 
79
 
@@ -85,28 +80,23 @@ class Flickr_Badges_Widget extends WP_Widget {
85
  */
86
  function fes_load_utility() {
87
  // 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>&nbsp;';
104
- $i++;
105
- }
106
- }
107
  }
108
- echo $html;
109
- exit;
 
 
110
  }
111
 
112
 
@@ -144,7 +134,7 @@ class Flickr_Badges_Widget extends WP_Widget {
144
  if ( ! empty( $instance['intro_text'] ) )
145
  echo '<p>' . do_shortcode( $instance['intro_text'] ) . '</p>';
146
 
147
- echo "<div class='zframe-flickr-wrap-$dir'>";
148
 
149
  // If the widget have an ID, we can continue
150
  if ( ! empty( $instance['flickr_id'] ) )
@@ -342,8 +332,8 @@ class Flickr_Badges_Widget extends WP_Widget {
342
  <li class="tab-pane <?php if ( $instance['tab'][2] ) : ?>active<?php endif; ?>">
343
  <ul>
344
  <li>
345
- <h3><?php _e( 'Zourbuth Blog Feeds', $this->textdomain ) ; ?></h3>
346
- <?php wp_widget_rss_output( 'http://zourbuth.com/feed/', array( 'items' => 10 ) ); ?>
347
  </li>
348
  </ul>
349
  </li>
@@ -351,9 +341,11 @@ class Flickr_Badges_Widget extends WP_Widget {
351
  <ul>
352
  <li>
353
  <p><strong>Our Premium Plugins</strong></p>
354
- <div class="fesem"></div>
355
  </li>
356
  <li>
 
 
357
  <a href="http://feedburner.google.com/fb/a/mailverify?uri=zourbuth&amp;loc=en_US">Subscribe to zourbuth by Email</a><br />
358
  <?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 />
359
 
@@ -365,24 +357,7 @@ class Flickr_Badges_Widget extends WP_Widget {
365
  </li>
366
 
367
  </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>
386
  <?php
387
  }
388
  }
39
 
40
  // Load additional scripts and styles file to the widget admin area
41
  add_action( 'load-widgets.php', array(&$this, 'widget_admin') );
 
42
 
43
  // Load the widget stylesheet for the widgets screen.
44
  if ( is_active_widget(false, false, $this->id_base, true) && !is_admin() ) {
68
  function widget_admin() {
69
  wp_enqueue_style( 'z-flickr-admin', FLICKR_BADGES_WIDGET_URL . 'css/dialog.css' );
70
  wp_enqueue_script( 'jquery' );
71
+ wp_enqueue_script( 'z-flickr-admin', FLICKR_BADGES_WIDGET_URL . 'js/jquery.dialog.js' );
 
 
 
 
72
  }
73
 
74
 
80
  */
81
  function fes_load_utility() {
82
  // Check the nonce and if not isset the id, just die.
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
 
 
 
95
  }
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>&nbsp;";
100
  }
101
 
102
 
134
  if ( ! empty( $instance['intro_text'] ) )
135
  echo '<p>' . do_shortcode( $instance['intro_text'] ) . '</p>';
136
 
137
+ echo "<div class='flickr-badge-wrapper zframe-flickr-wrap-$dir'>";
138
 
139
  // If the widget have an ID, we can continue
140
  if ( ! empty( $instance['flickr_id'] ) )
332
  <li class="tab-pane <?php if ( $instance['tab'][2] ) : ?>active<?php endif; ?>">
333
  <ul>
334
  <li>
335
+ <h4><?php _e( 'Zourbuth Blog Feeds', $this->textdomain ) ; ?></h4>
336
+ <?php wp_widget_rss_output( 'http://www.codecheese.com/category/wordpress/feed/', array( 'items' => 10 ) ); ?>
337
  </li>
338
  </ul>
339
  </li>
341
  <ul>
342
  <li>
343
  <p><strong>Our Premium Plugins</strong></p>
344
+ <p><?php $this->fes_load_utility(); ?></p>
345
  </li>
346
  <li>
347
+ <a href="http://www.ground6.com/wordpress-plugins/flickr-badges-widget/"><b>Have a questions? Please feel free to contact supports section</b></a><br /><br />
348
+
349
  <a href="http://feedburner.google.com/fb/a/mailverify?uri=zourbuth&amp;loc=en_US">Subscribe to zourbuth by Email</a><br />
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 />
351
 
357
  </li>
358
 
359
  </ul>
360
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
361
  <?php
362
  }
363
  }