XPressME Integration Kit

Trac

Changeset 32


Ignore:
Timestamp:
Dec 17, 2008, 12:18:56 PM (15 years ago)
Author:
toemon
Message:

カスタムファンクションをプラグイン側へ移動
リンクの関数追加 #7 #9

xpress_right_arrow_post_link($show = false)
xpress_left_arrow_post_link($show = false)

カスタム関数名変更

the_credit() -> xpress_credit()
html_convert_time() -> xpress_convert_time()

Location:
trunk
Files:
2 added
1 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-config.php

    r31 r32  
    33require_once dirname( __FILE__ ).'/include/set_cash_cookie_path.php' ; 
    44require_once dirname( __FILE__ ).'/include/pluggable-override.php' ; 
    5 require_once dirname( __FILE__ ).'/include/custom_functions.php' ; 
    65 
    76mb_language('Japanese'); 
  • trunk/wp-content/plugins/xpressme/language/xpressme-ja.po

    r28 r32  
    33"Project-Id-Version: fckeditor for xpress\n" 
    44"POT-Creation-Date: \n" 
    5 "PO-Revision-Date: 2008-12-15 17:50+0900\n" 
     5"PO-Revision-Date: 2008-12-17 09:50+0900\n" 
    66"Last-Translator: toemon <toychee@toemon.com>\n" 
    77"Language-Team: \n" 
     
    1515"X-Poedit-SearchPath-0: .\n" 
    1616 
    17 #: xpressme_class.php:20 
     17#: xpressme_class.php:25 
    1818msgid "XPressME Settings" 
    1919msgstr "XPressME設定" 
    2020 
    21 #: xpressme_class.php:73 
    22 #: xpressme_class.php:118 
    23 #: xpressme_class.php:123 
     21#: xpressme_class.php:42 
     22#: xpressme_class.php:81 
     23msgid "to Old Post" 
     24msgstr "前の投稿へ" 
     25 
     26#: xpressme_class.php:43 
     27#: xpressme_class.php:83 
     28msgid "to Newer Post" 
     29msgstr "次の投稿へ" 
     30 
     31#: xpressme_class.php:88 
     32#: xpressme_class.php:148 
     33#: xpressme_class.php:153 
    2434msgid "YES" 
    2535msgstr "はい" 
    2636 
    27 #: xpressme_class.php:74 
    28 #: xpressme_class.php:119 
    29 #: xpressme_class.php:124 
     37#: xpressme_class.php:89 
     38#: xpressme_class.php:149 
     39#: xpressme_class.php:154 
    3040msgid "NO" 
    3141msgstr "いいえ" 
    3242 
    33 #: xpressme_class.php:108 
     43#: xpressme_class.php:138 
    3444msgid "XPressME Configuration Page" 
    3545msgstr "XPressMEの設定ページ" 
    3646 
    37 #: xpressme_class.php:112 
     47#: xpressme_class.php:142 
    3848msgid "Media Upload Base Path" 
    3949msgstr "メディアアップロードのベースパス設定" 
    4050 
    41 #: xpressme_class.php:113 
     51#: xpressme_class.php:143 
    4252msgid "Use XOOPS UPLOAD PATH" 
    4353msgstr "XOOPSのアップロードパスを使用する。" 
    4454 
    45 #: xpressme_class.php:114 
     55#: xpressme_class.php:144 
    4656msgid "USE WordPress BASE_PATH" 
    4757msgstr "WordPressのベースパスを使用する。" 
    4858 
    49 #: xpressme_class.php:117 
     59#: xpressme_class.php:147 
    5060msgid "Thema Sidebar Display" 
    5161msgstr "テーマ表示時にサイドバー表示する。" 
    5262 
    53 #: xpressme_class.php:122 
     63#: xpressme_class.php:152 
    5464msgid "The change tracking of the post is preserved" 
    5565msgstr "投稿の変更履歴を有効にする。" 
    5666 
    57 #: xpressme_class.php:131 
     67#: xpressme_class.php:157 
     68msgid "Select Display name of PostNavi Link" 
     69msgstr "投稿記事リンクナビのタイトル設定" 
     70 
     71#: xpressme_class.php:158 
     72msgid "Title of post" 
     73msgstr "投稿記事のタイトルを表示" 
     74 
     75#: xpressme_class.php:159 
     76msgid "Next and Previous" 
     77msgstr "[次の投稿へ]、[前の投稿]へを表示" 
     78 
     79#: xpressme_class.php:162 
     80msgid "Adjustment of Navi link display position" 
     81msgstr "投稿記事ナビリンクの表示位置設定" 
     82 
     83#: xpressme_class.php:163 
     84msgid "'Old Post Link' is displayed in the left, and 'Newer Post Link' is displayed in the right" 
     85msgstr "古い記事へのリンクを左に、より新しい記事へのリンクを右に表示" 
     86 
     87#: xpressme_class.php:164 
     88msgid "'Newer Post Link' is displayed in the left, and 'Old Post Link' is displayed in the right" 
     89msgstr "より新しい記事へのリンクを左に、古い記事へのリンクを右に表示" 
     90 
     91#: xpressme_class.php:167 
     92msgid "Display Title of Old Post Link" 
     93msgstr "古い記事へのリンクタイトルを設定" 
     94 
     95#: xpressme_class.php:170 
     96msgid "Display Title of Newer Post Link" 
     97msgstr "より新しい記事へのリンクタイトルを設定" 
     98 
     99#: xpressme_class.php:178 
    58100msgid "Update Config" 
    59101msgstr "更新" 
    60102 
    61 #: xpressme_class.php:132 
     103#: xpressme_class.php:179 
    62104msgid "Preset Config" 
    63105msgstr "プリセット" 
  • trunk/wp-content/plugins/xpressme/xpressme.php

    r28 r32  
    1717        remove_action( 'pre_post_update', 'wp_save_post_revision' );                    // Not Save Post Revision 
    1818} 
    19  
     19//require_once('../include/custom_functions.php'); 
     20require_once dirname( __FILE__ ).'/include/custom_functions.php' ; 
    2021?> 
  • trunk/wp-content/plugins/xpressme/xpressme_class.php

    r28 r32  
    88        var $is_theme_sidebar_disp; 
    99        var $is_save_post_revision; 
     10        var $is_postnavi_title_disp; 
     11        var $is_left_postnavi_old; 
     12        var $old_post_link_text; 
     13        var $newer_post_link_text; 
     14 
    1015        //constructor 
    1116        function XPressME_Class() 
     
    3338                $this->is_theme_sidebar_disp = true; 
    3439                $this->is_save_post_revision = true; 
     40                $this->is_postnavi_title_disp = true; 
     41                $this->is_left_postnavi_old = true; 
     42                $this->old_post_link_text = __('to Old Post'); 
     43                $this->newer_post_link_text = __('to Newer Post'); 
    3544        } 
    3645         
     
    5362                $write_options = array ( 
    5463                        'is_use_xoops_upload_path' => $this->is_use_xoops_upload_path , 
    55                         'is_theme_sidebar_disp' => $this->is_theme_sidebar_disp  
     64                        'is_theme_sidebar_disp' => $this->is_theme_sidebar_disp , 
     65                        'is_save_post_revision' => $this->is_save_post_revision , 
     66                        'is_postnavi_title_disp' => $this->is_postnavi_title_disp , 
     67                        'is_left_postnavi_old' => $this->is_left_postnavi_old , 
     68                        'old_post_link_text' => $this->old_post_link_text , 
     69                        'newer_post_link_text' => $this->newer_post_link_text  
    5670                ); 
    5771                if ($mode == 'add_new') { 
     
    6781                $this->is_theme_sidebar_disp = stripslashes(trim($_POST['ch_is_theme_sidebar_disp'])); 
    6882                $this->is_save_post_revision = stripslashes(trim($_POST['ch_is_save_post_revision'])); 
     83                $this->is_postnavi_title_disp = stripslashes(trim($_POST['ch_is_postnavi_title_disp'])); 
     84                $this->is_left_postnavi_old = stripslashes(trim($_POST['ch_is_left_postnavi_old'])); 
     85                $this->old_post_link_text = stripslashes($_POST['ch_old_post_link_text']); 
     86                if(empty($this->old_post_link_text)) $this->old_post_link_text = __('to Old Post'); 
     87                $this->newer_post_link_text = stripslashes($_POST['ch_newer_post_link_text']); 
     88                if(empty($this->newer_post_link_text)) $this->newer_post_link_text = __('to Newer Post'); 
     89                 
    6990        } 
    7091         
    7192        function yes_no_radio_option($option_name,$option_desc,$yes = '',$no= ''){ 
    72         if (empty( $yes ))  $yes = __('YES','xpressme') ; 
    73         if (empty( $no ))  $no = __('NO','xpressme') ; 
    74         $value = $this->{$option_name}; 
    75         $ans_name = 'ch_' . $option_name; 
    76          
    77         $form  =  "<tr>\n"; 
    78         $form .=  '<th><label for="images_to_link">' . $option_desc . "</label></th>\n"; 
    79         $form .=  "<td>\n"; 
    80         if ($value){ 
    81                 $form .= "<label><input type='radio' name='". $ans_name . "' value='1' checked='checked' />" . $yes ."</label><br />\n"; 
    82                 $form .= "<label><input type='radio' name='". $ans_name . "' value='0' />". $no . "</label>\n"; 
    83         }else{ 
    84                 $form .= "<label><input type='radio' name='". $ans_name . "' value='1' />" . $yes . "</label><br />\n"; 
    85                 $form .= "<label><input type='radio' name='". $ans_name . "' value='0' checked='checked' />". $no ."</label>\n"; 
    86         } 
    87         $form .=  "</td>\n"; 
    88         $form .=  "</tr><tr>\n"; 
    89                  
    90     return $form; 
    91          
    92 } 
     93                if (empty( $yes ))  $yes = __('YES','xpressme') ; 
     94                if (empty( $no ))  $no = __('NO','xpressme') ; 
     95                $value = $this->{$option_name}; 
     96                $ans_name = 'ch_' . $option_name; 
     97                 
     98                $form  =  "<tr>\n"; 
     99                $form .=  '<th><label for="images_to_link">' . $option_desc . "</label></th>\n"; 
     100                $form .=  "<td>\n"; 
     101                if ($value){ 
     102                        $form .= "<label><input type='radio' name='". $ans_name . "' value='1' checked='checked' />" . $yes ."</label><br />\n"; 
     103                        $form .= "<label><input type='radio' name='". $ans_name . "' value='0' />". $no . "</label>\n"; 
     104                }else{ 
     105                        $form .= "<label><input type='radio' name='". $ans_name . "' value='1' />" . $yes . "</label><br />\n"; 
     106                        $form .= "<label><input type='radio' name='". $ans_name . "' value='0' checked='checked' />". $no ."</label>\n"; 
     107                } 
     108                $form .=  "</td>\n"; 
     109                $form .=  "</tr><tr>\n"; 
     110                         
     111            return $form; 
     112         
     113        } 
     114 
     115        function text_option($option_name,$option_desc){ 
     116                $value = $this->{$option_name}; 
     117                $ans_name = 'ch_' . $option_name; 
     118                 
     119                $form  =  "<tr>\n"; 
     120                $form .=  '<th><label for="images_to_link">' . $option_desc . "</label></th>\n"; 
     121                $form .=  "<td>\n"; 
     122                $form .= '<label> <input name="'. $ans_name . '" type="text" size="25" maxlength="50" value="'  . $value . '" /></label>'."\n"; 
     123                $form .=  "</td>\n"; 
     124                $form .=  "</tr><tr>\n"; 
     125                         
     126            return $form; 
     127         
     128        } 
    93129                 
    94130        function option_page() 
     
    123159                                                                                                __('NO','xpressme') 
    124160                                                                                                ); 
     161                echo                            $this->yes_no_radio_option('is_postnavi_title_disp', 
     162                                                                                                __('Select Display name of PostNavi Link','xpressme'), 
     163                                                                                                __('Title of post','xpressme'), 
     164                                                                                                __('Next and Previous','xpressme') 
     165                                                                                                ); 
     166                echo                            $this->yes_no_radio_option('is_left_postnavi_old', 
     167                                                                                                __('Adjustment of Navi link display position','xpressme'), 
     168                                                                                                __("'Old Post Link' is displayed in the left, and 'Newer Post Link' is displayed in the right",'xpressme'), 
     169                                                                                                __("'Newer Post Link' is displayed in the left, and 'Old Post Link' is displayed in the right",'xpressme') 
     170                                                                                                ); 
     171                echo                            $this->text_option('old_post_link_text', 
     172                                                                                                __('Display Title of Old Post Link','xpressme') 
     173                                                                                                ); 
     174                echo                            $this->text_option('newer_post_link_text', 
     175                                                                                                __('Display Title of Newer Post Link','xpressme') 
     176                                                                                                ); 
     177                 
    125178                         
    126179//              $this->is_use_xoops_upload_path_html(); 
  • trunk/wp-content/themes/xpress_default/footer.php

    r1 r32  
    11<hr /> 
    22<div id="xpress_footer"> 
    3 <!-- If you'd like to support WordPress, having the "powered by" link somewhere on your blog is the best way; it's our only promotion or advertising. --> 
    43        <p> 
    5                 <?php printf(__('%1$s is proudly powered by %2$s', 'kubrick'), get_bloginfo('name'),the_credit()); ?> 
    6                 <br /><?php printf(__('%1$s and %2$s.', 'kubrick'), '<a href="' . get_bloginfo('rss2_url') . '">' . __('Entries (RSS)', 'kubrick') . '</a>', '<a href="' . get_bloginfo('comments_rss2_url') . '">' . __('Comments (RSS)', 'kubrick') . '</a>'); ?> 
     4                <?php printf(__('%1$s and %2$s.', 'kubrick'), '<a href="' . get_bloginfo('rss2_url') . '">' . __('Entries (RSS)', 'kubrick') . '</a>', '<a href="' . get_bloginfo('comments_rss2_url') . '">' . __('Comments (RSS)', 'kubrick') . '</a>'); ?> 
    75                <!-- <?php printf(__('%d queries. %s seconds.', 'kubrick'), get_num_queries(), timer_stop(0, 3)); ?> --> 
    86        </p> 
     7        <!-- If you'd like to support WordPress, having the "powered by" link somewhere on your blog is the best way; it's our only promotion or advertising. --> 
     8                <div id="xpress_credit"><?php echo xpress_credit(). ' (' . xpress_convert_time() . ')'; ?></div> 
    99</div> 
    1010</div> 
  • trunk/wp-content/themes/xpress_default/functions.php

    r1 r32  
    1010load_theme_textdomain('kubrick'); 
    1111 
    12 function the_credit() 
    13 { 
    14          
    15 } 
    16  
    17 function is_sidbar_disp() 
    18 { 
    19         return true; 
    20 } 
    21  
    22 function kuro_previous_post_link($format='&laquo; %link', $link='%title', $in_same_cat = false, $excluded_categories = '') 
    23 { 
    24         $pre_title = __('Previous Post'); // This text is included in the language file that exists in WordPress2.3 or the version after that. 
    25  
    26         ob_start(); 
    27                 previous_post_link($format,$link,$in_same_cat,$excluded_categories); 
    28                 $ret = ob_get_contents(); 
    29         ob_end_clean(); 
    30         $ret= str_replace('">','" title="'. $pre_title . '">' , $ret); 
    31         echo $ret; 
    32 } 
    33  
    34 function kuro_next_post_link($format='%link &raquo;', $link='%title', $in_same_cat = false, $excluded_categories = '') 
    35 { 
    36         $next_title = __('Next Post'); // This text is included in the language file that exists in WordPress2.3 or the version after that.   
    37  
    38         ob_start(); 
    39                 next_post_link($format,$link,$in_same_cat,$excluded_categories); 
    40                 $ret = ob_get_contents(); 
    41         ob_end_clean(); 
    42         $ret= str_replace('">','" title="'. $next_title . '">' , $ret); 
    43         echo $ret; 
    44 } 
    45      
    4612function kubrick_head() { 
    4713        $head = "<style type='text/css'>\n<!--"; 
  • trunk/wp-content/themes/xpress_default/index.php

    r1 r32  
    33       <div id="xpress_wrap"> 
    44            
    5         <?php if(is_sidbar_disp()) : ?> 
     5        <?php if(xpress_is_theme_sidebar_disp()) : ?> 
    66            
    77                <div id="xpress_content" class="narrowcolumn"> 
  • trunk/wp-content/themes/xpress_default/single.php

    r1 r32  
    1313 
    1414                <div class="xpress_single_navigation"> 
    15                         <div class="alignleft"><?php kuro_previous_post_link('&laquo; %link') ?></div> 
    16                         <div class="alignright"><?php kuro_next_post_link('%link &raquo;') ?></div> 
     15                        <div class="alignleft"><?php xpress_left_arrow_post_link(true) ?></div> 
     16                        <div class="alignright"><?php xpress_right_arrow_post_link(true) ?></div> 
    1717                </div> 
    1818 
  • trunk/wp-content/themes/xpress_default/style.css

    r25 r32  
    141141        font-size: 0.9em; 
    142142}        
     143 
     144#xpress_credit { 
     145        font-size: 0.9em; 
     146        color: darkgray; 
     147} 
     148#xpress_credit a { 
     149        font-size: 0.9em; 
     150        color: darkgray; 
     151}        
    143152/* End Typography & Colors */ 
    144153 
     
    250259        margin: 0; 
    251260        padding: 20px 0; 
     261        text-align: center; 
     262        } 
     263         
     264#xpress_credit { 
     265        margin: 0; 
     266        padding: 0; 
    252267        text-align: center; 
    253268        } 
Note: See TracChangeset for help on using the changeset viewer.