XPressME Integration Kit

Trac

Changeset 20


Ignore:
Timestamp:
Dec 9, 2008, 5:15:15 PM (15 years ago)
Author:
toemon
Message:

メディアアップロード、ディレクトリ

XOOPSのアップロードパスを使用する。
WordPressのベースパスを使用する。

の切替機能実装 #38

File:
1 edited

Legend:

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

    r19 r20  
    88         
    99        //constructor 
    10         function wp_fckeditor() 
     10        function XPressME_Class() 
    1111        { 
    1212                $this->setdefault();    //not setting propaty load 
     
    1818        { 
    1919                add_options_page('XPressME', __('XPressME Settings', 'xpressme'), 8, 'xpressme_config', array(&$this, 'option_page')); 
    20 //              add_submenu_page('post.php', 'FCKEditor','FCKEditor',1, 'xpress_fckeditor', array(&$this, 'option_page')); 
    2120        } 
    2221         
     
    3635        { 
    3736                $options = get_option('xpressme_option'); 
    38  
    3937                if (!$options) { 
    4038                        $this->setDefault(); 
     
    4442                                $this-> {$option_name} = $option_value; 
    4543                        } 
    46                         $this->build_smiley_images($this->fck_SmileyPath,$this->fck_SmileyName); 
    4744                } 
    48  
    4945        } 
    5046         
     
    6157                } 
    6258        } 
     59         
     60        function ReadPostData() 
     61        { 
     62                $this->is_use_xoops_upload_path = stripslashes(trim($_POST['ch_is_use_xoops_upload_path'])); 
     63        } 
    6364                 
    6465        function option_page() 
    6566        { 
    66                 echo '<div class="wrap">'; 
    67                 echo '<div id="icon-options-general" class="icon32"><br /></div>'; 
    68                 echo '<h2>' . __('XPressME Configuration Page', 'xpressme') . '</h2> '; 
     67                if (!empty($_POST['submit_update'])) { 
     68                        $this->ReadPostData(); 
     69                        $this->SettingValueWrite('update'); 
     70                } else if (isset($_POST['submit_reset'])) { 
     71                        $this->fck_setDefault(); 
     72                        $this->SettingValueWrite('update'); 
     73                }  
    6974 
    70                 echo '<form method="post" action="options.php">'; 
    71                 echo '<table class="form-table">'; 
     75                 
     76                echo    '<div class="wrap">'; 
     77                echo            '<div id="icon-options-general" class="icon32"><br /></div>'; 
     78                echo            '<h2>' . __('XPressME Configuration Page', 'xpressme') . '</h2> '; 
    7279 
    73                 $this->is_use_xoops_upload_path_html(); 
    74                 echo '</table>'; 
    75                 echo '</div>'; 
     80                echo            '<form method="post" action="' . $_SERVER["REQUEST_URI"] . '">' ; 
     81                echo                    '<table class="form-table">'; 
     82                                                        $this->is_use_xoops_upload_path_html(); 
     83                echo                    '</table>'; 
     84                 
     85                echo            '<p class="submit">'; 
     86                echo            '<input type="submit" value= "' . __('Update Config', 'xpressme') . '" name="submit_update" />'; 
     87                echo            '<input type="submit" value= "' . __('Preset Config', 'xpressme') . '" name="submit_reset" />'; 
     88                echo            '</p>'; 
    7689 
     90                echo            '</form>' ; 
     91                echo    '</div>'; 
    7792        } 
    7893 
     
    8499                echo '<td>'; 
    85100 
    86 //              if ($this->is_use_xoops_upload_path == true){ 
     101                if ($this->is_use_xoops_upload_path == true){ 
    87102                        echo '<label><input type="radio" name="ch_is_use_xoops_upload_path"  value="1" checked="checked" /> ' . __('Use XOOPS UPLOAD PATH','xpressme') .'</label><br />'; 
    88103                        echo '<label><input type="radio" name="ch_is_use_xoops_upload_path" value="0" />' . __('USE WordPress BASE_PATH','xpressme') . '</label>'; 
     104                } else { 
     105                        echo '<label><input type="radio" name="ch_is_use_xoops_upload_path"  value="1" /> ' . __('Use XOOPS UPLOAD PATH','xpressme') .'</label><br />'; 
     106                        echo '<label><input type="radio" name="ch_is_use_xoops_upload_path" value="0" checked="checked" />' . __('USE WordPress BASE_PATH','xpressme') . '</label>'; 
     107                } 
    89108                echo '</td>'; 
    90109                echo '</tr><tr>'; 
Note: See TracChangeset for help on using the changeset viewer.