XPressME Integration Kit

Trac

Changeset 26


Ignore:
Timestamp:
Dec 15, 2008, 2:09:03 PM (15 years ago)
Author:
toemon
Message:

サイドバー表示・非表示設定機能の実装 r10

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/xpress_render.php

    r1 r26  
    3535} 
    3636 
     37// get sidebar rendaring  
     38function get_sidebar_rander($name = null) 
     39{ 
     40        $templates = array(); 
     41        if ( isset($name) ) 
     42                $templates[] = "sidebar-{$name}.php"; 
     43 
     44        $templates[] = "sidebar.php"; 
     45 
     46        $link= locate_template($templates, false); 
     47        if ('' == $link) 
     48                $link =  get_theme_root() . '/default/sidebar.php'; 
     49 
     50        ob_start(); 
     51                require($link); 
     52                $sidebar = ob_get_contents(); 
     53        ob_end_clean(); 
     54        return $sidebar; 
     55} 
     56 
    3757// < body > tag is pulled out from the header of html contents.  
    3858function get_body($contents) 
    3959{ 
     60        $xpess_config = new XPressME_Class(); 
    4061        $pattern = "<body[^>]*?>(.*)<\/body>"; 
    4162        preg_match("/".$pattern."/s",  $contents, $body_matches); 
    4263        $body = $body_matches[1]; 
     64 
     65        if (!$xpess_config->is_theme_sidebar_disp){ 
     66                $side_panel = get_sidebar_rander(); 
     67                        $body = str_replace($side_panel,'',$body); 
     68        } 
    4369        return $body; 
    4470} 
  • trunk/wp-content/plugins/xpressme/language/xpressme-ja.po

    r19 r26  
    33"Project-Id-Version: fckeditor for xpress\n" 
    44"POT-Creation-Date: \n" 
    5 "PO-Revision-Date: 2008-12-08 16:40+0900\n" 
     5"PO-Revision-Date: 2008-12-14 13:55+0900\n" 
    66"Last-Translator: toemon <toychee@toemon.com>\n" 
    77"Language-Team: \n" 
     
    1212"X-Poedit-Country: JAPAN\n" 
    1313"X-Poedit-KeywordsList: _e;__\n" 
    14 "X-Poedit-Basepath: C:\\Data\\toemon.com\\Xpress\\FCK\\fckeditor_for_xpress_lang\n" 
    15 "X-Poedit-SearchPath-0: fckeditor_for_xpress\n" 
     14"X-Poedit-Basepath: C:\\XPressME2_SVN\\trunk\\wp-content\\plugins\\xpressme\n" 
     15"X-Poedit-SearchPath-0: .\n" 
    1616 
     17#: xpressme_class.php:19 
    1718msgid "XPressME Settings" 
    1819msgstr "XPressME設定" 
    1920 
     21#: xpressme_class.php:66 
     22msgid "YES" 
     23msgstr "はい" 
     24 
     25#: xpressme_class.php:67 
     26msgid "NO" 
     27msgstr "いいえ" 
     28 
     29#: xpressme_class.php:101 
    2030msgid "XPressME Configuration Page" 
    2131msgstr "XPressMEの設定ページ" 
    2232 
     33#: xpressme_class.php:105 
    2334msgid "Media Upload Base Path" 
    2435msgstr "メディアアップロードのベースパス設定" 
    2536 
     37#: xpressme_class.php:106 
    2638msgid "Use XOOPS UPLOAD PATH" 
    2739msgstr "XOOPSのアップロードパスを使用する。" 
    2840 
     41#: xpressme_class.php:107 
    2942msgid "USE WordPress BASE_PATH" 
    3043msgstr "WordPressのベースパスを使用する。" 
    3144 
     45#: xpressme_class.php:114 
     46msgid "Update Config" 
     47msgstr "更新" 
     48 
     49#: xpressme_class.php:115 
     50msgid "Preset Config" 
     51msgstr "プリセット" 
     52 
  • trunk/wp-content/plugins/xpressme/xpressme_class.php

    r22 r26  
    66        var $pluginName = 'xpressme';    
    77        var $is_use_xoops_upload_path; 
     8        var $is_theme_sidebar_disp; 
    89         
    910        //constructor 
     
    3031        { 
    3132                $this->is_use_xoops_upload_path = true; 
     33                $this->is_theme_sidebar_disp = true; 
    3234        } 
    3335         
     
    4951        { 
    5052                $write_options = array ( 
    51                         'is_use_xoops_upload_path' => $this->is_use_xoops_upload_path  
     53                        'is_use_xoops_upload_path' => $this->is_use_xoops_upload_path , 
     54                        'is_theme_sidebar_disp' => $this->is_theme_sidebar_disp  
    5255                ); 
    5356                if ($mode == 'add_new') { 
     
    6164        { 
    6265                $this->is_use_xoops_upload_path = stripslashes(trim($_POST['ch_is_use_xoops_upload_path'])); 
     66                $this->is_theme_sidebar_disp = stripslashes(trim($_POST['ch_is_theme_sidebar_disp'])); 
    6367        } 
    6468         
     
    107111                                                                                                __('USE WordPress BASE_PATH','xpressme') 
    108112                                                                                                ); 
     113                echo                            $this->yes_no_radio_option('is_theme_sidebar_disp', 
     114                                                                                                __('Thema Sidebar Display','xpressme'), 
     115                                                                                                __('YES','xpressme'), 
     116                                                                                                __('NO','xpressme') 
     117                                                                                                ); 
    109118                         
    110119//              $this->is_use_xoops_upload_path_html(); 
Note: See TracChangeset for help on using the changeset viewer.