Plugin Directory

Changeset 383975


Ignore:
Timestamp:
05/12/2011 09:27:02 AM (15 years ago)
Author:
Billyben
Message:
 
Location:
billyben-rings
Files:
33 added
7 edited

Legend:

Unmodified
Added
Removed
  • billyben-rings/trunk/BillyBenRing/BillyBenRing.php

    r383257 r383975  
    1616
    1717// les variables globales
    18 $bbr_new_version = '2.2.1';
     18$bbr_new_version = '2.2.2';
    1919if (!defined('BBR_VERSION_KEY'))define('BBR_VERSION_KEY', 'bbr_version');
    2020if (!defined('BBR_VERSION_NUM'))define('BBR_VERSION_NUM', $bbr_new_version);
     
    2222// on met à jour la table selon la version
    2323function bbr_check_version(){
    24     if(get_option('bbr_version')==BBR_VERSION_NUM)return;
     24    if(get_option('bbr_version')==BBR_VERSION_NUM||get_option('bbr_version')=='2.2.1')return;
    2525    if(!get_option('bbr_options')){
    2626        $options= bbr_init_options(array());
     
    6363}
    6464function bbr_create_option_page(){
     65    if(!load_plugin_textdomain(BBR_TEXT_DOMAIN,'/wp-content/languages/'))
     66            load_plugin_textdomain(BBR_TEXT_DOMAIN,'/wp-content/plugins/BillyBenRing/lang/');
    6567    $page=new bbr_Theme_Options(); 
    6668
     
    8082function BillyBenRing_widget()
    8183{
    82     bbr_check_version();
     84    if(!load_plugin_textdomain(BBR_TEXT_DOMAIN,'/wp-content/languages/'))
     85            load_plugin_textdomain(BBR_TEXT_DOMAIN,'/wp-content/plugins/BillyBenRing/lang/');
    8386    register_widget("BillyBenRing");
    8487}
  • billyben-rings/trunk/BillyBenRing/elm/bbr_options_class.php

    r383257 r383975  
    2929        add_action( 'admin_init', array( &$this, 'register_settings' ) );
    3030        add_action( 'admin_head', array( &$this, 'admin_css' ) );
     31       
     32       
     33       
    3134       
    3235    }
     
    6366            <ul class="ui-tabs-nav">';
    6467       
    65         foreach ( $this->widgetoptions as $section )
    66             echo '<li><a href="#' . strtolower( str_replace( ' ', '_', $section ) ) . '" onclick="currentWidgetHasChange(this)">' . $section . '</a></li>';
     68        foreach ( $this->widgetoptions as $sectName=>$section )
     69            echo '<li><a href="#' . strtolower( str_replace( ' ', '_',$this->stripAccents($section) ) ). '" onclick="currentWidgetHasChange(this)">' . $section . '</a></li>';
    6770       
    6871        echo '</ul>';
     
    9194            <ul class="ui-tabs-nav">';
    9295       
    93         foreach ( $this->sections as $section )
    94             echo '<li><a href="#' . strtolower( str_replace( ' ', '_', $section ) ) . '">' . $section . '</a></li>';
     96        foreach ( $this->sections as $sectName=>$section )
     97            echo '<li><a href="#' . strtolower( str_replace( ' ', '_',$this->stripAccents($section) ) ) . '">' . $section . '</a></li>';
    9598       
    9699        echo '</ul>';
     
    127130        echo '<tr valign="top" style="">';
    128131        echo '<th scope="row">
    129             <label for="link_dest">Select Link destination</label>
     132            <label for="link_dest">' .__("Select Link destination", BBR_TEXT_DOMAIN) . '</label>
    130133            </th><td>';
    131134        echo '<select class="select.select" name="bbr_options[link_dest]">';
     
    167170        echo '<tr valign="top" style="">';
    168171        echo '<th scope="row">
    169             <label for="'.$id.'_dest">Select Link destination</label>
     172            <label for="'.$id.'_dest">'.__("Select Link destination", BBR_TEXT_DOMAIN) . '</label>
    170173            </th><td>';
    171174        echo '<select class="select.select" name="bbr_options['.$id.'_dest]">';
     
    412415   
    413416    public function register_settings() {
     417
    414418        if (isset($_POST['createWidget']))$this->createNewWidget();
    415419        if (isset($_POST['eraseWidget']))$this->eraseWidget(); 
     
    903907    echo '<div class="ui-tabs">
    904908            <ul class="ui-tabs-nav">';
    905     foreach ( $this->aboutsections as $section )
    906             echo '<li><a href="#' . strtolower( str_replace( ' ', '_', $section ) ) . '" onclick="currentWidgetHasChange(this)">' . $section . '</a></li>';
     909    foreach ( $this->aboutsections as $sectName=>$section )
     910            echo '<li><a href="#' . strtolower( str_replace( ' ', '_',$this->stripAccents($section) ) ) . '" onclick="currentWidgetHasChange(this)">' . $section . '</a></li>';
    907911    echo '</ul>';
    908912    do_settings_sections( $_GET['page'] );
    909913    echo '</div>';
    910     echo    '<script type="text/javascript">
    911         jQuery(document).ready(function($) {
    912             var wrapped = $(".wrap h3").wrap("<div class=\"ui-tabs-panel\">");
    913             wrapped.each(function() {
    914                 $(this).parent().append($(this).parent().nextUntil("div.ui-tabs-panel"));
    915             });
    916             $(".ui-tabs-panel").each(function(index) {
    917                 var str = $(this).children("h3").text().replace(/\s/g, "_");
    918                 $(this).attr("id", str.toLowerCase());
    919                 if (index > 0)
    920                     $(this).addClass("ui-tabs-hide");
    921             });
    922             $(".ui-tabs").tabs({ fx: { opacity: "toggle", duration: "fast" } });
    923            
    924             $("input[type=text], textarea").each(function() {
    925                 if ($(this).val() == $(this).attr("placeholder") || $(this).val() == "")
    926                     $(this).css("color", "#999");
    927             });
    928            
    929             $("input[type=text], textarea").focus(function() {
    930                 if ($(this).val() == $(this).attr("placeholder") || $(this).val() == "") {
    931                     $(this).val("");
    932                     $(this).css("color", "#000");
    933                 }
    934             }).blur(function() {
    935                 if ($(this).val() == "" || $(this).val() == $(this).attr("placeholder")) {
    936                     $(this).val($(this).attr("placeholder"));
    937                     $(this).css("color", "#999");
    938                 }
    939             });
    940            
    941             $(".wrap h3, .wrap table").show();
    942         });
    943     </script>';
     914    echo    '<script type="text/javascript" src="'.get_bloginfo('wpurl').'/wp-content/plugins/BillyBenRing/elm/js/bbr_js.js"></script>';
    944915    echo    '</div>';
    945916   
     
    1002973       
    1003974        ' . sprintf( __( 'BB Ring is licensed under the %s GNU General Public License version 2.0%s', BBR_TEXT_DOMAIN ), '<a href="http://www.gnu.org/licenses/gpl-3.0-standalone.html">', '</a>.</p>' );
     975       
     976        echo '<h5> '.__("Support BillyBen Ring widget",      BBR_TEXT_DOMAIN ).'</h5>';
     977        echo '<p>'. __("If you like BBR widget you could support it's creator by donating, it should help it's dev!",    BBR_TEXT_DOMAIN ).'</p>';
     978        echo '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
     979<input type="hidden" name="cmd" value="_s-xclick">
     980<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCfINap9HK2pdBDueQB8gqEUs7V+ZY4atPJNJejA8v5atk6rDVMj9m/h3FBF2MWuFt4EwgdhDPoqPlIfteIHcLO9yid+zg8VREgT7ynYtQx8KaNOtSDfWb1kEni1uHx8ybzNeYhJqkl6wHp898Q2gKjae82pWAI5qcMzbmRbogCuDELMAkGBSsOAwIaBQAwgcQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQICbcINkXUYYKAgaBR+HdyDfZRCfrgOk2IcjS1seHk72o8Awhk+39pvoFt+iJB3bZEIz/YG2j80U2sBESu8KchsFmDS7tQABBOvP8ywjJJhV+qjU2z8kobG8XYis7iUUYLkZFE7NJogaqy4epVmL2spGxDZTUKCYw90G1U+efr1Kar4RgWiNts0BclT/8GHuRLd969REWdUh7tl3UTJgLrRRIGWk3/FtU9zZi+oIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFBQAwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMB4XDTA0MDIxMzEwMTMxNVoXDTM1MDIxMzEwMTMx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lX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTEwNTEyMDg0MzQ4WjAjBgkqhkiG9w0BCQQxFgQUKYZi4NXevmyzigSvt0+vicbpbvcwDQYJKoZIhvcNAQEBBQAEgYBOcdvW/UxPHJbPmhsPshMHR22aw2v3+Ha875ojYv8rAS4HgEqXvo4SXd5tLLyI2rXRC9fdEPE0BSDBtINQBd7Al6/MptdlvHOy8y/3qxhQlFEqEz9BmqYmmHFjdRt/z1V4mshrbLRRb1nY9/EMqMPizOdiVx0rPhERXmz7tz6LtQ==-----END PKCS7-----
     981">
     982<input type="image" src="https://www.paypalobjects.com/WEBSCR-640-20110429-1/en_GB/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
     983<img alt="" border="0" src="https://www.paypalobjects.com/WEBSCR-640-20110429-1/fr_FR/i/scr/pixel.gif" width="1" height="1">
     984</form>';
     985
     986       
     987       
    1004988        echo '<h4>' . __( 'Extra Code', BBR_TEXT_DOMAIN ) . '</small></h4>';
    1005         echo '<p> Color Picker by <a href="http://odvarko.cz/">Jan Odvarko</a> (<a href="http://jscolor.com/">jscolor</a>)</p>';
    1006         echo '<p> Great Thanks to  <a href="http://alisothegeek.com/">Aliso the Geek</a> and its fantastic tutorial about WP <a href="http://alisothegeek.com/2011/01/wordpress-settings-api-tutorial-1/">Setting API</a></p>';
     989        echo '<p>' . __( ' Color Picker by', BBR_TEXT_DOMAIN ) . ' <a href="http://odvarko.cz/">Jan Odvarko</a> (<a href="http://jscolor.com/">jscolor</a>)</p>';
     990        echo '<p>' . __( ' Great Thanks to  <a href="http://alisothegeek.com/">Aliso the Geek</a> and its fantastic tutorial about WP <a href="http://alisothegeek.com/2011/01/wordpress-settings-api-tutorial-1/">Setting API</a>', BBR_TEXT_DOMAIN ) . '</p>';
    1007991   
    1008992}   
     993
     994
     995/* Utilitaires
     996______________________ */
     997function stripAccents($string){
     998   
     999     $remplace = array('à'=>'a',
     1000                         'á'=>'a',
     1001                         'â'=>'a',
     1002                         'ã'=>'a',
     1003                         'ä'=>'a',
     1004                         'å'=>'a',
     1005                         'ò'=>'o',
     1006                         'ó'=>'o',
     1007                         'ô'=>'o',
     1008                         'õ'=>'o',
     1009                         'ö'=>'o',
     1010                         'è'=>'e',
     1011                         'é'=>'e',
     1012                         'ê'=>'e',
     1013                         'ë'=>'e',
     1014                         'ì'=>'i',
     1015                         'í'=>'i',
     1016                         'î'=>'i',
     1017                         'ï'=>'i',
     1018                         'ù'=>'u',
     1019                         'ú'=>'u',
     1020                         'û'=>'u',
     1021                         'ü'=>'u',
     1022                         'ÿ'=>'y',
     1023                         'ñ'=>'n',
     1024                         'ç'=>'c',
     1025                         'ø'=>'0'
     1026                         );
     1027    return strtr($string,$remplace);
     1028}
    10091029   
    10101030}
  • billyben-rings/trunk/BillyBenRing/elm/bbr_widget_class.php

    r383257 r383975  
    106106        </p>';
    107107        $ids=bbr_get_ids();
    108         $pageStr.='<p> <label>'.__('Choose BBR Id').'</label>';
     108        $pageStr.='<p> <label>'.__('Choose BBR Id', BBR_TEXT_DOMAIN).'</label>';
    109109        $pageStr.='<select name="'.$this->get_field_name('wid').'">';   
    110110        foreach($ids as $key=>$value)$pageStr.= '<option value='.$value.' '.(($options['wid']==$value)?"selected=selected":"").'>'.$value.'</option>';
  • billyben-rings/trunk/BillyBenRing/elm/js/bbr_js.js

    r383257 r383975  
    1010            $(".ui-tabs-panel").each(function(index) {
    1111                var str = $(this).children("h3").text().replace(/\s/g, "_");
    12                 $(this).attr("id", str.toLowerCase());
     12                $(this).attr("id", stripAccents(str).toLowerCase());
    1313                if (index > 0)
    1414                    $(this).addClass("ui-tabs-hide");
     
    157157}
    158158
    159 /* pour la previw flassh des widget */
    160    
    161 
    162 
    163 
    164 
     159/* utilistaire jQuery */
     160 function stripAccents(chaine) {
     161      temp = chaine.replace(/[àâä]/gi,"a")
     162      temp = temp.replace(/[éèêë]/gi,"e")
     163      temp = temp.replace(/[îï]/gi,"i")
     164      temp = temp.replace(/[ôö]/gi,"o")
     165      temp = temp.replace(/[ùûü]/gi,"u")
     166      return temp
     167   }
    165168
    166169
  • billyben-rings/trunk/BillyBenRing/elm/utilsClasse.php

    r383257 r383975  
    216216        $cats=bbr_get_category_arr_order();
    217217        foreach($cats  as $cat) {
    218         $id="cat_id_".$cat->term_id;
     218        $idCurr=bbr_get_default_id($cat->term_id, 'category');
     219        $id="cat_id_".$idCurr;
    219220        if(!isset($options[$id."_sel"])||!$options[$id."_sel"])continue;
    220221   
     
    227228        $tags=bbr_get_keywords_arr_order();
    228229        foreach ( $tags as $tag ) {
    229             $id="tag_id_".$tag["id"];
     230            $idCurr=bbr_get_default_id($tag["id"], 'post_tag');
     231            $id="tag_id_".$idCurr;         
    230232            if(!isset($options[$id."_sel"])||!$options[$id."_sel"])continue;
    231233            $key=$tag["tagName"];
    232         $idCurr=bbr_get_default_id($tag["id"], 'post_tag');
     234       
    233235            $xmlStr.='<ring type="keyword" color="'.$options["tag_id_".$idCurr].'" url="'.$tag["link"].'">'.$key.'</ring>';
    234236        }
     
    238240        $tags=bbr_get_page_arr_order();
    239241        foreach ( $tags as $tag ) {
    240             $id="page_id_".$tag["id"];
     242            $idCurr=bbr_get_default_id($tag["id"], 'page');
     243            $id="page_id_".$idCurr;
    241244            if(!isset($options[$id."_sel"])||!$options[$id."_sel"])continue;
    242             $idCurr=bbr_get_default_id($tag["id"], 'page');    
     245               
    243246            $xmlStr.='<ring type="page" color="'.$options["page_id_".$idCurr].'" url="'.$tag["link"].'">'.$tag["name"].'</ring>';   
    244247        }
     
    265268
    266269
     270
     271
    267272?>
  • billyben-rings/trunk/readme.txt

    r383257 r383975  
    55Requires at least: 2.8.1
    66Tested up to: 3.1.1
    7 Stable tag: 2.2.1
     7Stable tag: 2.2.2
    88
    99Display links, tag, pages, and/or categories by circulars sideBar widgets, full or arrowed circles. Fully customizable. ShortCoded. Mutli Instance.
     
    1616You can choose wether it open a new windows or keep the same for each display's type.
    1717It use an swf integrated by swfObject2 (javascript) in the html page. The Option page also uses Javascript for a really convenient experience.. (...). 
     18
     19Available in English and French
    1820 
    1921**Requirements** 
     
    2527*note : ColorPicker javascript code were from* <a href=\"http://odvarko.cz/\">Jan Odvarko</a> (<a href=\"http://jscolor.com/\">jscolor</a>)
    2628
    27 *WPML Compatibility : It can display colors for different languages, based on the admin language choosen colors. Option panel are ready for traduction.....*
     29*WPML Compatibility : It can display colors for different languages, based on the admin language choosen colors.*
    2830
    2931== Installation ==
     
    3739
    3840== Frequently Asked Questions ==
     41
     42= When I switch Language with WPML I lost data =
     43Make sure you have defined each traduction for each item, and you have links those traduction
    3944
    4045Please Ask! <a href="http://82.228.191.29/asblog/?page_id=488&lang=en">Widget Page</a>
     
    5156
    5257== Changelog ==
    53 = 2.2.1 ==
     58= 2.2.2 =
     59* Add French traduction
     60* fix an FF bug
     61* fix a wpml compatibility issue
     62= 2.2.1 =
    5463* add rings position (top, left, bottom, top left, etc...)
    5564* add preview for Widget Option page
     
    5968* Rings now follow mouse when over
    6069= 2.1.1 =
    61 * minor bug corrected
     70* minor bug fixed
    6271= 2.1.0 =
    6372* Add ShortCode
Note: See TracChangeset for help on using the changeset viewer.