Changeset 145 for trunk/wp-content/plugins/xpressme/xpressme_class.php
- Timestamp:
- Mar 31, 2009, 7:00:25 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/plugins/xpressme/xpressme_class.php
r143 r145 22 22 var $d3forum_forum_id; 23 23 var $d3forum_external_link_format; 24 var $is_content_excerpt; 25 var $ascii_judged_rate; 26 var $excerpt_length_word; 27 var $excerpt_length_character; 28 var $more_link_text; 29 var $viewer_type; 24 30 //constructor 25 31 function XPressME_Class() … … 47 53 { 48 54 $this->is_use_xoops_upload_path = true; 49 $this->is_theme_sidebar_disp = true;55 $this->is_theme_sidebar_disp = false; 50 56 $this->is_save_post_revision = true; 51 57 $this->is_postnavi_title_disp = true; … … 65 71 $this->is_d3forum_desc = true; 66 72 $this->d3forum_views_num = 10; 73 $this->is_content_excerpt = true; 74 $this->ascii_judged_rate = 90; 75 $this->excerpt_length_word = 40; 76 $this->excerpt_length_character = 120; 77 $this->more_link_text = __('more', 'xpressme'); 78 $this->viewer_type = 'xoops'; 79 67 80 } 68 81 … … 105 118 'is_d3forum_flat' => $this->is_d3forum_flat, 106 119 'is_d3forum_desc' => $this->is_d3forum_desc, 107 'd3forum_views_num' =>$this->d3forum_views_num 120 'd3forum_views_num' =>$this->d3forum_views_num, 121 'is_content_excerpt' => $this->is_content_excerpt, 122 'ascii_judged_rate' => $this->ascii_judged_rate, 123 'excerpt_length_word' => $this->excerpt_length_word, 124 'excerpt_length_character' => $this->excerpt_length_character, 125 'more_link_text' => $this->more_link_text, 126 'viewer_type' => $this->viewer_type 108 127 ); 109 128 if ($mode == 'add_new') { … … 193 212 $this->d3forum_views_num = stripslashes(trim($_POST['ch_d3forum_view_num'])); 194 213 214 $this->is_content_excerpt = stripslashes(trim($_POST['ch_is_content_excerpt'])); 215 $this->ascii_judged_rate = stripslashes(trim($_POST['ch_ascii_judged_rate'])); 216 $this->excerpt_length_word = stripslashes(trim($_POST['ch_excerpt_length_word'])); 217 $this->excerpt_length_character = stripslashes(trim($_POST['ch_excerpt_length_character'])); 218 $this->more_link_text = stripslashes(trim($_POST['ch_more_link_text'])); 219 $this->viewer_type = stripslashes(trim($_POST['ch_viewer_type'])); 220 195 221 global $xoops_db; 196 222 $table = get_wp_prefix() . 'group_role'; … … 226 252 $form .= $this->yes_no_radio_option_sub($option_name,$yes,$no); 227 253 $form .= "</td>\n"; 228 $form .= "</tr> <tr>\n";254 $form .= "</tr>\n"; 229 255 230 256 return $form; … … 257 283 $form .= $this->text_option_sub($option_name); 258 284 $form .= "</td>\n"; 259 $form .= "</tr> <tr>\n";285 $form .= "</tr>\n"; 260 286 261 287 return $form; … … 496 522 return $form; 497 523 } 524 525 function excerpt_option(){ 526 $form = ''; 527 $form .= '<tr><th><label for="excerpt">' .__('Contents Excerpt Setting', 'xpressme') . '</label></th>'; 528 $form .= "<td>\n"; 529 $form .= "<table>\n"; 530 $form .= "<tr>\n"; 531 532 $form .= "<td>" . __('Is the excerpt display done with the archive of contents?','xpressme') . "</td>\n"; 533 $form .= "<td>\n"; 534 $form .= $this->yes_no_radio_option_sub('is_content_excerpt'); 535 $form .= "</td>\n"; 536 $form .= "</tr>\n"; 537 538 $form .= "<tr>\n"; 539 $form .= "<td>" . __('When ASCII character more than the set ratio is included, it is judged ASCII contents. ','xpressme') . "</td>\n"; 540 $form .= "<td>\n"; 541 $form .= $this->text_option_sub('ascii_judged_rate'); 542 $form .= "</td>\n"; 543 $form .= "</tr>\n"; 544 545 $form .= "<tr>\n"; 546 $form .= "<td>" . __('Excerpt length of word for ASCII contents','xpressme') . "</td>\n"; 547 $form .= "<td>\n"; 548 $form .= $this->text_option_sub('excerpt_length_word'); 549 $form .= "</td>\n"; 550 $form .= "</tr>\n"; 551 552 $form .= "<tr>\n"; 553 $form .= "<td>" . __('Excerpt length of character for multibyte contents','xpressme') . "</td>\n"; 554 $form .= "<td>\n"; 555 $form .= $this->text_option_sub('excerpt_length_character'); 556 $form .= "</td>\n"; 557 $form .= "</tr>\n"; 558 559 $form .= "<tr>\n"; 560 $form .= "<td>" . __('More Link Text (Is not displayed for the blank.)','xpressme') . "</td>\n"; 561 $form .= "<td>\n"; 562 $form .= $this->text_option_sub('more_link_text'); 563 $form .= "</td>\n"; 564 $form .= "</tr>\n"; 565 566 $form .= "</table></td></tr>\n"; 567 return $form; 568 } 569 570 function viewer_type_option(){ 571 $form = "<tr>\n"; 572 $form .= '<th><label for="viewer_type">' .__('Display Mode Setting', 'xpressme') . '</label></th>'; 573 $form .= "<td>\n"; 574 575 $form .= __('Select the XPressME Display Mode.', 'xpressme') ."\n"; 576 $form .= '<select name="ch_viewer_type">' . "\n"; 577 578 $form .= '<option value="xoops" '; 579 if ($this->viewer_type == 'xoops') $form .= ' selected="selected"'; 580 $form .= '>'.__('Xoops Mode', 'xpressme') ."</option>\n"; 581 582 $form .= '<option value="wordpress" '; 583 if ($this->viewer_type == 'wordpress') $form .= ' selected="selected"'; 584 $form .= '>'.__('WordPress Mode', 'xpressme') ."</option>\n"; 585 586 $form .= '<option value="user_select" '; 587 if ($this->viewer_type == 'user_select') $form .= ' selected="selected"'; 588 $form .= '>'.__('User select', 'xpressme') ."</option>\n"; 589 590 $form .= "</select><br />\n"; 591 592 $form .= "</td></tr>\n"; 593 return $form; 594 } 498 595 499 596 function option_page() … … 504 601 $this->SettingValueWrite('update'); 505 602 } else if (isset($_POST['submit_reset'])) { 506 $this-> fck_setDefault();603 $this->setDefault(); 507 604 $this->SettingValueWrite('update'); 508 605 } else if (isset($_POST['export_d3f'])) { … … 521 618 echo '<form method="post" action="' . $_SERVER["REQUEST_URI"] . '">'."\n" ; 522 619 echo '<table class="form-table">'."\n"; 620 echo $this->viewer_type_option(); 523 621 echo $this->yes_no_radio_option('is_use_xoops_upload_path', 524 622 __('Media Upload Base Path','xpressme'), … … 539 637 echo $this->single_post_navi_option(); 540 638 echo $this->posts_page_navi_option(); 541 639 echo $this->excerpt_option(); 542 640 543 641 echo $this->yes_no_radio_option('is_author_view_count',
Note: See TracChangeset
for help on using the changeset viewer.