Changeset 402 for trunk/xpressme_integration_kit
- Timestamp:
- Oct 15, 2009, 5:27:19 PM (15 years ago)
- Location:
- trunk/xpressme_integration_kit/wp-content/plugins/xpressme
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme.php
r400 r402 216 216 echo '<form method="post" action="' . $_SERVER["REQUEST_URI"] . '">'."\n" ; 217 217 echo '<table class="form-table">'."\n"; 218 $upload_title = __('Media Upload Base Path','xpressme'); 219 if($xoops_config->is_wpmu) $upload_title = $upload_title . '(WPMU is not select)'; 218 220 echo $xpress_config->yes_no_radio_option('is_use_xoops_upload_path', 219 __('Media Upload Base Path','xpressme'),221 $upload_title, 220 222 __('Use XOOPS UPLOAD PATH','xpressme'), 221 __('USE WordPress BASE_PATH','xpressme') 223 __('USE WordPress BASE_PATH','xpressme'), 224 $xoops_config->is_wpmu 222 225 ); 223 226 -
trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php
r392 r402 48 48 function setDefault() 49 49 { 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; 50 55 $this->is_use_xoops_upload_path = true; 51 56 $this->is_theme_sidebar_disp = false; … … 102 107 function SettingValueWrite($mode) 103 108 { 109 global $xoops_config; 110 if($xoops_config->is_wpmu) $this->is_use_xoops_upload_path = false; 111 104 112 $write_options = array ( 105 113 'is_use_xoops_upload_path' => $this->is_use_xoops_upload_path , … … 256 264 } // end of loop 257 265 258 global $xoops_db; 266 global $xoops_config; 267 if($xoops_config->is_wpmu) $this->is_use_xoops_upload_path = false; 268 259 269 $table = get_wp_prefix() . 'group_role'; 260 270 // $sql= "SELECT * FROM $table"; … … 280 290 } 281 291 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){ 283 293 if (empty( $yes )) $yes = __('YES','xpressme') ; 284 294 if (empty( $no )) $no = __('NO','xpressme') ; … … 289 299 $form .= '<th><label for="images_to_link">' . $option_desc . "</label></th>\n"; 290 300 $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); 292 302 $form .= "</td>\n"; 293 303 $form .= "</tr>\n"; … … 296 306 297 307 } 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 299 311 if (empty( $yes )) $yes = __('YES','xpressme') ; 300 312 if (empty( $no )) $no = __('NO','xpressme') ; 301 313 $value = $this->{$option_name}; 302 314 $ans_name = 'ch_' . $option_name; 303 304 315 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"; 307 318 }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"; 310 321 } 311 322 return $form;
Note: See TracChangeset
for help on using the changeset viewer.