XPressME Integration Kit

Trac


Ignore:
Timestamp:
Mar 31, 2009, 12:22:47 PM (15 years ago)
Author:
toemon
Message:

デフォルトテーマxpress_defaultの調整

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/plugins/xpressme/xpressme_class.php

    r139 r143  
    1212        var $old_post_link_text; 
    1313        var $newer_post_link_text; 
     14        var $is_left_page_navi_old; 
     15        var $old_page_link_text; 
     16        var $newer_page_link_text; 
    1417        var $is_author_view_count; 
    1518        var $is_sql_debug; 
     
    4851                $this->is_postnavi_title_disp = true; 
    4952                $this->is_left_postnavi_old = true; 
    50                 $this->old_post_link_text = __('to Old Post', 'xpressme'); 
    51                 $this->newer_post_link_text = __('to Newer Post', 'xpressme'); 
     53                $this->old_post_link_text = __('Older Post', 'xpressme'); 
     54                $this->newer_post_link_text = __('Newer Post', 'xpressme'); 
     55                $this->is_left_page_navi_old = true; 
     56                $this->old_page_link_text = __('Older Entries', 'xpressme'); 
     57                $this->newer_page_link_text = __('Newer Entries', 'xpressme'); 
    5258                $this->is_author_view_count = false; 
    5359                $this->is_sql_debug = false; 
     
    8894                        'old_post_link_text' => $this->old_post_link_text , 
    8995                        'newer_post_link_text' => $this->newer_post_link_text, 
     96                        'is_left_page_navi_old' => $this->is_left_page_navi_old , 
     97                        'old_page_link_text' => $this->old_page_link_text , 
     98                        'newer_page_link_text' => $this->newer_page_link_text, 
    9099                        'is_author_view_count' => $this->is_author_view_count, 
    91100                        'is_sql_debug' => $this->is_sql_debug, 
     
    156165                $this->is_left_postnavi_old = stripslashes(trim($_POST['ch_is_left_postnavi_old'])); 
    157166                $this->old_post_link_text = stripslashes($_POST['ch_old_post_link_text']); 
    158                 if(empty($this->old_post_link_text)) $this->old_post_link_text = __('to Old Post', 'xpressme'); 
     167                if(empty($this->old_post_link_text)) $this->old_post_link_text = __('Older Post', 'xpressme'); 
    159168                $this->newer_post_link_text = stripslashes($_POST['ch_newer_post_link_text']); 
    160                 if(empty($this->newer_post_link_text)) $this->newer_post_link_text = __('to Newer Post', 'xpressme'); 
     169                if(empty($this->newer_post_link_text)) $this->newer_post_link_text = __('Newer Post', 'xpressme'); 
     170                $this->is_left_page_navi_old = stripslashes(trim($_POST['ch_is_left_page_navi_old'])); 
     171                $this->old_page_link_text = stripslashes($_POST['ch_old_page_link_text']); 
     172                if(empty($this->old_page_link_text)) $this->old_page_link_text = __('Older Entries', 'xpressme'); 
     173                $this->newer_page_link_text = stripslashes($_POST['ch_newer_page_link_text']); 
     174                if(empty($this->newer_page_link_text)) $this->newer_page_link_text = __('Newer Entries', 'xpressme'); 
    161175                $this->is_author_view_count = stripslashes(trim($_POST['ch_is_author_view_count'])); 
    162176                $this->is_sql_debug = stripslashes(trim($_POST['ch_is_sql_debug'])); 
     
    210224                $form .=  '<th><label for="images_to_link">' . $option_desc . "</label></th>\n"; 
    211225                $form .=  "<td>\n"; 
     226                $form .=  $this->yes_no_radio_option_sub($option_name,$yes,$no); 
     227                $form .=  "</td>\n"; 
     228                $form .=  "</tr><tr>\n"; 
     229                         
     230            return $form; 
     231         
     232        } 
     233        function yes_no_radio_option_sub($option_name,$yes = '',$no= ''){ 
     234                if (empty( $yes ))  $yes = __('YES','xpressme') ; 
     235                if (empty( $no ))  $no = __('NO','xpressme') ; 
     236                $value = $this->{$option_name}; 
     237                $ans_name = 'ch_' . $option_name; 
     238                 
    212239                if ($value){ 
    213240                        $form .= "<label><input type='radio' name='". $ans_name . "' value='1' checked='checked' />" . $yes ."</label><br />\n"; 
     
    217244                        $form .= "<label><input type='radio' name='". $ans_name . "' value='0' checked='checked' />". $no ."</label>\n"; 
    218245                } 
     246            return $form; 
     247        } 
     248 
     249 
     250        function text_option($option_name,$option_desc){ 
     251                $value = $this->{$option_name}; 
     252                $ans_name = 'ch_' . $option_name; 
     253                 
     254                $form  =  "<tr>\n"; 
     255                $form .=  '<th><label for="images_to_link">' . $option_desc . "</label></th>\n"; 
     256                $form .=  "<td>\n"; 
     257                $form .= $this->text_option_sub($option_name); 
    219258                $form .=  "</td>\n"; 
    220259                $form .=  "</tr><tr>\n"; 
     
    223262         
    224263        } 
    225  
    226         function text_option($option_name,$option_desc){ 
     264         
     265        function text_option_sub($option_name){ 
    227266                $value = $this->{$option_name}; 
    228267                $ans_name = 'ch_' . $option_name; 
    229268                 
    230                 $form  =  "<tr>\n"; 
    231                 $form .=  '<th><label for="images_to_link">' . $option_desc . "</label></th>\n"; 
    232                 $form .=  "<td>\n"; 
    233                 $form .= '<label> <input name="'. $ans_name . '" type="text" size="25" maxlength="50" value="'  . $value . '" /></label>'."\n"; 
    234                 $form .=  "</td>\n"; 
    235                 $form .=  "</tr><tr>\n"; 
    236                          
     269                $form = '<label> <input name="'. $ans_name . '" type="text" size="25" maxlength="50" value="'  . $value . '" /></label>'."\n"; 
    237270            return $form; 
    238271         
     272        } 
     273 
     274         
     275        function single_post_navi_option(){ 
     276                $form = ''; 
     277                $form .= '<tr><th><label for="single_page_navi">' .__('Single Post Navi Setting', 'xpressme') . '</label></th>'; 
     278                $form .= "<td>\n"; 
     279                $form .= "<table>\n"; 
     280                $form .= "<tr>\n"; 
     281                 
     282                $form .= "<td>" . __('Adjustment of Navi link display position','xpressme') . "</td>\n";                 
     283                $form .= "<td>\n"; 
     284                $form .=  $this->yes_no_radio_option_sub('is_left_postnavi_old', 
     285                                                                                                __("'Old Post Link' is displayed in the left, and 'Newer Post Link' is displayed in the right",'xpressme'), 
     286                                                                                                __("'Newer Post Link' is displayed in the left, and 'Old Post Link' is displayed in the right",'xpressme') 
     287                                                                                                ); 
     288                $form .= "</td>\n"; 
     289                $form .= "</tr>\n"; 
     290                 
     291                $form .= "<tr>\n"; 
     292                $form .= "<td>" . __('Select Display name of PostNavi Link','xpressme') . "</td>\n";             
     293                $form .= "<td>\n"; 
     294                $form .=  $this->yes_no_radio_option_sub('is_postnavi_title_disp', 
     295                                                                                                __('Title of post','xpressme'), 
     296                                                                                                __('Title of Navi','xpressme') 
     297                                                                                                ); 
     298                $form .= "</td>\n"; 
     299                $form .= "</tr>\n"; 
     300                 
     301                $form .= "<tr>\n"; 
     302                $form .= "<td>" . __('Display Navi Title of Old Post Link','xpressme') . "</td>\n";              
     303                $form .= "<td>\n"; 
     304                $form .=  $this->text_option_sub('old_post_link_text'); 
     305                $form .= "</td>\n"; 
     306                $form .= "</tr>\n"; 
     307                 
     308                $form .= "<tr>\n"; 
     309                $form .= "<td>" . __('Display Navi Title of Newer Post Link','xpressme') . "</td>\n";            
     310                $form .= "<td>\n"; 
     311                $form .=  $this->text_option_sub('newer_post_link_text'); 
     312                $form .= "</td>\n"; 
     313                $form .= "</tr>\n"; 
     314                 
     315                $form .= "</table></td></tr>\n"; 
     316            return $form; 
     317 
     318        } 
     319 
     320        function posts_page_navi_option(){ 
     321                $form = ''; 
     322                $form .= '<tr><th><label for="posts_page_navi">' .__('Posts List Page Navi Setting', 'xpressme') . '</label></th>'; 
     323                $form .= "<td>\n"; 
     324                $form .= "<table>\n"; 
     325                $form .= "<tr>\n"; 
     326                 
     327                $form .= "<td>" . __('Adjustment of Navi link display position','xpressme') . "</td>\n";                 
     328                $form .= "<td>\n"; 
     329                $form .=  $this->yes_no_radio_option_sub('is_left_page_navi_old', 
     330                                                                                                __("'Old Page Link' is displayed in the left, and 'Newer Page Link' is displayed in the right",'xpressme'), 
     331                                                                                                __("'Newer Page Link' is displayed in the left, and 'Old Page Link' is displayed in the right",'xpressme') 
     332                                                                                                ); 
     333                $form .= "</td>\n"; 
     334                $form .= "</tr>\n"; 
     335                 
     336                $form .= "<tr>\n"; 
     337                $form .= "<td>" . __('Display Navi Title of Old Page Link','xpressme') . "</td>\n";              
     338                $form .= "<td>\n"; 
     339                $form .=  $this->text_option_sub('old_page_link_text'); 
     340                $form .= "</td>\n"; 
     341                $form .= "</tr>\n"; 
     342                 
     343                $form .= "<tr>\n"; 
     344                $form .= "<td>" . __('Display Navi Title of Newer Page Link','xpressme') . "</td>\n";            
     345                $form .= "<td>\n"; 
     346                $form .=  $this->text_option_sub('newer_page_link_text'); 
     347                $form .= "</td>\n"; 
     348                $form .= "</tr>\n"; 
     349                 
     350                $form .= "</table></td></tr>\n"; 
     351            return $form; 
     352 
    239353        } 
    240354         
     
    422536                                                                                                __('NO','xpressme') 
    423537                                                                                                ); 
    424                 echo                            $this->text_option('old_post_link_text', 
    425                                                                                                 __('Display Navi Title of Old Post Link','xpressme') 
    426                                                                                                 ); 
    427                 echo                            $this->text_option('newer_post_link_text', 
    428                                                                                                 __('Display Navi Title of Newer Post Link','xpressme') 
    429                                                                                                 ); 
    430                 echo                            $this->yes_no_radio_option('is_postnavi_title_disp', 
    431                                                                                                 __('Select Display name of PostNavi Link','xpressme'), 
    432                                                                                                 __('Title of post','xpressme'), 
    433                                                                                                 __('Title of Navi','xpressme') 
    434                                                                                                 ); 
    435                 echo                            $this->yes_no_radio_option('is_left_postnavi_old', 
    436                                                                                                 __('Adjustment of Navi link display position','xpressme'), 
    437                                                                                                 __("'Old Post Link' is displayed in the left, and 'Newer Post Link' is displayed in the right",'xpressme'), 
    438                                                                                                 __("'Newer Post Link' is displayed in the left, and 'Old Post Link' is displayed in the right",'xpressme') 
    439                                                                                                 ); 
     538                 
     539                echo                            $this->single_post_navi_option(); 
     540                echo                            $this->posts_page_navi_option(); 
     541 
     542                 
    440543                echo                            $this->yes_no_radio_option('is_author_view_count', 
    441544                                                                                                __('Is the posts author views counted?','xpressme'), 
Note: See TracChangeset for help on using the changeset viewer.