Plugin Directory

Changeset 1001244


Ignore:
Timestamp:
10/03/2014 12:59:56 PM (11 years ago)
Author:
emuki
Message:

version 1.1 upload

Location:
broadednet/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • broadednet/trunk/broadedNET.php

    r972617 r1001244  
    11<?php
    22/*
    3 Plugin Name: BroadedNET
     3Plugin Name: BroadedNet
    44Plugin URI: http://broaded.net/
    55Description: A wide network for blog promotion and traffic
    66Author: Enstine Muki
    7 Version: 1.0
     7Version: 1.1
    88Author URI: http://enstinemuki.com/
    99*/
     
    1313  {
    1414    $widget_ops = array('classname' => 'BroadedNet', 'description' => 'A wide network for blog promotion and traffic' );
    15     $this->WP_Widget('BroadedNet', 'BroadedNET', $widget_ops);
     15    $this->WP_Widget('BroadedNet', 'BroadedNet', $widget_ops);
    1616  }
    1717
     
    2727$BPN_cat= $instance['BPN_cat'];
    2828$BPN_camtype=$instance['BPN_camtype'];
     29$BPN_custom_widget=$instance['BPN_custom_widget'];
    2930    }
    3031    else
     
    3637        $BPN_cat='1';
    3738        $BPN_camtype='';
     39        $BPN_custom_widget='';
    3840    }
    3941?>
     
    7678<label for="<?php echo $this->get_field_id('BPN_camtype'); ?>"><?php _e('What to show on this widget', 'wp_widget_plugin'); ?></label>
    7779<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>
    7982<option value="300x250" <?php selected($BPN_camtype, "300x250" );?>>300x250 Banner</option>
    8083<option value="250x250" <?php selected($BPN_camtype, "250x250" );?>>250x250 Banner</option>
     
    8588
    8689<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>
    8896<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; ?>" />
    8997</p>
    9098
    91 <p>Show BPN Link (Articles)
     99<p>Show <i>Powered by</i> Link (Articles)
    92100<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>
    93101
     
    102110        $new_instance['BPN_Num'] = 5;
    103111    }
    104 $instance['title'] = strip_tags($new_instance['title']);
    105 $instance['BPNapi'] = strip_tags($new_instance['BPNapi']);
     112if($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']));
    106118$instance['BPN_Num'] = strip_tags($new_instance['BPN_Num']);
    107119$instance['BPN_url'] = strip_tags($new_instance['BPN_url']);
    108120$instance['BPN_cat'] = strip_tags($new_instance['BPN_cat']);
    109121$instance['BPN_camtype'] = strip_tags($new_instance['BPN_camtype']);
     122$instance['BPN_custom_widget'] = strip_tags(trim($new_instance['BPN_custom_widget']));
    110123
    111124return $instance;
     
    122135$BPN_cat=$instance['BPN_cat'];
    123136$BPN_camtype=$instance['BPN_camtype'];
    124 
     137$BPN_custom_widget = $instance['BPN_custom_widget'];
    125138echo $before_widget;
    126139if (!empty($title))
     
    133146            $external="";
    134147        }
     148            elseif($BPN_camtype=="MyCustomWidget")
     149        {   
     150            /////Do something
     151            $external="";
     152        }
    135153            else
    136154        {
    137155            $external="camtype=$BPN_camtype";
    138156        }
    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";
    140158
    141159$ch = curl_init();
  • broadednet/trunk/readme.txt

    r991270 r1001244  
    1 === MyCommentAuthors ===
     1=== BroadedNet ===
    22Contributors: emuki
    3 Tags: blog,blog traffic,blog netwok,blog community,blog promote
     3Tags: blog,blog traffic,blog netwok,blog community,blog promote,blog promotion tool,traffic
    44Donate link: http://broaded.net
    55Requires at least: 3.0
     
    2929== Changelog ==
    3030
     311.1 Bug correction
     32
    31331.0 Initial release
    3234
    3335== Upgrade Notice ==
    34 1.0 is the current stable version
     361.1 stable version
     37
     381.0 Initial release
Note: See TracChangeset for help on using the changeset viewer.