XPressME Integration Kit

Trac


Ignore:
Timestamp:
Oct 15, 2009, 5:27:19 PM (15 years ago)
Author:
toemon
Message:

WPMUでのメディアアップロード先をWordPressのアップロード先に固定 Fixes #224

File:
1 edited

Legend:

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

    r392 r402  
    4848        function setDefault() 
    4949        { 
     50                global $xoops_config; 
     51                if($xoops_config->is_wpmu) 
     52                        $this->is_use_xoops_upload_path = false; 
     53                else 
     54                        $this->is_use_xoops_upload_path = true; 
    5055                $this->is_use_xoops_upload_path = true; 
    5156                $this->is_theme_sidebar_disp = false; 
     
    102107        function SettingValueWrite($mode) 
    103108        { 
     109                global $xoops_config; 
     110                if($xoops_config->is_wpmu) $this->is_use_xoops_upload_path = false; 
     111 
    104112                $write_options = array ( 
    105113                        'is_use_xoops_upload_path' => $this->is_use_xoops_upload_path , 
     
    256264                } // end of loop 
    257265 
    258                 global $xoops_db; 
     266                global $xoops_config; 
     267                if($xoops_config->is_wpmu) $this->is_use_xoops_upload_path = false; 
     268 
    259269                $table = get_wp_prefix() . 'group_role';         
    260270//              $sql=  "SELECT * FROM $table";   
     
    280290        } 
    281291         
    282         function yes_no_radio_option($option_name,$option_desc,$yes = '',$no= ''){ 
     292        function yes_no_radio_option($option_name,$option_desc,$yes = '',$no= '' , $disible=false){ 
    283293                if (empty( $yes ))  $yes = __('YES','xpressme') ; 
    284294                if (empty( $no ))  $no = __('NO','xpressme') ; 
     
    289299                $form .=  '<th><label for="images_to_link">' . $option_desc . "</label></th>\n"; 
    290300                $form .=  "<td>\n"; 
    291                 $form .=  $this->yes_no_radio_option_sub($option_name,$yes,$no); 
     301                $form .=  $this->yes_no_radio_option_sub($option_name,$yes,$no,$disible); 
    292302                $form .=  "</td>\n"; 
    293303                $form .=  "</tr>\n"; 
     
    296306         
    297307        } 
    298         function yes_no_radio_option_sub($option_name,$yes = '',$no= ''){ 
     308        function yes_no_radio_option_sub($option_name,$yes = '',$no= '',$disible=false){ 
     309                if ($disible) $disible_str = ' disabled="disabled"'; else $disible_str = ''; 
     310 
    299311                if (empty( $yes ))  $yes = __('YES','xpressme') ; 
    300312                if (empty( $no ))  $no = __('NO','xpressme') ; 
    301313                $value = $this->{$option_name}; 
    302314                $ans_name = 'ch_' . $option_name; 
    303                  
    304315                if ($value){ 
    305                         $form .= "<label><input type='radio' name='". $ans_name . "' value='1' checked='checked' />" . $yes ."</label><br />\n"; 
    306                         $form .= "<label><input type='radio' name='". $ans_name . "' value='0' />". $no . "</label>\n"; 
     316                        $form .= "<label><input type='radio' name='". $ans_name . "' value='1' checked='checked' $disible_str />" . $yes ."</label><br />\n"; 
     317                        $form .= "<label><input type='radio' name='". $ans_name . "' value='0' $disible_str />". $no . "</label>\n"; 
    307318                }else{ 
    308                         $form .= "<label><input type='radio' name='". $ans_name . "' value='1' />" . $yes . "</label><br />\n"; 
    309                         $form .= "<label><input type='radio' name='". $ans_name . "' value='0' checked='checked' />". $no ."</label>\n"; 
     319                        $form .= "<label><input type='radio' name='". $ans_name . "' value='1' $disible_str />" . $yes . "</label><br />\n"; 
     320                        $form .= "<label><input type='radio' name='". $ans_name . "' value='0' checked='checked' $disible_str />". $no ."</label>\n"; 
    310321                } 
    311322            return $form; 
Note: See TracChangeset for help on using the changeset viewer.