Changeset 108 for trunk/wp-content/plugins/xpressme/xpressme_class.php
- Timestamp:
- Mar 15, 2009, 10:29:28 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/plugins/xpressme/xpressme_class.php
r104 r108 56 56 $this->d3forum_forum_id = ''; 57 57 $this->d3forum_external_link_format = get_xpress_dir_name() . '::xpressD3commentContent'; 58 $this->is_d3forum_flat = true; 59 $this->is_d3forum_desc = true; 60 $this->d3forum_views_num = 10; 58 61 } 59 62 … … 90 93 'd3forum_module_dir' => $this->d3forum_module_dir, 91 94 'd3forum_forum_id' => $this->d3forum_forum_id, 92 'd3forum_external_link_format' => $this->d3forum_external_link_format 95 'd3forum_external_link_format' => $this->d3forum_external_link_format, 96 'is_d3forum_flat' => $this->is_d3forum_flat, 97 'is_d3forum_desc' => $this->is_d3forum_desc, 98 'd3forum_views_num' =>$this->d3forum_views_num 93 99 ); 94 100 if ($mode == 'add_new') { … … 169 175 $this->d3forum_external_link_format = get_xpress_dir_name() . '::xpressD3commentContent'; 170 176 } 177 $this->is_d3forum_flat = stripslashes(trim($_POST['ch_d3forum_type'])); 178 $this->is_d3forum_desc = stripslashes(trim($_POST['ch_d3forum_order'])); 179 $this->d3forum_views_num = stripslashes(trim($_POST['ch_d3forum_view_num'])); 171 180 172 181 global $xoops_db; … … 282 291 } 283 292 284 function d3forum_option( ){293 function d3forum_option($do_message = ''){ 285 294 global $xoops_db; 286 295 … … 306 315 // It is checked whether there is character string "$mytrustdirname ='d3forum'"in the file. 307 316 foreach ($array_files as $aeey_file){ 308 if( preg_match( "/\s*( $mytrustdirname)\s*(=)\s*([\"'])(d3forum)([\"'])/", $aeey_file ) ) {317 if( preg_match( "/\s*(mytrustdirname)\s*(=)\s*([\"'])(d3forum)([\"'])/", $aeey_file ) ) { 309 318 $forums_tb = get_xoops_prefix() . $module->dirname . '_forums'; 310 319 $cat_tb = get_xoops_prefix() . $module->dirname . '_categories'; … … 323 332 } 324 333 } 325 $for m.= '<br>';334 $forum_list .= '<br>'; 326 335 } 327 336 $forum_list .= '</select>' . "\n"; … … 332 341 $form .= __('Select the forum of D3Forum that does the comment integration from the following lists.', 'xpressme') ."<br />\n"; 333 342 $form .= $forum_list."\n"; 334 $form .= '<br /><br /><br /><br /><br /><br /><br />'; 343 $form .= '<br /><br />'; 344 if ($this->is_use_d3forum) $disible = ''; else $disible = 'disabled'; 345 $form .= __('Select the Type of display of D3Forum comment.', 'xpressme') . " \n&emsp"; 346 if ($this->is_d3forum_flat){ 347 $form .= "&ensp<label><input type='radio' name='ch_d3forum_type' value='1' checked='checked' />" . __('Flat','xpressme') ."</label>\n"; 348 $form .= "&ensp<label><input type='radio' name='ch_d3forum_type' value='0' />". __('Threaded','xpressme') . "</label>\n"; 349 }else{ 350 $form .= "&ensp<label><input type='radio' name='ch_d3forum_type' value='1' />" . __('Flat','xpressme') . "</label>\n"; 351 $form .= "&ensp<label><input type='radio' name='ch_d3forum_type' value='0' checked='checked' />". __('Threaded','xpressme') ."</label>\n"; 352 } 353 $form .= '<br />'; 354 $form .= __('Select the order of display of D3Forum comment.', 'xpressme') . " \n&emsp"; 355 if ($this->is_d3forum_desc){ 356 $form .= "&ensp<label><input type='radio' name='ch_d3forum_order' value='1' checked='checked' />" . __('DESC','xpressme') ."</label>\n"; 357 $form .= "&ensp<label><input type='radio' name='ch_d3forum_order' value='0' />". __('ASC','xpressme') . "</label>\n"; 358 }else{ 359 $form .= "&ensp<label><input type='radio' name='ch_d3forum_order' value='1' />" . __('DESC','xpressme') . "</label>\n"; 360 $form .= "&ensp<label><input type='radio' name='ch_d3forum_order' value='0' checked='checked' />". __('ASC','xpressme') ."</label>\n"; 361 } 362 $form .= '<br />'; 363 $form .= __('Number of displays of D3Forum comments.', 'xpressme') ." \n"; 364 $form .= '&emsp<label> <input name="ch_d3forum_view_num" type="text" size="3" maxlength="3" value="' . $this->d3forum_views_num . '" /></label>'."\n"; 365 366 $form .= '<div class="submit">'."\n"; 367 $form .= __('The import and the export between Wordpress Comments and the D3Forum Posts can be done. ', 'xpressme') ."<br />\n"; 368 $form .= '<input type="submit" value= "' . __('Export to D3Forum', 'xpressme') . '" name="export_d3f" ' . $disible . ' >' ."\n"; 369 $form .= '<input type="submit" value= "' . __('Import from D3Forum', 'xpressme') . '" name="inport_d3f" ' . $disible . ' >' ."<br />\n"; 370 $form .= '</div>'."\n"; 371 if (!empty($do_message)){ 372 $form .= '<div>' . $do_message . '</div>'; 373 } 335 374 $form .= "</td>\n"; 336 375 $form .= "</tr><tr>\n"; … … 340 379 function option_page() 341 380 { 342 381 $do_message =''; 343 382 if (!empty($_POST['submit_update'])) { 344 383 $this->ReadPostData(); … … 347 386 $this->fck_setDefault(); 348 387 $this->SettingValueWrite('update'); 349 } 350 388 } else if (isset($_POST['export_d3f'])) { 389 $do_message = 'export(' . $this->d3forum_module_dir . '--ID=' . $this->d3forum_forum_id . ')................'; 390 $do_message .= wp_to_d3forum($this->d3forum_forum_id, $this->d3forum_module_dir); 391 $do_message .= '....END'; 392 } else if (isset($_POST['inport_d3f'])) { 393 $do_message = 'Import(' . $this->d3forum_module_dir . '--ID=' . $this->d3forum_forum_id . ')................'; 394 $do_message .= d3forum_to_wp($this->d3forum_forum_id, $this->d3forum_module_dir); 395 $do_message .= '....END'; 396 } 351 397 352 398 echo '<div class="wrap">'."\n"; … … 399 445 echo $this->groupe_role_option(); 400 446 401 echo $this->d3forum_option( );447 echo $this->d3forum_option($do_message); 402 448 // $this->is_use_xoops_upload_path_html(); 403 449 echo "</table>\n";
Note: See TracChangeset
for help on using the changeset viewer.