Changeset 402 for branches/Ver2.1/xpressme_integration_kit/wp-content
- Timestamp:
- Oct 15, 2009, 5:27:19 PM (15 years ago)
- Location:
- branches/Ver2.1/xpressme_integration_kit/wp-content/plugins/xpressme
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Ver2.1/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php
r380 r402 189 189 echo '<form method="post" action="' . $_SERVER["REQUEST_URI"] . '">'."\n" ; 190 190 echo '<table class="form-table">'."\n"; 191 $upload_title = __('Media Upload Base Path','xpressme'); 192 if($xoops_config->is_wpmu) $upload_title = $upload_title . '(WPMU is not select)'; 191 193 echo $xpress_config->yes_no_radio_option('is_use_xoops_upload_path', 192 __('Media Upload Base Path','xpressme'),194 $upload_title, 193 195 __('Use XOOPS UPLOAD PATH','xpressme'), 194 __('USE WordPress BASE_PATH','xpressme') 196 __('USE WordPress BASE_PATH','xpressme'), 197 $xoops_config->is_wpmu 195 198 ); 196 199 -
branches/Ver2.1/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php
r374 r402 45 45 function setDefault() 46 46 { 47 global $xoops_config; 48 if($xoops_config->is_wpmu) 49 $this->is_use_xoops_upload_path = false; 50 else 51 $this->is_use_xoops_upload_path = true; 47 52 $this->is_use_xoops_upload_path = true; 48 53 $this->is_theme_sidebar_disp = false; … … 96 101 function SettingValueWrite($mode) 97 102 { 103 global $xoops_config; 104 if($xoops_config->is_wpmu) $this->is_use_xoops_upload_path = false; 105 98 106 $write_options = array ( 99 107 'is_use_xoops_upload_path' => $this->is_use_xoops_upload_path , … … 244 252 } // end of loop 245 253 246 global $xoops_db; 254 global $xoops_config; 255 if($xoops_config->is_wpmu) $this->is_use_xoops_upload_path = false; 256 247 257 $table = get_wp_prefix() . 'group_role'; 248 258 // $sql= "SELECT * FROM $table"; … … 268 278 } 269 279 270 function yes_no_radio_option($option_name,$option_desc,$yes = '',$no= '' ){280 function yes_no_radio_option($option_name,$option_desc,$yes = '',$no= '' , $disible=false){ 271 281 if (empty( $yes )) $yes = __('YES','xpressme') ; 272 282 if (empty( $no )) $no = __('NO','xpressme') ; … … 277 287 $form .= '<th><label for="images_to_link">' . $option_desc . "</label></th>\n"; 278 288 $form .= "<td>\n"; 279 $form .= $this->yes_no_radio_option_sub($option_name,$yes,$no );289 $form .= $this->yes_no_radio_option_sub($option_name,$yes,$no,$disible); 280 290 $form .= "</td>\n"; 281 291 $form .= "</tr>\n"; … … 284 294 285 295 } 286 function yes_no_radio_option_sub($option_name,$yes = '',$no= ''){ 296 function yes_no_radio_option_sub($option_name,$yes = '',$no= '',$disible=false){ 297 if ($disible) $disible_str = ' disabled="disabled"'; else $disible_str = ''; 298 287 299 if (empty( $yes )) $yes = __('YES','xpressme') ; 288 300 if (empty( $no )) $no = __('NO','xpressme') ; 289 301 $value = $this->{$option_name}; 290 302 $ans_name = 'ch_' . $option_name; 291 292 303 if ($value){ 293 $form .= "<label><input type='radio' name='". $ans_name . "' value='1' checked='checked' />" . $yes ."</label><br />\n";294 $form .= "<label><input type='radio' name='". $ans_name . "' value='0' />". $no . "</label>\n";304 $form .= "<label><input type='radio' name='". $ans_name . "' value='1' checked='checked' $disible_str />" . $yes ."</label><br />\n"; 305 $form .= "<label><input type='radio' name='". $ans_name . "' value='0' $disible_str />". $no . "</label>\n"; 295 306 }else{ 296 $form .= "<label><input type='radio' name='". $ans_name . "' value='1' />" . $yes . "</label><br />\n";297 $form .= "<label><input type='radio' name='". $ans_name . "' value='0' checked='checked' />". $no ."</label>\n";307 $form .= "<label><input type='radio' name='". $ans_name . "' value='1' $disible_str />" . $yes . "</label><br />\n"; 308 $form .= "<label><input type='radio' name='". $ans_name . "' value='0' checked='checked' $disible_str />". $no ."</label>\n"; 298 309 } 299 310 return $form;
Note: See TracChangeset
for help on using the changeset viewer.