Changeset 1001244
- Timestamp:
- 10/03/2014 12:59:56 PM (11 years ago)
- Location:
- broadednet/trunk
- Files:
-
- 2 edited
-
broadedNET.php (modified) (9 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
broadednet/trunk/broadedNET.php
r972617 r1001244 1 1 <?php 2 2 /* 3 Plugin Name: BroadedN ET3 Plugin Name: BroadedNet 4 4 Plugin URI: http://broaded.net/ 5 5 Description: A wide network for blog promotion and traffic 6 6 Author: Enstine Muki 7 Version: 1. 07 Version: 1.1 8 8 Author URI: http://enstinemuki.com/ 9 9 */ … … 13 13 { 14 14 $widget_ops = array('classname' => 'BroadedNet', 'description' => 'A wide network for blog promotion and traffic' ); 15 $this->WP_Widget('BroadedNet', 'BroadedN ET', $widget_ops);15 $this->WP_Widget('BroadedNet', 'BroadedNet', $widget_ops); 16 16 } 17 17 … … 27 27 $BPN_cat= $instance['BPN_cat']; 28 28 $BPN_camtype=$instance['BPN_camtype']; 29 $BPN_custom_widget=$instance['BPN_custom_widget']; 29 30 } 30 31 else … … 36 37 $BPN_cat='1'; 37 38 $BPN_camtype=''; 39 $BPN_custom_widget=''; 38 40 } 39 41 ?> … … 76 78 <label for="<?php echo $this->get_field_id('BPN_camtype'); ?>"><?php _e('What to show on this widget', 'wp_widget_plugin'); ?></label> 77 79 <select name="<?php echo $this->get_field_name('BPN_camtype'); ?>"> 78 <option value="Article" <?php selected($BPN_camtype, "Article" );?>>Article Titles</option> 80 <option value="MyCustomWidget" <?php selected($BPN_camtype, "MyCustomWidget" );?>>My Custom Widget</option> 81 <option value="Article" <?php selected($BPN_camtype, "Article" );?>>Random Article Titles</option> 79 82 <option value="300x250" <?php selected($BPN_camtype, "300x250" );?>>300x250 Banner</option> 80 83 <option value="250x250" <?php selected($BPN_camtype, "250x250" );?>>250x250 Banner</option> … … 85 88 86 89 <p> 87 <label for="<?php echo $this->get_field_id('BPN_Num'); ?>"><?php _e('Num of Entries to show (Articles only)', 'wp_widget_plugin'); ?></label> 90 <label for="<?php echo $this->get_field_id('BPN_custom_widget'); ?>"><?php _e('Your Broaded Custom Widget ID', 'wp_widget_plugin'); ?></label> 91 <input class="widefat" id="<?php echo $this->get_field_id('BPN_custom_widget'); ?>" name="<?php echo $this->get_field_name('BPN_custom_widget'); ?>" type="text" value="<?php echo $BPN_custom_widget; ?>" /> 92 </p> 93 94 <p> 95 <label for="<?php echo $this->get_field_id('BPN_Num'); ?>"><?php _e('Num of Entries to show on this widget. Minimum is 5 (Articles only)', 'wp_widget_plugin'); ?></label> 88 96 <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; ?>" /> 89 97 </p> 90 98 91 <p>Show BPNLink (Articles)99 <p>Show <i>Powered by</i> Link (Articles) 92 100 <input class="checkbox" type="checkbox" <?php checked($instance['BPN_url'], 'on'); ?> id="<?php echo $this->get_field_id('BPN_url'); ?>" name="<?php echo $this->get_field_name('BPN_url'); ?>" /> </p> 93 101 … … 102 110 $new_instance['BPN_Num'] = 5; 103 111 } 104 $instance['title'] = strip_tags($new_instance['title']); 105 $instance['BPNapi'] = strip_tags($new_instance['BPNapi']); 112 if($new_instance['BPN_Num'] < 5 ) 113 { 114 $new_instance['BPN_Num'] = 5; 115 } 116 $instance['title'] = strip_tags(trim($new_instance['title'])); 117 $instance['BPNapi'] = strip_tags(trim($new_instance['BPNapi'])); 106 118 $instance['BPN_Num'] = strip_tags($new_instance['BPN_Num']); 107 119 $instance['BPN_url'] = strip_tags($new_instance['BPN_url']); 108 120 $instance['BPN_cat'] = strip_tags($new_instance['BPN_cat']); 109 121 $instance['BPN_camtype'] = strip_tags($new_instance['BPN_camtype']); 122 $instance['BPN_custom_widget'] = strip_tags(trim($new_instance['BPN_custom_widget'])); 110 123 111 124 return $instance; … … 122 135 $BPN_cat=$instance['BPN_cat']; 123 136 $BPN_camtype=$instance['BPN_camtype']; 124 137 $BPN_custom_widget = $instance['BPN_custom_widget']; 125 138 echo $before_widget; 126 139 if (!empty($title)) … … 133 146 $external=""; 134 147 } 148 elseif($BPN_camtype=="MyCustomWidget") 149 { 150 /////Do something 151 $external=""; 152 } 135 153 else 136 154 { 137 155 $external="camtype=$BPN_camtype"; 138 156 } 139 $extQuery="? api=$BPNapi&num=$BPN_Num&r=".$_SERVER['HTTP_HOST']."&url=$BPN_url&cat=$BPN_cat&$external";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"; 140 158 141 159 $ch = curl_init(); -
broadednet/trunk/readme.txt
r991270 r1001244 1 === MyCommentAuthors===1 === BroadedNet === 2 2 Contributors: emuki 3 Tags: blog,blog traffic,blog netwok,blog community,blog promote 3 Tags: blog,blog traffic,blog netwok,blog community,blog promote,blog promotion tool,traffic 4 4 Donate link: http://broaded.net 5 5 Requires at least: 3.0 … … 29 29 == Changelog == 30 30 31 1.1 Bug correction 32 31 33 1.0 Initial release 32 34 33 35 == Upgrade Notice == 34 1.0 is the current stable version 36 1.1 stable version 37 38 1.0 Initial release
Note: See TracChangeset
for help on using the changeset viewer.