Changeset 46457

Show
Ignore:
Timestamp:
05/17/08 09:51:41 (2 months ago)
Author:
koelle
Message:

Added turkish translation by Roman Neumüller

Location:
chcounter-widget
Files:
4 added
3 modified

Legend:

Unmodified
Added
Removed
  • chcounter-widget/tags/2.2.1/readme.txt

    r40797 r46457  
    2626The parameters to display are controlled via the admin panel. There's also an option to make chCounter invisible while active and counting. 
    2727 
     28**Translations** 
     29 
     30* [Turkish](http://http://svn.wp-plugins.org/chcounter-widget/trunk/chcounter-tr_TR.mo) by Roman Neumüller 
     31 
     32The Plugin supports by default English and German. All the other language files are also in trunk and will be automatically included in future releases. 
    2833 
    2934== Installation == 
  • chcounter-widget/trunk/chcounter-widget.php

    r40775 r46457  
    7070       * @return array 
    7171       */ 
    72       function get_parameters() 
     72      function getParameters() 
    7373      { 
    7474            $params = array(); 
     
    100100                   
    101101            $options = get_option( 'chcounter_widget' ); 
    102             $params = $this->get_parameters(); 
     102            $params = $this->getParameters(); 
    103103 
    104104            $defaults = array( 
     
    150150       * @return void 
    151151       */ 
    152       function display_admin_page() 
    153       { 
    154             $params = $this->get_parameters(); 
     152      function displayAdminPage() 
     153      { 
     154            $params = $this->getParameters(); 
    155155            $options = get_option( 'chcounter_widget' ); 
    156156             
    157             if ( isset($_POST['update_chcounter']) ) {       
     157            if ( isset($_POST['update_chcounter']) && check_admin_referer( 'chcounter-widget_update-options' ) ) { 
    158158                  if ( 'update_options' == $_POST['update_chcounter'] ) { 
    159159                        $options['chcounter_path'] = $_POST['chcounter_widget_path']; 
    160160                        $options['invisible'] = isset( $_POST['chcounter_widget_invisible'] ) ? 1 : 0; 
    161                         $options['params']['available'] = $this->get_order($_POST['chcounter_widget_available_order'], 'chcounter_available'); 
    162                         $options['params']['active'] = $this->get_order($_POST['chcounter_widget_active_order'], 'chcounter_active'); 
     161                        $options['params']['available'] = $this->getOrder($_POST['chcounter_widget_available_order'], 'chcounter_available'); 
     162                        $options['params']['active'] = $this->getOrder($_POST['chcounter_widget_active_order'], 'chcounter_active'); 
    163163                         
    164164                        update_option('chcounter_widget', $options); 
     
    173173                         
    174174                  <form action='options-general.php?page=chcounter-widget.php' method='post' onSubmit="populateHiddenVars();"> 
    175                                
     175                         
     176                        <?php wp_nonce_field( 'chcounter-widget_update-options') ?> 
     177                         
    176178                        <h3><?php _e( 'General Settings', 'chcounter' ) ?></h3> 
    177179                        <p><label for='chcounter_widget_path'><?php _e( 'chCounter Path', 'chcounter' ) ?>: </label><?php echo $_SERVER['DOCUMENT_ROOT'] ?><input type='text' name='chcounter_widget_path' id='chcounter_widget_path' value='<?php echo $options['chcounter_path'] ?>' size='20' /><?php _e( 'without trailing slash', 'chcounter' ) ?></p> 
     
    244246       * @return array 
    245247       */ 
    246       function get_order( $input, $listname ) 
     248      function getOrder( $input, $listname ) 
    247249      { 
    248250            parse_str( $input, $input_array ); 
     
    263265       * @return void 
    264266       */ 
    265       function widget_control() 
     267      function control() 
    266268      { 
    267269            $options = get_option( 'chcounter_widget' ); 
     
    283285       * @return void 
    284286       */ 
    285       function register_widget() 
     287      function register() 
    286288      { 
    287289            if ( !function_exists("register_sidebar_widget") ) 
     
    289291 
    290292            register_sidebar_widget( 'chCounter', array(&$this, 'display') ); 
    291             register_widget_control( 'chCounter', array(&$this, 'widget_control'), 250, 100 ); 
     293            register_widget_control( 'chCounter', array(&$this, 'control'), 250, 100 ); 
    292294            return; 
    293295      } 
     
    302304      function init() 
    303305      { 
    304             $params = $this->get_parameters(); 
     306            $params = $this->getParameters(); 
    305307             
    306308            $options = array(); 
     
    372374       * @param none 
    373375       */ 
    374       function add_header_code() 
     376      function addHeaderCode() 
    375377      { 
    376378            echo "<link rel='stylesheet' href='".$this->plugin_url."/style.css' type='text/css' />\n"; 
     
    386388       * @return void 
    387389       */ 
    388       function add_admin_menu() 
    389       { 
    390             $mypage = add_options_page( __( 'chCounter Widget', 'chcounter' ), __( 'chCounter Widget', 'chcounter' ), 8, basename(__FILE__), array(&$this, 'display_admin_page') ); 
    391             add_action( "admin_print_scripts-$mypage", array(&$this, 'add_header_code') ); 
     390      function addAdminMenu() 
     391      { 
     392            $mypage = add_options_page( __( 'chCounter Widget', 'chcounter' ), __( 'chCounter Widget', 'chcounter' ), 8, basename(__FILE__), array(&$this, 'displayAdminPage') ); 
     393            add_action( "admin_print_scripts-$mypage", array(&$this, 'addHeaderCode') ); 
    392394      } 
    393395} 
     
    396398 
    397399 
    398 add_action( 'plugins_loaded', array(&$chcounter_widget, 'register_widget') ); 
     400add_action( 'plugins_loaded', array(&$chcounter_widget, 'register') ); 
    399401add_action( 'activate_'.basename(__FILE__, ".php") .'/' . basename(__FILE__), array(&$chcounter_widget, 'init') ); 
    400 add_action( 'admin_menu', array(&$chcounter_widget, 'add_admin_menu') ); 
     402add_action( 'admin_menu', array(&$chcounter_widget, 'addAdminMenu') ); 
    401403 
    402404load_plugin_textdomain( 'chcounter', $path = PLUGINDIR.'/'.basename(__FILE__, ".php")  ); 
    403405 
    404406// Uninstall chCounter Widget 
    405 if ( isset( $_GET['chcounter-widget']) AND 'uninstall' == $_GET['chcounter-widget'] AND ( isset($_GET['delete_plugin']) AND 1 == $_GET['delete_plugin'] ) ) 
     407if (isset( $_GET['chcounter-widget']) && 'uninstall' == $_GET['chcounter-widget'] && ( isset($_GET['delete_plugin']) && 1 == $_GET['delete_plugin'] ) ) 
    406408      $chcounter_widget->uninstall(); 
    407409 
  • chcounter-widget/trunk/readme.txt

    r40797 r46457  
    2626The parameters to display are controlled via the admin panel. There's also an option to make chCounter invisible while active and counting. 
    2727 
     28**Translations** 
     29 
     30* [Turkish](http://http://svn.wp-plugins.org/chcounter-widget/trunk/chcounter-tr_TR.mo) by Roman Neumüller 
     31 
     32The Plugin supports by default English and German. All the other language files are also in trunk and will be automatically included in future releases. 
    2833 
    2934== Installation ==