Changeset 1089386
- Timestamp:
- 02/13/2015 08:47:39 PM (11 years ago)
- Location:
- broadednet/trunk
- Files:
-
- 2 edited
-
broadedNET.php (modified) (8 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
broadednet/trunk/broadedNET.php
r1002648 r1089386 5 5 Description: A wide network for blog promotion and traffic 6 6 Author: Enstine Muki 7 Version: 1. 27 Version: 1.3 8 8 Author URI: http://enstinemuki.com/ 9 9 */ … … 25 25 $BPN_Num = $instance['BPN_Num']; 26 26 $BPN_url= $instance['BPN_url']; 27 $show_gravatar= $instance['show_gravatar']; 28 $gravatar_size = $instance['gravatar_size']; 27 29 $BPN_cat= $instance['BPN_cat']; 28 30 $BPN_camtype=$instance['BPN_camtype']; … … 38 40 $BPN_camtype=''; 39 41 $BPN_custom_widget=''; 42 $gravatar_size='80'; 43 $show_gravatar='on'; 40 44 } 41 45 ?> … … 96 100 <input class="widefat" id="<?php echo $this->get_field_id('BPN_Num'); ?>" name="<?php echo $this->get_field_name('BPN_Num'); ?>" type="text" value="<?php echo $BPN_Num; ?>" /> 97 101 </p> 102 <p>Show Gravatar 103 <input class="checkbox" type="checkbox" <?php checked($instance['show_gravatar'], 'on'); ?> id="<?php echo $this->get_field_id('show_gravatar'); ?>" name="<?php echo $this->get_field_name('show_gravatar'); ?>" /> </p> 104 105 <p>Gravatar Size (Default is 80) 106 <input class="widefat" id="<?php echo $this->get_field_id('gravatar_size'); ?>" name="<?php echo $this->get_field_name('gravatar_size'); ?>" type="text" value="<?php echo $gravatar_size; ?>" /> 107 </p> 108 109 110 98 111 99 112 <p>Show <i>Powered by</i> Link (Articles) … … 114 127 $new_instance['BPN_Num'] = 5; 115 128 } 129 ///////////////////////Set default gravata 130 if(empty($new_instance['gravatar_size'])) 131 { 132 $new_instance['gravatar_size'] = 80; 133 } 134 if($new_instance['gravatar_size'] > 80 ) 135 { 136 $new_instance['gravatar_size'] = 80; 137 } 138 ///////////////////////////////////////// 116 139 $instance['title'] = strip_tags(trim($new_instance['title'])); 117 140 $instance['BPNapi'] = strip_tags(trim($new_instance['BPNapi'])); … … 121 144 $instance['BPN_camtype'] = strip_tags($new_instance['BPN_camtype']); 122 145 $instance['BPN_custom_widget'] = strip_tags(trim($new_instance['BPN_custom_widget'])); 146 $instance['show_gravatar'] = strip_tags($new_instance['show_gravatar']); 147 $instance['gravatar_size'] = strip_tags($new_instance['gravatar_size']); 123 148 124 149 return $instance; … … 136 161 $BPN_camtype=$instance['BPN_camtype']; 137 162 $BPN_custom_widget = $instance['BPN_custom_widget']; 163 $show_gravatar= $instance['show_gravatar']; 164 $gravatar_size = $instance['gravatar_size']; 165 $gravatarOption="showGravatar=$show_gravatar&dsize=$gravatar_size"; 138 166 echo $before_widget; 139 167 if (!empty($title)) … … 155 183 $external="camtype=$BPN_camtype"; 156 184 } 157 $extQuery="?MyCustomWidget=$BPN_camtype&MyCustomWidgetId=$BPN_custom_widget&api=$BPNapi&num=$BPN_Num&r=".$_SERVER['HTTP_HOST']."&url=$BPN_url&cat=$BPN_cat&$external ";185 $extQuery="?MyCustomWidget=$BPN_camtype&MyCustomWidgetId=$BPN_custom_widget&api=$BPNapi&num=$BPN_Num&r=".$_SERVER['HTTP_HOST']."&url=$BPN_url&cat=$BPN_cat&$external&$gravatarOption"; 158 186 159 187 $ch = curl_init(); -
broadednet/trunk/readme.txt
r1002648 r1089386 4 4 Donate link: http://broaded.net 5 5 Requires at least: 3.0 6 Tested up to: 4. 06 Tested up to: 4.1 7 7 Stable tag: trunk 8 8 License: GPLv2 or later … … 26 26 == Screenshots == 27 27 1. BroadedNet Widget configuration 28 2. This is how the widget looks like on one blog in the network. This widget is configured to show gravatar of bloggers who posted campaings. 29 3. Here is the widget on another blog, this time configured not to show gravatar. Note that the widget takes the inbuilt design of your theme. 28 30 29 31 == Changelog == 32 33 1.3 Added more widget features 30 34 31 35 1.2 Security update … … 36 40 37 41 == Upgrade Notice == 42 1.3 More features were added on the widet in this version 43 38 44 1.2 Security update 39 45
Note: See TracChangeset
for help on using the changeset viewer.