Plugin Directory

Changeset 589646


Ignore:
Timestamp:
08/24/2012 05:38:33 AM (14 years ago)
Author:
submarine
Message:

trunking 2.2.3

Location:
category-icons/trunk
Files:
34 added
5 edited

Legend:

Unmodified
Added
Removed
  • category-icons/trunk/category_icons.css

    r572619 r589646  
    4141    margin: 0;
    4242    list-style: none;
    43     padding: <?php echo (strval($GLOBALS['wp_version']) < strval('2.5')) ? '15px 0 0px 25px' : '7px 0 15px 0'; ?> ;
     43    padding: '7px 0 15px 0' ;
    4444   
    4545}
  • category-icons/trunk/category_icons.php

    r572619 r589646  
    44Plugin URI: http://www.category-icons.com/
    55Description: Easily assign icons to your categories. (Minimum WP version : 2.8)
    6 Version: 2.2.1
     6Version: 2.2.3
    77Author: Brahim Machkouri
    88Author URI: http://www.category-icons.com/
     
    2828
    2929// Initialization and Hooks
    30 global $table_prefix;
     30global $table_prefix,$recent_posts_version;
    3131$wpdb->ig_caticons = $table_prefix.'ig_caticons';
    3232$caticons_datas = array();
     
    7878 */
    7979function get_cat_icon($params='') {
     80    $one_category_only = false;
     81   
     82    if (0 < (int) get_option('igcaticons_iconcatpage',0) ) {
     83        $one_category_only = true;
     84    }
     85     
    8086    // Compatibility with qTranslate
    8187    if (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
     
    8389        remove_filter('list_cats','qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage',0);
    8490    }
     91   
    8592    // Compatibility with SEO Friendly Images
    8693    if (function_exists('seo_friendly_images') && 1 == get_option('igcaticons_useseo_plugin'))
    8794        add_filter('category_icons', 'seo_friendly_images', 50);
    8895    parse_str($params, $p);
    89     if (!isset($p['fit_width'])) $p['fit_width'] = get_option('igcaticons_max_width');
    90     if (!isset($p['fit_height'])) $p['fit_height'] = get_option('igcaticons_max_height');
     96    if (!isset($p['fit_width'])) $p['fit_width'] = (int) get_option('igcaticons_max_width');
     97    if (!isset($p['fit_height'])) $p['fit_height'] = (int) get_option('igcaticons_max_height');
    9198    if (!isset($p['expand'])) $p['expand'] = false;
    92     if (!isset($p['small'])) $p['small'] = get_option('igcaticons_use_small');
     99    if (!isset($p['small'])) $p['small'] = (int) get_option('igcaticons_use_small');
    93100    if (!isset($p['prefix'])) $p['prefix'] = '';
    94101    if (!isset($p['suffix'])) $p['suffix'] = '';
    95102    if (!isset($p['class'])) $p['class'] = '';
    96103    if (!isset($p['link'])) $p['link'] = true;
    97     if (!isset($p['echo'])) $p['echo']=true;
     104    if (!isset($p['echo'])) $p['echo'] = true;
    98105    if (!isset($p['use_priority'])) $p['use_priority'] = false;
    99     if (!isset($p['max_icons'])) $p['max_icons'] = get_option('igcaticons_max_icons');
     106    if (!isset($p['max_icons'])) $p['max_icons'] = (int) get_option('igcaticons_max_icons');
     107   
    100108    if (!isset($p['align'])) $p['align'] = false;
    101109    if (!isset($p['hierarchical'])) $p['hierarchical'] = false;
     
    112120   
    113121    stripslaghes_gpc_arr($p);
    114     if (is_category() AND in_the_loop()) {
    115         $cat = get_query_var('cat');
     122    if (is_category() && in_the_loop() && $one_category_only == true ) {
     123        $cat = (int) get_query_var('cat');
    116124        $category=get_category($cat);
    117         $p['cat'][]=$category->cat_ID;
     125        if (!isset($p['cat']) || !is_array($p['cat'])) {
     126            $p['cat']=array();
     127        }
     128       
     129        $p['cat'][] = $category->cat_ID;
    118130    }
    119131    else {
     
    135147        if (!isset($p['cat'][0])) return;
    136148        if (!is_array($p['cat'])) {
    137             $categorie=$p['cat'];
     149            $categorie= (int) $p['cat'];
    138150            $p['cat'] = array();
    139151            $p['cat'][] = $categorie;
    140152        }
    141153    }
     154   
    142155    $nb_icons = 0;
    143156    $urlbegin = '';
     
    177190            }
    178191            list( $width , $height , $type , $attr) = getimagesize($file);
    179             $w = $width;
    180             $h = $height;
     192            $w = (int) $width;
     193            $h = (int) $height;
    181194            if (!empty($p['fit_width']) || !empty($p['fit_height']))
    182195                list($w, $h) = ig_caticons_fit_rect($width, $height, $p['fit_width'], $p['fit_height'], $p['expand']);
     
    190203            }
    191204            if (!$p['align']===false) $cat_icons .= 'align="'.$p['align'].'" ';
    192             $title = 'title="'.get_cat_name($p['cat'][$i]).'"';
    193             $alt = $title; 
     205            $fill_with_catname = get_cat_name($p['cat'][$i]);
     206            $title = 'title="'.$fill_with_catname.'"'; 
     207            $alt =  'alt="'.$fill_with_catname.'"';;//$title;   
    194208            if (function_exists('seo_friendly_images') && 1 == get_option('igcaticons_useseo_plugin'))  $title = '' ; // Compatibility with qTranslate
    195             $cat_icons .= 'src="'.$url.'" width="'.$w.'" height="'.$h.'" alt="'.$alt.'" '.$title.' />'.$urlend.$p['suffix'];
     209            $cat_icons .= 'src="'.$url.'" width="'.$w.'" height="'.$h.'" '.$alt.' '.$title.' />'.$urlend.$p['suffix'];
    196210            $nb_icons++;
    197211        }
     
    211225        else {
    212226            echo $cat_icons;
    213             return true; // if echo get_cat_icons() is used, true will be displayed as "1". So must the parameter echo=false must be used in this case.
     227            return true; // if echo get_cat_icon() is used, true will be displayed as "1". So the parameter echo=false must be used in this case.
    214228        }
    215229    }
     
    224238 */
    225239function bm_caticons_process_categories($string='') {   
     240    $caticons_processed = array();
    226241    $catlist = get_the_category($GLOBALS['post']->ID); 
    227242    if (count($catlist)>1) {
     
    277292                left join $wpdb->posts on $wpdb->term_relationships.object_id = $wpdb->posts.ID
    278293                where post_type = 'page' and $wpdb->term_taxonomy.taxonomy = 'category' and ID=";
    279     $nb_max_icons_page = get_option('igcaticons_max_icons');
     294    $nb_max_icons_page = (int) get_option('igcaticons_max_icons');
    280295    $cats = array();
    281296    if ($type != 'cat' && $type != 'page') {
    282297        $type = 'cat';
    283         if (version_compare($GLOBALS['wp_version'], '3.1', '>=') OR version_compare($GLOBALS['wp_version'], '3.1-RC2', '=')) {
     298        if (version_compare($GLOBALS['wp_version'], '3.1', '>=') ) {
    284299            $type = 'category_name';
    285300        }
     
    292307            $echo_output = false;
    293308        }
    294         if ( !isset($p['icons_only']) )
     309        if ( !isset($p['icons_only']) ) {
    295310            $p['icons_only']=0;
    296            
    297         if ( isset($p['icons_only']) && 'true' == strtolower( $p['icons_only'] ) )
     311        }   
     312        if ( isset($p['icons_only']) && 'true' == strtolower( $p['icons_only'] ) ) {
    298313            $p['icons_only']=1;
     314        }
    299315    }
    300316    if (!empty($list)) {
     
    305321            if ($pos>0) {
    306322                parse_str(substr($child[0],$pos, strlen($child[0])-$pos)); // $cat or $category_name is created from this function
    307                 if (isset($page) && $page >0) { // get the category from page id
     323                if (isset($page) && intval($page) >0) { // get the category from page id
    308324                    $cats = array();
    309                     $cats = $wpdb->get_results($wpdb->prepare($request.$page),ARRAY_A);
     325                    $cats = $wpdb->get_results($wpdb->prepare($request.intval($page)),ARRAY_A);
    310326                }
    311327                else {
    312                     if (version_compare($GLOBALS['wp_version'], '3.1', '>=') OR version_compare($GLOBALS['wp_version'], '3.1-RC2', '=')) {
     328                    if (version_compare($GLOBALS['wp_version'], '3.1', '>=')) {
    313329                        // standard permalinks in wp 3.1+: http://www.sublab.dev/wpdev/?category_name=apple
    314330                        $cats[] = bm_caticons_get_cat_ID_by_slug($category_name);
    315331                    }
    316332                    else { // standard permalinks in wp up to 3.0: http://www.sublab.dev/wpdev/?cat=3
    317                         $cats[] = $cat;
     333                        $cats[] = (int) $cat;
    318334                    }
    319335                }
     
    333349                    $cats = array();
    334350                    $page  = $wpdb->get_var($wpdb->prepare("SELECT ID FROM `$wpdb->posts` WHERE post_name = '$name'"),0,0);
    335                     $cats = $wpdb->get_results($wpdb->prepare($request.$page),ARRAY_A);
     351                    $cats = $wpdb->get_results($wpdb->prepare($request.intval($page)),ARRAY_A);
    336352                }
    337353            }
     
    360376                    $before_name = bm_caticons_getbool(get_option('igcaticons_before_name'));
    361377                    if ($before_name) { // put the html code of the icons before the category name
    362                         $child[1] = substr($child[1],1,strlen($child[1]));
    363                         $list = preg_replace('/'.$child[1].'/', $img.$child[1], $list, 1);
     378                        $cat_name = substr($child[1],1,strlen($child[1]));
     379                        $list = str_replace('>'.$cat_name, '>'.$img.$cat_name,$list);
    364380                    } else {// else after the category name
    365381                        $new = substr($child[1],0,strlen($child[1])-1);
     
    394410    else { // if no category id is found, this is ?cat=X given
    395411        list($dummy,$id) = explode('?cat=',$slug);
     412        $id = (int) $id;
    396413    }
    397414    return $id;
     
    521538    $files = array();
    522539    $results = array();
     540    $position = 0;
    523541    $correspondances = array();
    524542    $filename='';
     
    573591                        }
    574592                        else {// display the informations about the line and column
     593                            $position = 0;
    575594                            do {
    576595                                $position = strpos($string,$correspondance,$position); 
     
    656675 * @param string $filter Which type of table to display
    657676 */
    658 function bm_caticons_codetemplate_display($message,$code,$list,$filter) {
     677function bm_caticons_codetemplate_display($message,$list,$filter) {
    659678    $table = array();
    660679    foreach ($list as $element) {
     
    676695                <tbody>
    677696                <?php
     697                    $class = '';
    678698                    if ( 0 == count($list) )
    679699                        $list = array(array('-','-','-'));
     
    885905    global $wpdb;
    886906    $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
    887     if ( isset($_GET['deleteit']) && isset($_GET['delete']) )
     907    if ( isset($_GET['deleteit']) && isset($_GET['delete']) ) 
    888908        $action = 'bulk-delete';
    889909    switch($action) {
     
    925945        <div class="wrap">
    926946        <h2><?php _e('Select Category Icons','category_icons') ?></h2>
    927         <form method="post" action="">
     947        <form method="post" name="caticons-form1" action="">
     948          <?php wp_nonce_field('caticons-nonce'); ?>
    928949            <input type="hidden" name="ig_module" value="caticons" />
    929950            <input type="hidden" name="ig_tab" value="icons" />
     
    975996    ?>
    976997    <div class="wrap">
    977         <form id="posts-filter" action="" method="get">
     998        <form id="posts-filter" action="" method="get" name="caticons-form2">
     999        <?php wp_nonce_field('caticons-nonce'); ?>
    9781000            <input type="hidden" name="ig_module" value="caticons" />
    9791001            <input type="hidden" name="page" value="category_icons.php" />
     
    10381060    add_option('igcaticons_max_width','-1');
    10391061    add_option('igcaticons_max_height','-1');
     1062    add_option('igcaticons_iconcatpage','0');
    10401063}
    10411064
     
    10821105    bm_caticons_check_uploads_path();
    10831106    $tab = isset($_REQUEST['ig_tab']) ? $_REQUEST['ig_tab'] : '';
    1084     if (isset($_POST['info_update']) && 'options' == $tab) {
     1107    if (isset($_POST['info_update']) && 'options' == $tab && check_admin_referer('caticons-nonce')) {   
    10851108        ?><div class="updated"><p><strong><?php _e('Settings updated.','category_icons');?></strong></p></div><?php
    10861109        update_option('igcaticons_path', $_POST['igcaticons_path']);
     
    10891112        update_option('igcaticons_max_icons', $_POST['igcaticons_max_icons']);
    10901113        update_option('igcaticons_before_name', $_POST['igcaticons_before_name']);
    1091         update_option('igcaticons_templatecode_patch', $_POST['igcaticons_templatecode_patch']);
    1092         update_option('igcaticons_templatecode_sidebar', $_POST['igcaticons_templatecode_sidebar']);
    1093         update_option('igcaticons_rssfeeds', $_POST['igcaticons_rssfeeds']);
    1094         update_option('igcaticons_useseo_plugin', $_POST['igcaticons_useseo_plugin']);
    10951114        update_option('igcaticons_max_width', $_POST['igcaticons_max_width']);
    10961115        update_option('igcaticons_max_height', $_POST['igcaticons_max_height']);
     1116       
     1117        bm_caticons_updatemyoption('igcaticons_templatecode_patch');
     1118        bm_caticons_updatemyoption('igcaticons_templatecode_sidebar');
     1119        bm_caticons_updatemyoption('igcaticons_rssfeeds'); 
     1120        bm_caticons_updatemyoption('igcaticons_useseo_plugin');
     1121        bm_caticons_updatemyoption('igcaticons_iconcatpage');       
    10971122    }
    10981123   
     
    11111136}
    11121137
     1138// for the checkboxes options
     1139function bm_caticons_updatemyoption($option) {
     1140    if (isset($_POST[$option])) {
     1141        update_option($option, $_POST[$option]);
     1142    }
     1143    else {
     1144        update_option($option, 0);
     1145    } 
     1146}
    11131147/**
    11141148 * Display the menu (Icons, Options, Template Tags)
     
    11351169    list($def_path, $def_url) = ig_caticons_defupload();
    11361170?><div class="form-wrap">
    1137     <form method="post" action="">
     1171    <form method="post" action="" name="caticons-form3">
     1172    <?php wp_nonce_field('caticons-nonce'); ?>
    11381173    <input type="hidden" name="ig_module" value="caticons"/>
    11391174    <input type="hidden" name="ig_tab" value="options"/>
     
    11621197            </div>
    11631198                <label><input type="checkbox" name="igcaticons_rssfeeds" id="rssfeeds" value="1" <?php checked('1', get_option('igcaticons_rssfeeds')); ?> />&nbsp;<?php _e('Display category icons in RSS feeds','category_icons'); ?></label>
     1199                <label><input type="checkbox" name="igcaticons_iconcatpage" id="iconcatpage" value="1" <?php checked('1', get_option('igcaticons_iconcatpage')); ?> />&nbsp;<?php _e('Display only the icon of the selected category in the category page','category_icons'); ?></label>
     1200               
    11641201            <?php if (function_exists('seo_friendly_images')) : ?>
    11651202                <label><input type="checkbox" name="igcaticons_useseo_plugin" id="useseofriendlyimages" value="1" <?php checked('1', get_option('igcaticons_useseo_plugin')); ?> />
     
    12241261?>
    12251262<div class="wrap"><h2><?php
    1226             $ct = current_theme_info();
     1263            $ct = wp_get_theme();//current_theme_info();
    12271264            _e('Template Tags for','category_icons');
    12281265            echo ' '.$ct->name;
     
    12311268<?php
    12321269    if ( 0 < count($list) ) {   
    1233         bm_caticons_codetemplate_display($message,$code,$list,'get_cat_icon');
     1270        bm_caticons_codetemplate_display($message,$list,'get_cat_icon');
    12341271        if (get_option('igcaticons_templatecode_sidebar')==1) {
    12351272            echo '<h3><a target="_blank" href="http://www.category-icons.com/2008/03/12/function-put_cat_icon/">put_cat_icons()</a></h3>';
    12361273            $message = __('Replace the code','category_icons');
    1237             bm_caticons_codetemplate_display($message,$code,$list,'put_cat_icon');
     1274            bm_caticons_codetemplate_display($message,$list,'put_cat_icon');
    12381275        }
    12391276    }
     
    12951332    global $wpdb, $caticons_datas; 
    12961333   
    1297     $cat = $wpdb->escape($cat);
     1334    $cat = (int) $cat;//$wpdb->escape($cat);
    12981335    $result = false;
    12991336   
     
    13381375 */
    13391376function ig_caticons_fit_rect($width, $height, $max_width=-1, $max_height=-1, $expand=false) {
    1340     $h = $height;
    1341     $w = $width;
     1377    $h = (int) $height;
     1378    $w = (int) $width;
    13421379    if ($max_width>0 && ($w > $max_width || $expand)) {
    13431380        $w = $max_width;
     
    13641401 * @author Brahim Machkouri
    13651402 */
    1366 if (defined('OT_LIBRARY') AND OT_LIBRARY) {
    13671403    function otf_caticons($option_key, $result, $ext) {
    13681404        $categories = get_the_category($result->ID);
    13691405        return get_cat_icon('cat='.$categories[0]->term_id.'&echo=0');
    13701406    }
    1371 }
    1372 
    1373 ?>
  • category-icons/trunk/category_icons_widget.php

    r572619 r589646  
    3030        if (function_exists('mycategoryorder')) $o = $instance['order'] ? 'order' : 'name';
    3131        $cat_args = "orderby=";
    32         $cat_args .= function_exists('mycategoryorder') ?  $o : '';
     32        $cat_args .= function_exists('mycategoryorder') ?  $o : 'name';
    3333        $cat_args .= "&show_count={$c}&hierarchical={$h}&exclude={$exclude}&include={$include}";
    3434        $putcaticons_parameters = $instance['putcaticons_parameters'];
  • category-icons/trunk/changelog.txt

    r572619 r589646  
    11Changelog
     2
     32.2.3
     4* I've added an option in the panel settings for this : "in the category page, only that category icon is displ$
     5* Bug fixed : the options with a checkbox were not saved correctly (!)
     6
     72.2.2
     8* Bug fixed : if there was a call to get_cat_icon with an ID in the category page (category.php, for example), $
     9* Bug fixed in the widget : now the category names are displayed alphabetically.
     10* The plugin works with Wordpress Firewall 2.
     11* The datas pulled from the DB are escaped.
     12* Littles fixes.
    213
    3142.2
  • category-icons/trunk/readme.txt

    r572619 r589646  
    22Contributors: submarine
    33Donate link: http://www.category-icons.com/support-the-plugin/
    4 Tags: category, categories, icons, icon, image, images, post, posts, list, lists, manage, plugin, plugins, sidebar, horizontally, vertically, widget, admin, photo, photos, formatting, rss
     4Tags: category, categories, icons, icon, image, images, post, posts, list, lists, manage, plugin, plugins, sidebar, horizontally, vertically, widget, admin, photo, photos, formatting, rss, category icons
    55Requires at least: 2.8
    6 Tested up to: 3.4
    7 Stable tag: 2.2.1
    8 
    9 The No. 1 plugin to assign icons to categories.
     6Tested up to: 3.4.1
     7Stable tag: 2.2.3
     8License: GPLv2 or later
     9License URI: http://www.gnu.org/licenses/gpl-2.0.html
     10
     11The No. 1 plugin to assign icons to categories. Category Icons allows you to associate a unique image with each of your WordPress categories.
    1012
    1113== Description ==
    1214
    13 Assigns icons to categories with WordPress 2.8 or higher. This wonderful plugin :
     15This plugin allows you to associate a unique image with each of your WordPress categories in order to prettify your pages a bit. That will make your category pages look better than 90% of the category pages out there.
     16
     17Everything is configurable from the settings menu, you can use it on your index (home) page, post pages, or even your sidebar ! You can do icons only, or text and icons, and it comes with a widget for the sidebar. This wonderful plugin :
    1418
    1519* displays one or more icons in front of your post title or wherever you want 
    1620* displays icons in the sidebar, with or without the category name, with or without the help of the widget
    17 * includes a widget. You can : use multiple Category Icons widgets (for WordPress 2.5 and higher), include or exclude some categories, display only icons (i.e. without the category name)...
     21* includes a widget. You can use multiple Category Icons widgets, include or exclude some categories, display only icons (i.e. without the category name)...
    1822* you can make rollover with the icons in the sidebar if you follow [this tutorial](http://www.category-icons.com/2008/05/how-to-make-rollovers-with-jquery/)
    1923* is able to display category icons in your RSS
    20 * will either show you where to place the little code needed in your themes, or patch them automatically
     24* will either show you where to place the little code needed (template tag) in your themes
    2125* generates pure html code of the img tag, so it gives you the freedom of doing what you want to with the icons (customizing via CSS or not)
    2226* generates valid XHTML (and Strict XHTML)
    2327* can prioritize the icons display (by Oliver Weichhold)
    24 * is translated in more 20 languages (all the .po files are included, in case you want to update your language).
     28* is translated in more than 20 languages (all the .po files are included, in case you want to update your language).
    2529* is compatible with these powerful plugins :
    2630[My Category Order](http://wordpress.org/extend/plugins/my-category-order/),
     
    3135* is compatible with WordPress Network
    3236
     37There is also a [Lite version](http://wordpress.org/extend/plugins/category-icons-lite/).
     38
    3339== Frequently Asked Questions ==
    3440
    35 Please visit [the official website](http://www.category-icons.com/category/faq/ "Category Icons'FAQ") and [How-To](http://www.category-icons.com/category/howto/ "Category Icons' How-Tos"). Have a look at the how-to, you'll see that there're some tricks to do with it (rollovers, display specific icon, icon by default...).
    36 And don't miss the languages updates.
     41Please visit [the official website](http://www.category-icons.com/category/faq/ "Category Icons'FAQ") and [How-To](http://www.category-icons.com/category/howto/ "Category Icons' How-Tos"). Have a look at the how-to, there are some tricks to do with category icons (rollovers, display specific icon, icon by default...).
    3742
    3843== Installation ==
     
    5055== Screenshots ==
    5156
    52 [Please visit the category icons plugin page for screenshots & sample](http://www.category-icons.com/screenshots/)
    53 
    54 == Donate ==
    55 
    56 Any amount is welcome to support the development of the plugin.
    57 
    58 == I've found a bug, how can I tell you about it so you'll fix it for me? ==
    59 
    60 Go to http://www.category-icons.com/contact and fill out the contact form. Make sure you let me know the following:
    61 
    62 * What version of WordPress you're using
    63 * What other plugins you're running
    64 * Exactly what problem you're seeing
    65 
    66 Unfortunately, I do have a life outside of this plugin, so don't be sad if I don't fix the bug within 5 minutes. ;)
     57[Please visit the category icons plugin page for screenshots](http://www.category-icons.com/screenshots/)
     58
     59== Buy me a coffee ==
     60
     61If you like this plugin, or it has benefited you, [buy me a coffee](http://www.category-icons.com/support-the-plugin/).
    6762
    6863== Changelog ==
     64
     65= 2.2.3 =
     66* I've added an option in the panel settings for this : "in the category page, only that category icon is displayed in front of the title if the post has more than one category".
     67* Bug fixed : the options with a checkbox were not saved correctly (!)
     68
     69= 2.2.2 =
     70* Bug fixed : if there was a call to get_cat_icon with an ID in the category page (category.php, for example), there was an error : "Fatal error: [] operator not supported for strings".
     71* Bug fixed in the widget : now the category names are displayed alphabetically.
     72* The plugin works with Wordpress Firewall 2.
     73* The datas pulled from the DB are escaped.
     74* Littles fixes.
    6975
    7076= 2.2 =
     
    197203* New functionnality : in the parameters of put\_cat\_icons() function, if you put icons\_only=1, then only the icons will be displayed in the sidebar, instead of the icon AND the category name.
    198204
    199 example :
    200 
    201 if (function\_exists('put\_cat\_icons'))
    202    put\_cat\_icons( wp\_list\_categories('title\_li=&echo=0') ,'icons\_only=1');
    203 else
    204    wp\_list\_categories('title\_li=');
    205 
    206205= 1.7.7 =
    207206* The plugin is now compatible with the 'Top Level Categories' plugin.
     
    234233* new feature : you can now display the icons vertically, it's like a 'stack' of icons, thank to a new parameter for the function get\_cat\_icon() : vertical\_display. Set it to true if you want to use that feature.
    235234
    236 Example :
    237 
    238 get\_cat\_icon('vertical\_display=true');
    239 
    240 The 'stack' is generated thank to a div tag. That div tag has a class : caticons. So if you want to extend the style of the div tag, you can use css in style.css.
    241 
    242 Example of generated code :
    243 
    244 <div class="caticons" style="text-align:center;float:left;width: 32px;">[the\_icons\_are\_here]</div>
    245 
    246 Example of extending the class in style.css :
    247 
    248 .caticons,img {
    249     border:0 !important;
    250 }
    251 
    252235= 1.7 =
    253236* A few bugs are resolved.
    254237* Links & images are now W3 compliant.
    255238* New functionnality : you can prioritize the display of icons.
    256 From the author (Oliver):
    257 You can now assign numeric priorities to categories. The priority is used to select a single category icon for a post with multiple categories.
    258 
    259 Example: imagine we have a post with two categories:
    260 
    261 - Companies -> ACME Corp. (Icon: ACME.gif, Priority 10)
    262 - Products -> Milk (Icon: Milk.gif, Priority 20)
    263 
    264 If you now pass the new boolean parameter “use\_priority” to the get\_cat\_icon() function, it will only render Milk.gif because Products -> Milk has the highest priority of all categories for the post.
    265 * You can display icons in the sidebar. you just have to use the new function : put\_cat\_icons(). Example of use :
    266 put\_cat\_icons(wp\_list\_categories('show\_count=1&title\_li=<h2>Categories</h2&echo=0'));
    267 You can add any parameters to wp\_list\_categories(), but you MUST add echo=0.
    268 
    269 The function put\_cat\_icons() accepts 2 parameters :
    270     first parameter : the list to process (from the wp\_list\_categories()),
    271     second parameter : a string representing the same parameters as get\_cat\_icons().
    272 * You can define the maximum number of icons to be displayed in front of the posts titles in Options.
     239* You can display icons in the sidebar. you just have to use the new function : put\_cat\_icons(). * You can define the maximum number of icons to be displayed in front of the posts titles in Options.
    273240* You can translate the plugin into your own language thanks to the .pot file provided with the plugin
    274241If you translate it to another language than french, thank to send it to me in order to put it online and share it with everyone. :-)
    275 * For the frenchies : I've translated the plugin into french. You just have to put the file 'category\_icons-fr\_FR.mo' in the plugins directory. (Pour avoir la traduction du plugin en français, vous devez juste déposer le fichier 'category\_icons-fr\_FR.mo' dans le répertoire des plugins).
    276 *
    277242
    278243= 1.6 =
    279244* Now compatible with WordPress 2.3+
     245
     246== Upgrade Notice ==
     247The error "Fatal error: [] operator not supported for strings" is fixed.
Note: See TracChangeset for help on using the changeset viewer.