Changeset 402
- Timestamp:
- Oct 15, 2009, 5:27:19 PM (15 years ago)
- Files:
-
- 4 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; -
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.