Changeset 218 for trunk/wp-content/plugins/xpressme/xpressme_class.php
- Timestamp:
- May 20, 2009, 5:59:07 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/plugins/xpressme/xpressme_class.php
r202 r218 470 470 471 471 function d3forum_option($do_message = ''){ 472 global $xoops_db ;472 global $xoops_db,$xoops_config; 473 473 474 474 $d3frum_list = array(); … … 481 481 else 482 482 $selected = ''; 483 $forum_list .= '<option value="none"' . $selected . '>' . __('Do Not Comment Integration.', 'xpressme') . "</option>\n"; 484 485 // Form making for forum selection of D3forum 486 $modules_table = get_xoops_prefix() .'modules'; 487 $sql = "SELECT mid,name,isactive,dirname FROM $modules_table WHERE isactive = 1"; 488 $modules = $xoops_db->get_results($sql); 489 foreach ($modules as $module) { 490 $file_path = $module_dir_path . '/modules/' . $module->dirname . '/mytrustdirname.php'; 491 if (! file_exists($file_path)) continue; 492 $array_files = file($file_path); 493 // It is checked whether there is character string "$mytrustdirname ='d3forum'"in the file. 494 foreach ($array_files as $aeey_file){ 495 if( preg_match( "/\s*(mytrustdirname)\s*(=)\s*([\"'])(d3forum)([\"'])/", $aeey_file ) ) { 496 $forums_tb = get_xoops_prefix() . $module->dirname . '_forums'; 497 $cat_tb = get_xoops_prefix() . $module->dirname . '_categories'; 498 $sql= "SELECT * FROM $forums_tb LEFT JOIN $cat_tb ON $forums_tb.cat_id = $cat_tb.cat_id"; 499 $forums = $xoops_db->get_results($sql); 500 foreach ($forums as $forum) { 501 if (($module->dirname == $this->d3forum_module_dir) && ($forum->forum_id == $this->d3forum_forum_id)) 502 $selected = ' selected="selected"'; 503 else 504 $selected = ''; 505 $forum_div = 'forum|' . $module->dirname . '|' . $forum->forum_id; 506 $forum_select = "$module->name($module->dirname) $forum->cat_title-$forum->forum_title(ID=$forum->forum_id)"; 507 $forum_list .= '<option value="' . $forum_div . '" ' . $selected . '>' . $forum_select . "</option>\n"; 483 484 if ($xoops_config->is_wpmu) { 485 $forum_list .= '<option value="none"' . $selected . '>' . __('WordPress MU cannot integrate the comments.', 'xpressme') . "</option>\n"; 486 } else { 487 $forum_list .= '<option value="none"' . $selected . '>' . __('Do Not Comment Integration.', 'xpressme') . "</option>\n"; 488 489 // Form making for forum selection of D3forum 490 $modules_table = get_xoops_prefix() .'modules'; 491 $sql = "SELECT mid,name,isactive,dirname FROM $modules_table WHERE isactive = 1"; 492 $modules = $xoops_db->get_results($sql); 493 foreach ($modules as $module) { 494 $file_path = $module_dir_path . '/modules/' . $module->dirname . '/mytrustdirname.php'; 495 if (! file_exists($file_path)) continue; 496 $array_files = file($file_path); 497 // It is checked whether there is character string "$mytrustdirname ='d3forum'"in the file. 498 foreach ($array_files as $aeey_file){ 499 if( preg_match( "/\s*(mytrustdirname)\s*(=)\s*([\"'])(d3forum)([\"'])/", $aeey_file ) ) { 500 $forums_tb = get_xoops_prefix() . $module->dirname . '_forums'; 501 $cat_tb = get_xoops_prefix() . $module->dirname . '_categories'; 502 $sql= "SELECT * FROM $forums_tb LEFT JOIN $cat_tb ON $forums_tb.cat_id = $cat_tb.cat_id"; 503 $forums = $xoops_db->get_results($sql); 504 foreach ($forums as $forum) { 505 if (($module->dirname == $this->d3forum_module_dir) && ($forum->forum_id == $this->d3forum_forum_id)) 506 $selected = ' selected="selected"'; 507 else 508 $selected = ''; 509 $forum_div = 'forum|' . $module->dirname . '|' . $forum->forum_id; 510 $forum_select = "$module->name($module->dirname) $forum->cat_title-$forum->forum_title(ID=$forum->forum_id)"; 511 $forum_list .= '<option value="' . $forum_div . '" ' . $selected . '>' . $forum_select . "</option>\n"; 512 } 513 break; 508 514 } 509 break;510 515 } 516 $forum_list .= '<br>'; 511 517 } 512 $forum_list .= '<br>';513 518 } 514 519 $forum_list .= '</select>' . "\n";
Note: See TracChangeset
for help on using the changeset viewer.