Plugin Directory

Changeset 653153


Ignore:
Timestamp:
01/15/2013 08:09:19 PM (13 years ago)
Author:
andrearufo
Message:

Ver. 1.2

Location:
linear-tag-cloud
Files:
11 added
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • linear-tag-cloud/tags/1.1/index.php

    r653033 r653153  
    55Description: A tag clob with bars and not dimensions.
    66Author: Andrea Rufo
    7 Version: 1.1
     7Version: 0.1
    88Author URI: http://www.orangedropdesign.com/
    99
     
    3535        <p>
    3636        <label for="<?php echo $this->get_field_id( 'number' ); ?>">Max number of tags:</label>
    37         <input class="widefat" type="number" id="<?php echo $this->get_field_id( 'number' ); ?>" name="<?php echo $this->get_field_name( 'number' ); ?>" value="<?php echo $instance['number']; ?>" request /> 
     37        <input class="widefat" type="text" id="<?php echo $this->get_field_id( 'number' ); ?>" name="<?php echo $this->get_field_name( 'number' ); ?>" value="<?php echo $instance['number']; ?>" />   
    3838        </p>
    3939       
    4040        <p>
    4141        <label for="<?php echo $this->get_field_id( 'border' ); ?>">Border color:</label>
    42         <input class="widefat" type="color" id="<?php echo $this->get_field_id( 'border' ); ?>" name="<?php echo $this->get_field_name( 'border' ); ?>" value="<?php echo $instance['border']; ?>" />   
     42        <input class="widefat" type="text" id="<?php echo $this->get_field_id( 'border' ); ?>" name="<?php echo $this->get_field_name( 'border' ); ?>" value="<?php echo $instance['border']; ?>" />   
    4343        </p>
    4444       
    4545        <p>
    4646        <label for="<?php echo $this->get_field_id( 'background' ); ?>">Background color:</label>
    47         <input class="widefat" type="color" id="<?php echo $this->get_field_id( 'background' ); ?>" name="<?php echo $this->get_field_name( 'background' ); ?>" value="<?php echo $instance['background']; ?>" />   
     47        <input class="widefat" type="text" id="<?php echo $this->get_field_id( 'background' ); ?>" name="<?php echo $this->get_field_name( 'background' ); ?>" value="<?php echo $instance['background']; ?>" />   
    4848        </p>
    4949       
    5050        <p>
    51         <label for="<?php echo $this->get_field_id( 'color' ); ?>">Text color (applied on a tag):</label>
    52         <input class="widefat" type="color" id="<?php echo $this->get_field_id( 'color' ); ?>" name="<?php echo $this->get_field_name( 'color' ); ?>" value="<?php echo $instance['color']; ?>" /> 
     51        <label for="<?php echo $this->get_field_id( 'color' ); ?>">Text color:</label>
     52        <input class="widefat" type="text" id="<?php echo $this->get_field_id( 'color' ); ?>" name="<?php echo $this->get_field_name( 'color' ); ?>" value="<?php echo $instance['color']; ?>" />   
    5353        </p>
    5454           
     
    103103    }
    104104   
    105     //aggiorna i dati
     105    //update the input
    106106    public function update( $new_instance, $old_instance ){
    107107       
    108108        $instance = $old_instance;
    109         $instance['title'] = strip_tags( $new_instance['title'] );
    110         $instance['number'] = strip_tags( $new_instance['number'] );
    111         $instance['border'] = strip_tags( $new_instance['border'] );
    112         $instance['background'] = strip_tags( $new_instance['background'] );
    113         $instance['color'] = strip_tags( $new_instance['color'] );
     109        $instance['title']          = strip_tags( $new_instance['title'] );
     110        $instance['number']         = strip_tags( $new_instance['number'] );
     111        $instance['border']         = strip_tags( $new_instance['border'] );
     112        $instance['background']     = strip_tags( $new_instance['background'] );
     113        $instance['color']          = strip_tags( $new_instance['color'] );
    114114
    115115        return $instance;
     
    117117}
    118118
    119 //includo lo stile del widget
     119//add the plugin's css to the page
    120120add_action( 'wp_enqueue_scripts', 'ltc_add_my_stylesheet' );
    121121
    122122function ltc_add_my_stylesheet() {
    123     wp_register_style( 'ltc-style', plugins_url('style.css', __FILE__) );
     123    wp_register_style( 'ltc-style', plugins_url('ltc-style.css', __FILE__) );
    124124    wp_enqueue_style( 'ltc-style' );
    125125}
    126126
    127 // Custom get_tags function to support ignoring tags with less than $minnum posts.
     127//custom get_all_tags function to get all tags ordered by count whit $max number of elements
    128128function get_all_tags($max) {
    129129   
    130130    $args = array(
    131          'orderby'  =>  'count', 
     131         'orderby'  =>  'count',
    132132         'order'    =>  'DESC',   
    133133         'number'   =>  $max
     
    139139    $tags = array();
    140140
    141     foreach ($alltags as $tag) {
    142         //if ($tag->count < $minnum || $tag->count > $maxnum)
    143             //continue;
    144            
     141    foreach ($alltags as $tag){
    145142        array_push($tags, $tag);
    146143    }
     
    155152}
    156153
    157 // registro il widget
     154// register the widget
     155add_action( 'widgets_init', 'ltc_register_widgets' );
     156
    158157function ltc_register_widgets(){
    159158    register_widget( 'ltc_widget' );
    160159}
    161160
    162 add_action( 'widgets_init', 'ltc_register_widgets' );
    163 
    164161?>
  • linear-tag-cloud/tags/1.1/readme.txt

    r653033 r653153  
    11=== Linear Tag Cloud ===
    22Contributors: andrearufo
    3 Donate link: http://www.orangedropdesign.com
    4 Tags: bar chart, tag-cloud, responsive, widget, alternative tag
     3Donate link: www.orangedropdesign.com
     4Tags: bar chart, tag cloud, percentage, responsive, chart
    55Requires at least: 3
    66Tested up to: 3.5
     
    20202. Upload the folder `linear-tag-cloud` to the `/wp-content/plugins/` directory
    21213. Activate the plugin through the 'Plugins' menu in WordPress
    22 4. Add the widget in the sidebar areas and configure it whit max tag number, border color, bars color, link color
     224. Add the widget in the sidebar areas and configure it
    23235. Done!
    2424
    2525== Frequently asked questions ==
    2626
    27 = Is it possibile to configure it? =
     27= Is it possible to configure it? =
    2828Yes, you can configure max number of tags; background, text and border color of the bars
    29 
    30 = Can I change the style? =
    31 You can apply whatever CSS rules to the elements of the widget. The main class of the `div` contain the tag cloud is `.linear-tag-cloud`.
    3229
    3330== Screenshots ==
    3431
    35321. The control panel in the widget page on Wordpress admin panel
    36 2. An example of the application as widget in a custom theme
    37 3. An example of the application in the Twenty Twelve default Wordpress theme
     332. An example of the application
     343. An example of the application in the Twenty Twelve default Wordpress Theme
    3835
    3936== Changelog ==
    4037
    4138= 1.1 =
    42 * Some fix
    43 * Add HTML5 tags to admin panel
     39* Bug fix
     40* Add CSS rules
     41* Optimized code
    4442
    4543= 1.0 =
    46 * Max numbero of tags configurable
    47 * Background and border color configurable for bars
    48 * Text color configurable for link in the bars
     44* Bug fix
     45* HTML5 tag applied
    4946
    5047= 0.1 =
    5148* First release
     49* Max number of tags configurable
     50* Background and border color configurable for bars
     51* Text color configurable for link in the bars
    5252
    5353== Upgrade notice ==
  • linear-tag-cloud/trunk/index.php

    r653024 r653153  
    55Description: A tag clob with bars and not dimensions.
    66Author: Andrea Rufo
    7 Version: 1.1
     7Version: 0.1
    88Author URI: http://www.orangedropdesign.com/
    99
     
    3535        <p>
    3636        <label for="<?php echo $this->get_field_id( 'number' ); ?>">Max number of tags:</label>
    37         <input class="widefat" type="number" id="<?php echo $this->get_field_id( 'number' ); ?>" name="<?php echo $this->get_field_name( 'number' ); ?>" value="<?php echo $instance['number']; ?>" request /> 
     37        <input class="widefat" type="text" id="<?php echo $this->get_field_id( 'number' ); ?>" name="<?php echo $this->get_field_name( 'number' ); ?>" value="<?php echo $instance['number']; ?>" />   
    3838        </p>
    3939       
    4040        <p>
    4141        <label for="<?php echo $this->get_field_id( 'border' ); ?>">Border color:</label>
    42         <input class="widefat" type="color" id="<?php echo $this->get_field_id( 'border' ); ?>" name="<?php echo $this->get_field_name( 'border' ); ?>" value="<?php echo $instance['border']; ?>" />   
     42        <input class="widefat" type="text" id="<?php echo $this->get_field_id( 'border' ); ?>" name="<?php echo $this->get_field_name( 'border' ); ?>" value="<?php echo $instance['border']; ?>" />   
    4343        </p>
    4444       
    4545        <p>
    4646        <label for="<?php echo $this->get_field_id( 'background' ); ?>">Background color:</label>
    47         <input class="widefat" type="color" id="<?php echo $this->get_field_id( 'background' ); ?>" name="<?php echo $this->get_field_name( 'background' ); ?>" value="<?php echo $instance['background']; ?>" />   
     47        <input class="widefat" type="text" id="<?php echo $this->get_field_id( 'background' ); ?>" name="<?php echo $this->get_field_name( 'background' ); ?>" value="<?php echo $instance['background']; ?>" />   
    4848        </p>
    4949       
    5050        <p>
    51         <label for="<?php echo $this->get_field_id( 'color' ); ?>">Text color (applied on a tag):</label>
    52         <input class="widefat" type="color" id="<?php echo $this->get_field_id( 'color' ); ?>" name="<?php echo $this->get_field_name( 'color' ); ?>" value="<?php echo $instance['color']; ?>" /> 
     51        <label for="<?php echo $this->get_field_id( 'color' ); ?>">Text color:</label>
     52        <input class="widefat" type="text" id="<?php echo $this->get_field_id( 'color' ); ?>" name="<?php echo $this->get_field_name( 'color' ); ?>" value="<?php echo $instance['color']; ?>" />   
    5353        </p>
    5454           
     
    103103    }
    104104   
    105     //aggiorna i dati
     105    //update the input
    106106    public function update( $new_instance, $old_instance ){
    107107       
    108108        $instance = $old_instance;
    109         $instance['title'] = strip_tags( $new_instance['title'] );
    110         $instance['number'] = strip_tags( $new_instance['number'] );
    111         $instance['border'] = strip_tags( $new_instance['border'] );
    112         $instance['background'] = strip_tags( $new_instance['background'] );
    113         $instance['color'] = strip_tags( $new_instance['color'] );
     109        $instance['title']          = strip_tags( $new_instance['title'] );
     110        $instance['number']         = strip_tags( $new_instance['number'] );
     111        $instance['border']         = strip_tags( $new_instance['border'] );
     112        $instance['background']     = strip_tags( $new_instance['background'] );
     113        $instance['color']          = strip_tags( $new_instance['color'] );
    114114
    115115        return $instance;
     
    117117}
    118118
    119 //includo lo stile del widget
     119//add the plugin's css to the page
    120120add_action( 'wp_enqueue_scripts', 'ltc_add_my_stylesheet' );
    121121
    122122function ltc_add_my_stylesheet() {
    123     wp_register_style( 'ltc-style', plugins_url('style.css', __FILE__) );
     123    wp_register_style( 'ltc-style', plugins_url('ltc-style.css', __FILE__) );
    124124    wp_enqueue_style( 'ltc-style' );
    125125}
    126126
    127 // Custom get_tags function to support ignoring tags with less than $minnum posts.
     127//custom get_all_tags function to get all tags ordered by count whit $max number of elements
    128128function get_all_tags($max) {
    129129   
    130130    $args = array(
    131          'orderby'  =>  'count', 
     131         'orderby'  =>  'count',
    132132         'order'    =>  'DESC',   
    133133         'number'   =>  $max
     
    139139    $tags = array();
    140140
    141     foreach ($alltags as $tag) {
    142         //if ($tag->count < $minnum || $tag->count > $maxnum)
    143             //continue;
    144            
     141    foreach ($alltags as $tag){
    145142        array_push($tags, $tag);
    146143    }
     
    155152}
    156153
    157 // registro il widget
     154// register the widget
     155add_action( 'widgets_init', 'ltc_register_widgets' );
     156
    158157function ltc_register_widgets(){
    159158    register_widget( 'ltc_widget' );
    160159}
    161160
    162 add_action( 'widgets_init', 'ltc_register_widgets' );
    163 
    164161?>
  • linear-tag-cloud/trunk/readme.txt

    r653033 r653153  
    11=== Linear Tag Cloud ===
    22Contributors: andrearufo
    3 Donate link: http://www.orangedropdesign.com
    4 Tags: bar chart, tag-cloud, responsive, widget, alternative tag
     3Donate link: www.orangedropdesign.com
     4Tags: bar chart, tag cloud, percentage, responsive, chart
    55Requires at least: 3
    66Tested up to: 3.5
    7 Stable tag: 1.1
     7Stable tag: 1.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    20202. Upload the folder `linear-tag-cloud` to the `/wp-content/plugins/` directory
    21213. Activate the plugin through the 'Plugins' menu in WordPress
    22 4. Add the widget in the sidebar areas and configure it whit max tag number, border color, bars color, link color
     224. Add the widget in the sidebar areas and configure it
    23235. Done!
    2424
    2525== Frequently asked questions ==
    2626
    27 = Is it possibile to configure it? =
     27= Is it possible to configure it? =
    2828Yes, you can configure max number of tags; background, text and border color of the bars
    29 
    30 = Can I change the style? =
    31 You can apply whatever CSS rules to the elements of the widget. The main class of the `div` contain the tag cloud is `.linear-tag-cloud`.
    3229
    3330== Screenshots ==
    3431
    35321. The control panel in the widget page on Wordpress admin panel
    36 2. An example of the application as widget in a custom theme
    37 3. An example of the application in the Twenty Twelve default Wordpress theme
     332. An example of the application
     343. An example of the application in the Twenty Twelve default Wordpress Theme
    3835
    3936== Changelog ==
    4037
    4138= 1.1 =
    42 * Some fix
    43 * Add HTML5 tags to admin panel
     39* Bug fix
     40* Add CSS rules
     41* Optimized code
    4442
    4543= 1.0 =
    46 * Max numbero of tags configurable
    47 * Background and border color configurable for bars
    48 * Text color configurable for link in the bars
     44* Bug fix
     45* HTML5 tag applied
    4946
    5047= 0.1 =
    5148* First release
     49* Max number of tags configurable
     50* Background and border color configurable for bars
     51* Text color configurable for link in the bars
    5252
    5353== Upgrade notice ==
Note: See TracChangeset for help on using the changeset viewer.