| Description de la Mod | Définit la date de publication des sujets ou les rends privés, ou autre options pratiques |
| Compatibilité de la Mod | Invision Power Board 1.3 |
| Catégorie de la Mod | Major Mod |
| Auteur de la Mod | Peter |
| Adresse e-mail de l'auteur de la mod | Peter@ibforen.de |
| Info Fichier | sources/mods/enhanced_topics/mod_enhanced_topics_howto.htm |
| Version de la Mod | 1.1.0 |
| Commentaires | Distribution interdite. Téléchargement autorisé depuis ibforen.de. Tous les changements peuvent être reconnus avec le mod_token Cette page html-howto a été créée par The ModInstaller 1.3.2 de Peter@ibforen.de, sorti le 2007-01-08 Date de création 2008-12-01 Ce n'est pas pour un usage public. Attention
|
| Mod Token | mod_enhanced_topics |
| Changed file | Changed function |
| index.php | add_array(..) |
| sources/Admin/ad_forums.php | do_new(..), do_edit(..), doeditsub(..) |
| sources/Admin/ad_forums.php | new_form(..), edit_form(..), subedit(..) |
| sources/Admin/ad_forums.php | recount(..) |
| sources/Admin/ad_groups.php | group_form(..) |
| sources/Admin/ad_groups.php | save_group(..) |
| sources/Admin/ad_settings.php | ad_settings(..) |
| sources/Admin/ad_settings.php | docount(..) |
| sources/Admin/ad_settings.php | post(..) |
| sources/browsebuddy.php | splash(..) |
| sources/Forums.php | render_forum(..) |
| sources/functions.php | load_member(..) |
| sources/lib/modfunctions.php | forum_recount(..) |
| sources/lib/post_edit_post.php | complete_edit(..) |
| sources/lib/post_edit_post.php | show_form(..) |
| sources/lib/post_new_post.php | add_new_topic(..) |
| sources/lib/post_new_post.php | show_form(..) |
| sources/lib/post_poll.php | add_new_poll(..) |
| sources/lib/post_poll.php | show_form(..) |
| sources/lib/post_q_reply_post.php | add_reply(..) |
| sources/lib/post_reply_post.php | add_reply(..) |
| sources/lib/search_mysql_ftext.php | do_main_search(..) |
| sources/lib/search_mysql_ftext.php | do_simple_search(..) |
| sources/lib/search_mysql_man.php | do_main_search(..) |
| sources/Moderate.php | topic_history(..) |
| sources/Online.php | list_all(..) |
| sources/Post.php | Post(..) |
| sources/Search.php | get_active(..) |
| sources/Search.php | get_all_user(..) |
| sources/Search.php | get_last_ten(..) |
| sources/Search.php | get_new_posts(..) |
| sources/Search.php | Search(..) |
| sources/Topics.php | class properties or methods |
| sources/Topics.php | Topics(..) |
Trouver dans function add_array(..)
|
if ( $ibforums->input['act'] == 'home' ) |
|
//-- mod_enhanced_topics begin $mod_enhanced_topics_act = $choice[ $ibforums->input['act']]; if ($mod_enhanced_topics_act == "Boards" || $mod_enhanced_topics_act == "Forums" || $mod_enhanced_topics_act == "Topics" || $mod_enhanced_topics_act == "Post" || ($mod_enhanced_topics_act == "home" && !$ibforums->vars['csite_on']) ) { $act_time = time(); $DB->query("SELECT * FROM ibf_topics WHERE ((release_date<>'0' OR release_date IS NOT NULL) AND release_date<='$act_time') OR ((end_date<>'0' OR end_date IS NOT NULL) AND end_date<='$act_time') "); if ($DB->get_num_rows()) { if (!class_exists("enhanced_topics")) { require ROOT_PATH."sources/mods/enhanced_topics/mod_enhanced_topics_func.php"; $mod_enhanced_topics = new enhanced_topics; } while ($topic = $DB->fetch_row()) { $mod_enhanced_topics->update_topic($topic); } } if ($mod_enhanced_topics_act == "Post") { if (!class_exists("enhanced_topics")) { require ROOT_PATH."sources/mods/enhanced_topics/mod_enhanced_topics_func.php"; $mod_enhanced_topics = new enhanced_topics; } } } //-- mod_enhanced_topics end if ( $ibforums->input['act'] == 'home' ) |
Trouver dans function splash(..)
|
$DB->query("SELECT COUNT(pid) as posts FROM ibf_posts WHERE post_date > '".$ibforums->member['last_visit']."' AND queued <> 1 AND forum_id IN($forum_string)"); |
|
//-- mod_enhanced_topics begin $this->act_time = time(); $this->can_enhanced_topics = ($ibforums->member['mgroup'] == $ibforums->vars['admin_group']) || ($ibforums->member['id'] && $ibforums->member['g_is_supmod']); if (!$this->can_enhanced_topics) $DB->query("SELECT COUNT(p.pid) as posts FROM ibf_posts p LEFT JOIN ibf_topics t ON (p.topic_id=t.tid) WHERE p.post_date > '{$ibforums->member['last_visit']}' AND (t.release_date='0' OR (t.release_date IS NULL) OR (t.release_date<='{$this->act_time}')) AND (t.private IS NULL OR (t.private='0') OR (t.private<>'0' AND t.starter_id='{$ibforums->member['id']}')) AND p.queued <> 1 AND p.forum_id IN($forum_string)"); else //-- mod_enhanced_topics end $DB->query("SELECT COUNT(pid) as posts FROM ibf_posts WHERE post_date > '".$ibforums->member['last_visit']."' AND queued <> 1 AND forum_id IN($forum_string)"); |
A. Trouver dans function load_member(..)
|
$DB->query("SELECT moderator.mid as is_mod, |
|
//-- mod_enhanced_topics begin if (TRUE) $DB->query("SELECT m.*,g.*, moderator.mid as is_mod, moderator.forum_id as mod_fid, moderator.allow_warn FROM ibf_members m LEFT JOIN ibf_groups g ON (g.g_id=m.mgroup) LEFT JOIN ibf_moderators moderator ON (moderator.member_id=m.id OR moderator.group_id=m.mgroup ) WHERE m.id=$member_id"); else //-- mod_enhanced_topics end $DB->query("SELECT moderator.mid as is_mod, |
B. Trouver dans function load_member(..)
|
$this->member = $DB->fetch_row(); |
|
$this->member = $DB->fetch_row(); //-- mod_enhanced_topics begin if ($this->member['is_mod']) { $this->member['mod_forums'][$this->member['mod_fid']] = 1; while ($r = $DB->fetch_row()) { $this->member['mod_forums'][$r['mod_fid']] = 1; } } //-- mod_enhanced_topics end |
A. Trouver dans function render_forum(..)
|
// Query the database to see how many topics there are in the forum //+---------------------------------------------------------------- |
|
// Query the database to see how many topics there are in the forum //+---------------------------------------------------------------- //-- mod_enhanced_topics begin $this->act_time = time(); $this->can_enhanced_topics = ($ibforums->member['mgroup'] == $ibforums->vars['admin_group']) || (is_array($ibforums->member['mod_forums']) && isset($ibforums->member['mod_forums'][$this->forum['id']]) ) || ($ibforums->member['id'] && $ibforums->member['g_is_supmod']); if (!$this->can_enhanced_topics) $DB->query("SELECT COUNT(tid) as max FROM ibf_topics WHERE forum_id=".$this->forum['id']." AND ((release_date='0') OR (release_date IS NULL) OR (release_date<='{$this->act_time}')) AND (private IS NULL OR (private='0') OR (private<>'0' AND starter_id='{$ibforums->member['id']}')) AND approved=1 AND (pinned=1 OR last_post > $Prune)"); else //-- mod_enhanced_topics end |
B. Trouver dans function render_forum(..)
|
$this->output .= $this->render_entry( $topic ); |
|
//-- mod_enhanced_topics begin if (!$this->can_enhanced_topics) { if ($topic['release_date'] && $topic['release_date'] > $this->act_time) continue; if ($topic['private'] && $topic['starter_id'] != $ibforums->member['id']) continue; if ($topic['private'] && $topic['starter_id'] == $ibforums->member['id']) $topic['title'] = "<{B_HOT}> ".$topic['title']; } else { $title = ""; if ($topic['release_date'] && $topic['release_date'] > $this->act_time) $title = "<{WARN_ADD}> "; if ($topic['end_date'] && $topic['end_date'] > $this->act_time) $title .= "<{WARN_MINUS}> "; $topic['title'] = $title.$topic['title']; if ($topic['private']) $topic['title'] = "<{B_HOT}> ".$topic['title']; } //-- mod_enhanced_topics end $this->output .= $this->render_entry( $topic ); |
Trouver dans function topic_history(..)
|
$this->output .= $this->html->topic_history($data); |
|
$this->output .= $this->html->topic_history($data); //-- mod_enhanced_topics begin $lang = $std->load_words($lang, "mod_enhanced_topics_lang", $ibforums->lang_id); $time = time(); if ($topic['release_date']) { $started = $std->get_date($topic['release_date'], "LONG", false, true); $desc = $topic['release_date'] < $time?$lang['topic_was_started']:$lang['topic_started']; $match = "`^(.*)(<tr>.*?pformleftw.*?".preg_quote($ibforums->lang['th_last_date']).")`is"; $insert = " <tr> <td class='pformleftw'><b>$desc</b></td> <td class='pformright'>$started</td> </tr> "; $this->output = preg_replace($match, "\\1".$insert."\\2", $this->output); } if ($topic['end_date']) { $closed = $std->get_date($topic['end_date'], "LONG", false, true); $desc = $topic['end_date'] < $time?$lang['topic_was_closed']:$lang['topic_closed']; $match = "`^(.*)(<tr>.*?pformleftw.*?".preg_quote($ibforums->lang['th_last_date']).")`is"; $insert = " <tr> <td class='pformleftw'><b>$desc</b></td> <td class='pformright'>".$closed."</td> </tr> "; $this->output = preg_replace($match, "\\1".$insert."\\2", $this->output); } //-- mod_enhanced_topics end |
Trouver dans function list_all(..)
|
$tid_string = implode( ",", $tid_array ); |
|
$tid_string = implode( ",", $tid_array ); //-- mod_enhanced_topics begin $time = time(); if ($ibforums->member['mgroup'] != $ibforums->vars['admin_group']) $DB->query("SELECT tid, title FROM ibf_topics WHERE tid IN ($tid_string) AND ((release_date IS NULL) OR release_date<='$time') AND (private IS NULL OR (private='0') OR (private<>'0' AND (starter_id='{$ibforums->member['id']}'))) "); else //-- mod_enhanced_topics end |
A. Trouver dans function Post(..)
|
// Require and run our associated library file for this action. |
|
//-- mod_enhanced_topics begin $this->can_enhanced_topics = ($ibforums->member['mgroup'] == $ibforums->vars['admin_group']) || (is_array($ibforums->member['mod_forums']) && isset($ibforums->member['mod_forums'][$this->forum['id']]) ) || ($ibforums->member['id'] && $ibforums->member['g_is_supmod']); $this->can_post_private = ($ibforums->member['mgroup'] == $ibforums->vars['admin_group'] || $ibforums->member['g_private']) && $this->forum['f_private'] && !$this->forum['f_all_private']; //-- mod_enhanced_topics end // Require and run our associated library file for this action. |
B. Trouver dans function Post(..)
|
// Redirect to the newest topic in the forum |
|
// Redirect to the newest topic in the forum //-- mod_enhanced_topics begin $time = time(); if (!$this->can_enhanced_topics) $DB->query("SELECT tid from ibf_topics WHERE forum_id='".$this->forum['id']."' AND approved=1 AND ((release_date IS NULL ) OR release_date<='$time') AND (private IS NULL OR (private='0') OR (private<>'0' AND starter_id='{$ibforums->member['id']}')) ORDER BY last_post DESC LIMIT 0,1"); else //-- mod_enhanced_topics end |
A. Trouver dans function Search(..)
|
if (! $ibforums->vars['allow_search']) |
|
//-- mod_enhanced_topics begin $this->is_admin = $ibforums->member['mgroup'] == $ibforums->vars['admin_group']; $this->act_time = time(); //-- mod_enhanced_topics end if (! $ibforums->vars['allow_search']) |
B. Trouver dans function get_all_user(..)
|
$DB->query("SELECT pid FROM ibf_posts WHERE queued <> 1 AND forum_id IN($forums) AND author_id=$mid"); |
|
//-- mod_enhanced_topics begin if ($ibforums->member['mgroup'] != $ibforums->vars['admin_group']) $DB->query("SELECT p.pid FROM ibf_posts p LEFT JOIN ibf_topics t ON (p.topic_id=t.tid) WHERE ((t.release_date IS NULL) OR (t.release_date<='{$this->act_time}')) AND (t.private IS NULL OR (t.private='0') OR (t.private<>'0' AND t.starter_id='{$ibforums->member['id']}')) AND (p.queued <> 1) AND p.forum_id IN($forums) AND p.author_id='$mid'"); else //-- mod_enhanced_topics end $DB->query("SELECT pid FROM ibf_posts WHERE queued <> 1 AND forum_id IN($forums) AND author_id=$mid"); |
C. Trouver dans function get_new_posts(..)
|
$DB->query("SELECT t.tid FROM ibf_topics t WHERE t.approved=1 AND t.forum_id IN($forums) AND t.last_post > '".$ibforums->member['last_visit']."'"); |
|
//-- mod_enhanced_topics begin if (!$this->is_admin) $DB->query("SELECT t.tid FROM ibf_topics t WHERE (t.approved=1) AND t.forum_id IN($forums) AND ((t.release_date IS NULL ) OR t.release_date<='{$this->act_time}') AND (t.private IS NULL OR (t.private='0') OR (t.private<>'0' AND t.starter_id='{$ibforums->member['id']}')) AND t.last_post > '".$ibforums->member['last_visit']."'"); else //-- mod_enhanced_topics end $DB->query("SELECT t.tid FROM ibf_topics t WHERE t.approved=1 AND t.forum_id IN($forums) AND t.last_post > '".$ibforums->member['last_visit']."'"); |
D. Trouver dans function get_last_ten(..)
|
$DB->query("SELECT p.*, t.*, f.id as forum_id, f.name as forum_name FROM ibf_forums f, ibf_posts p, ibf_topics t WHERE p.queued <> 1 AND p.forum_id IN($forums) AND p.author_id='".$ibforums->member['id']."' AND t.tid=p.topic_id AND f.id=p.forum_id ORDER BY p.post_date DESC LIMIT 0,10"); |
|
//-- mod_enhanced_topics begin if (!$this->is_admin) $DB->query("SELECT p.*, t.*, f.id as forum_id, f.name as forum_name FROM ibf_forums f, ibf_posts p, ibf_topics t WHERE p.queued <> 1 AND p.forum_id IN($forums) AND p.author_id='".$ibforums->member['id']."' AND ((t.release_date IS NULL) OR (t.release_date<='{$this->act_time}')) AND (t.private IS NULL OR (t.private='0') OR (t.private<>'0' AND t.starter_id='{$ibforums->member['id']}')) AND t.tid=p.topic_id AND f.id=p.forum_id ORDER BY p.post_date DESC LIMIT 0,10"); else //-- mod_enhanced_topics end $DB->query("SELECT p.*, t.*, f.id as forum_id, f.name as forum_name FROM ibf_forums f, ibf_posts p, ibf_topics t WHERE p.queued <> 1 AND p.forum_id IN($forums) AND p.author_id='".$ibforums->member['id']."' AND t.tid=p.topic_id AND f.id=p.forum_id ORDER BY p.post_date DESC LIMIT 0,10"); |
E. Trouver dans function get_active(..)
|
ORDER BY t.last_post DESC LIMIT 0,200"; |
|
ORDER BY t.last_post DESC LIMIT 0,200"; //-- mod_enhanced_topics begin $query = str_replace("WHERE", "WHERE ((t.release_date IS NULL) OR t.release_date<='{$this->act_time}') AND ((t.private IS NULL) OR (t.private='0') OR (t.private<>'0' AND t.starter_id='{$ibforums->member['id']}')) AND ", $query); $query = str_replace("DISTINCT(t.tid)", "DISTINCT(t.tid), t.release_date,t.private,t.starter_id ", $query); //-- mod_enhanced_topics end |
F. Trouver dans function get_active(..)
|
$topics = ""; while ($row = $DB->fetch_row() ) { |
|
$topics = ""; while ($row = $DB->fetch_row() ) { //-- mod_enhanced_topics begin if (!$this->is_admin) { if ($row['release_date'] && $row['release_date'] >$this->act_time) { $max_hits -= 1; continue; } if ($row['private'] && $row['starter_id'] != $ibforums->member['id']) { $max_hits -= 1; continue; } } //-- mod_enhanced_topics end |
G. Trouver dans function get_active(..)
|
$row['keywords'] = $url_words; $this->output .= $this->html->RenderRow( $this->parse_entry($row) ); } |
|
//-- mod_enhanced_topics begin if (!$this->is_admin) { if ($row['release_date'] && $row['release_date'] >$this->act_time) { continue; } if ($row['private'] && $row['starter_id'] != $ibforums->member['id']) { continue; } } //-- mod_enhanced_topics end $row['keywords'] = $url_words; $this->output .= $this->html->RenderRow( $this->parse_entry($row) ); } |
A. Trouver dans function Topics(..)
|
$this->forum = array( 'id' => $this->topic['forum_id'] , |
|
//-- mod_enhanced_topics begin $title = $this->topic['title']; $this->can_enhanced_topics = ($ibforums->member['mgroup'] == $ibforums->vars['admin_group']) || (is_array($ibforums->member['mod_forums']) && isset($ibforums->member['mod_forums'][$this->topic['forum_id']]) ) || ($ibforums->member['id'] && $ibforums->member['g_is_supmod']); if ($this->can_enhanced_topics) { global $mod_enhanced_topics; if (!class_exists("enhanced_topics")) { require_once ROOT_PATH."sources/mods/enhanced_topics/mod_enhanced_topics_func.php"; $mod_enhanced_topics = new enhanced_topics; } $this->topic['title'] = $mod_enhanced_topics->update_topic_title($this->topic); if ($this->topic['private']) { $this->topic['title'] = "<{B_HOT}> ".$this->topic['title']; } } else { if ($this->topic['release_date'] > time()) { $std->boink_it($ibforums->base_url); } if ($this->topic['private']) { if ($this->topic['starter_id'] == $ibforums->member['id']) { global $mod_enhanced_topics; if (!class_exists("enhanced_topics")) { require_once ROOT_PATH."sources/mods/enhanced_topics/mod_enhanced_topics_func.php"; $mod_enhanced_topics = new enhanced_topics; } $this->topic['title'] = "<{B_HOT}> ".$this->topic['title']; } else { $std->boink_it($ibforums->base_url); } } } //-- mod_enhanced_topics end $this->forum = array( 'id' => $this->topic['forum_id'] , |
B. Trouver dans function Topics(..)
|
$row['post_date'] = $std->get_date( $row['post_date'], 'LONG' ); |
|
//-- mod_enhanced_topics begin if ($ibforums->vars['enhanced_topics_newpost']) { $ibforums->lang = $std->load_words($ibforums->lang, 'mod_enhanced_topics_lang', $ibforums->lang_id); if ($ibforums->member['id']) { if ($row['post_date'] >= $ibforums->member['last_visit']) { $read_status = "<span style='color:red'><img src='style_images/<#IMG_DIR#>/icon_msg_new.gif' alt='{$ibforums->lang['post_new']}' title='{$ibforums->lang['post_new']}' /></span> "; } else { $read_status = "<span style='color:blue'><img src='style_images/<#IMG_DIR#>/icon_msg_nonew_dis.gif' alt='{$ibforums->lang['post_old']}' title='{$ibforums->lang['post_old']}' /></span> "; } } else { $read_status = ""; } } //-- mod_enhanced_topics end $row['post_date'] = $std->get_date( $row['post_date'], 'LONG' ); |
C. Trouver dans function Topics(..)
|
$row['ip_address'] = $this->view_ip($row, $poster); |
|
//-- mod_enhanced_topics begin $row['post_icon'] = $read_status.$row['post_icon']; //-- mod_enhanced_topics end $row['ip_address'] = $this->view_ip($row, $poster); |
D. Trouver
|
$print->do_output( array( 'TITLE' => $ibforums->vars['board_name']." -> {$this->topic['title']}", |
|
/*-- mod_enhanced_topics exclude begin $print->do_output( array( 'TITLE' => $ibforums->vars['board_name']." -> {$this->topic['title']}", |
E. Trouver
|
$print->do_output( array( 'TITLE' => $ibforums->vars['board_name']." -> {$this->topic['title']}", |
|
$print->do_output( array( 'TITLE' => $ibforums->vars['board_name']." -> {$this->topic['title']}", -- mod_enhanced_topics exclude end */ //-- mod_enhanced_topics begin $print->do_output( array( 'TITLE' => $ibforums->vars['board_name']." -> $title", //-- mod_enhanced_topics end |
A. Trouver dans function recount(..)
|
$DB->query("SELECT COUNT(tid) as count FROM ibf_topics WHERE approved=1 and forum_id='".$IN['f']."'"); |
|
/*-- mod_enhanced_topics exclude begin $DB->query("SELECT COUNT(tid) as count FROM ibf_topics WHERE approved=1 and forum_id='".$IN['f']."'"); |
B. Trouver dans function recount(..)
|
$last_post = $DB->fetch_row(); |
|
$last_post = $DB->fetch_row(); -- mod_enhanced_topics exclude end */ //-- mod_enhanced_topics begin $time = time(); $hide = "((t.release_date IS NULL) OR (t.release_date<='$time')) AND ((t.private IS NULL) OR (t.private='0'))"; $DB->query("SELECT COUNT(t.tid) as count FROM ibf_topics t WHERE t.approved=1 AND $hide AND t.forum_id='".$IN['f']."'"); $topics = $DB->fetch_row(); $DB->query("SELECT COUNT(p.pid) as count FROM ibf_posts p LEFT JOIN ibf_topics t ON (t.tid=p.topic_id) WHERE $hide AND p.queued <> 1 and p.forum_id='".$IN['f']."'"); $posts = $DB->fetch_row(); $DB->query("SELECT t.tid, t.title, t.last_poster_id, t.last_poster_name, t.last_post FROM ibf_topics t WHERE $hide AND t.approved=1 and t.forum_id='".$IN['f']."' ORDER BY t.last_post DESC LIMIT 0,1"); $last_post = $DB->fetch_row(); //-- mod_enhanced_topics end |
C. Trouver dans function new_form(..), edit_form(..), subedit(..)
|
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Allow use of the [doHTML] tag?</b><br />This will allow HTML to be posted and executed" , $SKIN->form_yes_no("FORUM_HTML" |
|
//-- mod_enhanced_topics begin $this->lang = $std->load_words($this->lang, 'mod_enhanced_topics_lang', $ADMIN->lang_id); $ADMIN->html .= $SKIN->add_td_basic( $this->lang['enhanced_topics_title'], 'left', 'catrow2' ); $ADMIN->html .= $SKIN->add_td_row( array( $this->lang['ad_private_forum'] , $SKIN->form_yes_no("f_private", $forum['f_private'] ) ) ); $ADMIN->html .= $SKIN->add_td_row( array( $this->lang['ad_all_private_forum'] , $SKIN->form_yes_no("f_all_private", $forum['f_all_private'] ) ) ); $ADMIN->html .= $SKIN->add_td_spacer(); //-- mod_enhanced_topics end $ADMIN->html .= $SKIN->add_td_row( array( "<b>Allow use of the [doHTML] tag?</b><br />This will allow HTML to be posted and executed" , $SKIN->form_yes_no("FORUM_HTML" |
D. Trouver dans function do_new(..), do_edit(..), doeditsub(..)
|
'notify_modq_emails'=> $IN['notify_modq_emails'], |
|
'notify_modq_emails'=> $IN['notify_modq_emails'], //-- mod_enhanced_topics begin 'f_private' => $IN['f_private'], 'f_all_private' => $IN['f_all_private'], //-- mod_enhanced_topics end |
A. Trouver dans function save_group(..)
|
'g_email_limit' => intval($IN['join_limit']).':'.intval($IN['join_flood']), |
|
'g_email_limit' => intval($IN['join_limit']).':'.intval($IN['join_flood']), //-- mod_enhanced_topics begin 'g_private' => $IN['g_private'], //-- mod_enhanced_topics end |
B. Trouver dans function group_form(..)
|
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Can post new topics (where allowed)?</b>" , $SKIN->form_yes_no("g_post_new_topics" |
|
//-- mod_enhanced_topics begin $this->lang = $std->load_words($this->lang, 'mod_enhanced_topics_lang', $ADMIN->lang_id); $ADMIN->html .= $SKIN->add_td_row( array( $this->lang['ad_private_group'] , $SKIN->form_yes_no("g_private", $group['g_private'] ) ) ); //-- mod_enhanced_topics end $ADMIN->html .= $SKIN->add_td_row( array( "<b>Can post new topics (where allowed)?</b>" , $SKIN->form_yes_no("g_post_new_topics" |
A. Trouver dans function docount(..)
|
$DB->query("SELECT COUNT(pid) as posts FROM ibf_posts WHERE queued <> 1"); |
|
/*-- mod_enhanced_topics exclude begin $DB->query("SELECT COUNT(pid) as posts FROM ibf_posts WHERE queued <> 1"); |
B. Trouver dans function docount(..)
|
$DB->query("SELECT COUNT(tid) as topics FROM ibf_topics WHERE approved = 1"); |
|
$DB->query("SELECT COUNT(tid) as topics FROM ibf_topics WHERE approved = 1"); -- mod_enhanced_topics exclude end */ //-- mod_enhanced_topics begin $time = time(); $hide = "((t.release_date IS NULL) OR (t.release_date<='$time')) AND ((t.private IS NULL) OR t.private='0')"; $DB->query("SELECT COUNT(p.pid) as posts FROM ibf_posts p LEFT JOIN ibf_topics t ON (t.tid=p.topic_id) WHERE $hide AND p.queued <> 1"); $r = $DB->fetch_row(); $stats['TOTAL_REPLIES'] = $r['posts']; $stats['TOTAL_REPLIES'] < 1 ? 0 : $stats['TOTAL_REPLIES']; $DB->query("SELECT COUNT(t.tid) as topics FROM ibf_topics t WHERE t.approved=1 AND $hide"); //-- mod_enhanced_topics end |
C. Trouver dans function post(..)
|
$INFO['post_order_sort'] ? $INFO['post_order_sort'] : 'asc' ) ) ); |
|
$INFO['post_order_sort'] ? $INFO['post_order_sort'] : 'asc' ) ) ); //-- mod_enhanced_topics begin $ibforums->lang = $std->load_words($ibforums->lang, 'mod_enhanced_topics_lang', $ADMIN->lang_id); $ADMIN->html .= $SKIN->add_td_row( array( $ibforums->lang['ad_posts_show_new'] , $SKIN->form_yes_no( "enhanced_topics_newpost", $INFO['enhanced_topics_newpost'] ) ) ); //-- mod_enhanced_topics end |
D. Trouver dans function ad_settings(..)
|
'strip_quotes', |
|
'strip_quotes', //-- mod_enhanced_topics begin 'enhanced_topics_newpost', //-- mod_enhanced_topics end |
Trouver dans function forum_recount(..)
|
// Get the forum last poster.. //---------------------------------------------- |
|
// Get the forum last poster.. //---------------------------------------------- //-- mod_enhanced_topics begin $act_time = time(); if (TRUE) $DB->query("SELECT tid, title, last_poster_id, last_poster_name, last_post FROM ibf_topics WHERE approved=1 AND forum_id=$fid AND (release_date='0' OR (release_date IS NULL) OR (release_date<='$act_time')) AND ((private IS NULL) OR (private='0')) ORDER BY last_post DESC LIMIT 0,1"); else //-- mod_enhanced_topics end |
A. Trouver dans function complete_edit(..)
|
// Update topic title? //------------------------------------------------- |
|
// Update topic title? //------------------------------------------------- //-- mod_enhanced_topics begin if ( $this->edit_title != 1 && $class->can_post_private) { $private = $ibforums->input['private']; if ($private != $this->topic['private']) { global $mod_enhanced_topics; $dbs = $DB->compile_db_update_string( array( 'private' => $private, ) ); $DB->query("UPDATE ibf_topics SET $dbs WHERE tid=".$this->topic['tid']); $mod_enhanced_topics->update_forum($this->topic['forum_id']); } } else //-- mod_enhanced_topics end |
B. Trouver dans function complete_edit(..)
|
if ( ($ibforums->input['TopicTitle'] != $this->topic['title']) or ($ibforums->input['TopicDesc'] != $this->topic['description']) ) |
|
//-- mod_enhanced_topics begin if ($class->can_enhanced_topics) { global $mod_enhanced_topics; $release_date = $mod_enhanced_topics->check("start"); if ($release_date == "-1") { $std->Error( array( LEVEL => 1, MSG => 'error_date') ); } $end_date = $mod_enhanced_topics->check("end"); if ($end_date == "-1") { $std->Error( array( LEVEL => 1, MSG => 'error_date') ); } if ($end_date && $release_date >= $end_date) { $std->Error( array( LEVEL => 1, MSG => 'error_date_range') ); } $move_forum = $ibforums->input['move_forum']; if ($mod_enhanced_topics->changed($this->topic, $release_date, $end_date, $move_forum)) { $dbs = $DB->compile_db_update_string( array( 'release_date' => $release_date, 'end_date' => $end_date, 'not_released' => $release_date <> '', 'not_ended' => $end_date <> '', 'move_forum' => $move_forum, ) ); $DB->query("UPDATE ibf_topics SET $dbs WHERE tid=".$this->topic['tid']); $mod_enhanced_topics->update_forum($this->topic['forum_id']); } } if ($class->can_post_private) { $private = $ibforums->input['private']; if ($private != $this->topic['private']) { global $mod_enhanced_topics; $dbs = $DB->compile_db_update_string( array( 'private' => $private, ) ); $DB->query("UPDATE ibf_topics SET $dbs WHERE tid=".$this->topic['tid']); $mod_enhanced_topics->update_forum($this->topic['forum_id']); } } //-- mod_enhanced_topics end if ( ($ibforums->input['TopicTitle'] != $this->topic['title']) or ($ibforums->input['TopicDesc'] != $this->topic['description']) ) |
C. Trouver dans function show_form(..)
|
// Is this the first post in the topic? //------------------------------------------------- |
|
// Is this the first post in the topic? //------------------------------------------------- //-- mod_enhanced_topics begin if ( $this->edit_title != 1 && $class->can_post_private) { global $mod_enhanced_topics; $topic_title = $mod_enhanced_topics->show_form_private($this->topic['private']); } else //-- mod_enhanced_topics end |
D. Trouver dans function show_form(..)
|
$topic_title = $class->html->topictitle_fields( array( 'TITLE' => $topic_title, 'DESC' => $topic_desc ) ); |
|
$topic_title = $class->html->topictitle_fields( array( 'TITLE' => $topic_title, 'DESC' => $topic_desc ) ); //-- mod_enhanced_topics begin if ($class->can_post_private) { global $mod_enhanced_topics; $topic_title .= $mod_enhanced_topics->show_form_private($this->topic['private']); } if ($class->can_enhanced_topics) { global $mod_enhanced_topics; $topic_title .= $mod_enhanced_topics->show_form($this->topic); } //-- mod_enhanced_topics end |
A. Trouver dans function add_new_topic(..)
|
// Build the master array //------------------------------------------------- |
|
// Build the master array //------------------------------------------------- //-- mod_enhanced_topics begin if ($class->can_enhanced_topics) { global $mod_enhanced_topics; $release_date = $mod_enhanced_topics->check("start"); if ($release_date == "-1") { $std->Error( array( LEVEL => 1, MSG => 'error_date') ); } $end_date = $mod_enhanced_topics->check("end"); if ($end_date == "-1") { $std->Error( array( LEVEL => 1, MSG => 'error_date') ); } if ($end_date && $release_date >= $end_date) { $std->Error( array( LEVEL => 1, MSG => 'error_date_range') ); } if ($release_date && $release_date > time()) $class->obj['moderate'] = 0; } if ($class->forum['f_all_private']) { $private = 1; } else { $private = $ibforums->input['private']; if (!$class->can_post_private) { $private = '0'; } } //-- mod_enhanced_topics end |
B. Trouver dans function add_new_topic(..)
|
'start_date' => time(), |
|
'start_date' => time(), //-- mod_enhanced_topics begin 'release_date' => $release_date, 'end_date' => $end_date, 'not_released' => $release_date <> '', 'not_ended' => $end_date <> '', 'move_forum' => $ibforums->input['move_forum'], 'private' => $private, //-- mod_enhanced_topics end |
C. Trouver dans function add_new_topic(..)
|
$this->post['pid'] = $DB->get_insert_id(); |
|
$this->post['pid'] = $DB->get_insert_id(); //-- mod_enhanced_topics begin if ($private) { global $mod_enhanced_topics; $mod_enhanced_topics->update_members_post($class); $std->boink_it($class->base_url."act=ST&f={$class->forum['id']}&t={$this->topic['tid']}"); } if ($class->can_enhanced_topics && $release_date && $release_date > time()) { $std->boink_it($class->base_url."act=ST&f={$class->forum['id']}&t={$this->topic['tid']}"); } //-- mod_enhanced_topics end |
D. Trouver dans function show_form(..)
|
$class->output = preg_replace( "/<!--START TABLE-->/" , "$start_table" , $class->output ); |
|
//-- mod_enhanced_topics begin if ($class->can_post_private) { global $mod_enhanced_topics; $topic_title .= $mod_enhanced_topics->show_form_private(); } if ($class->can_enhanced_topics) { global $mod_enhanced_topics; $topic_title .= $mod_enhanced_topics->show_form($topic_title); } //-- mod_enhanced_topics end $class->output = preg_replace( "/<!--START TABLE-->/" , "$start_table" , $class->output ); |
A. Trouver dans function add_new_poll(..)
|
// Build the master array //------------------------------------------------- |
|
// Build the master array //------------------------------------------------- //-- mod_enhanced_topics begin if ( $ibforums->input['TopicTitle'] != "" ) { if ($class->can_enhanced_topics) { global $mod_enhanced_topics; $release_date = $mod_enhanced_topics->check("start"); if ($release_date == "-1") { $std->Error( array( LEVEL => 1, MSG => 'error_date') ); } $end_date = $mod_enhanced_topics->check("end"); if ($end_date == "-1") { $std->Error( array( LEVEL => 1, MSG => 'error_date') ); } if ($end_date && $release_date >= $end_date) { $std->Error( array( LEVEL => 1, MSG => 'error_date_range') ); } if ($release_date && $release_date > time()) $class->obj['moderate'] = 0; } if ($class->forum['f_all_private']) { $private = 1; } else { $private = $ibforums->input['private']; if (!$class->can_post_private) { $private = '0'; } } } //-- mod_enhanced_topics end |
B. Trouver dans function add_new_poll(..)
|
'start_date' => time(), |
|
'start_date' => time(), //-- mod_enhanced_topics begin 'release_date' => $release_date, 'end_date' => $end_date, 'not_released' => $release_date <> '', 'not_ended' => $end_date <> '', 'move_forum' => $ibforums->input['move_forum'], 'private' => $private, //-- mod_enhanced_topics end |
C. Trouver dans function add_new_poll(..)
|
$DB->query("INSERT INTO ibf_polls (" .$db_string['FIELD_NAMES']. ") VALUES (". $db_string['FIELD_VALUES'] .")"); |
|
$DB->query("INSERT INTO ibf_polls (" .$db_string['FIELD_NAMES']. ") VALUES (". $db_string['FIELD_VALUES'] .")"); //-- mod_enhanced_topics begin if ($private) { global $mod_enhanced_topics; $mod_enhanced_topics->update_members_post($class); $std->boink_it($class->base_url."act=ST&f={$class->forum['id']}&t={$this->topic['tid']}"); } if ($class->can_enhanced_topics && $release_date && $release_date > time()) { $std->boink_it($class->base_url."act=ST&f={$class->forum['id']}&t={$this->topic['tid']}"); } //-- mod_enhanced_topics end |
D. Trouver dans function show_form(..)
|
$class->output = preg_replace( "/<!--START TABLE-->/" , "$start_table" , $class->output ); |
|
//-- mod_enhanced_topics begin if ($class->can_post_private) { global $mod_enhanced_topics; $topic_title .= $mod_enhanced_topics->show_form_private(); } if ($class->can_enhanced_topics) { global $mod_enhanced_topics; $topic_title .= $mod_enhanced_topics->show_form($topic_title); } //-- mod_enhanced_topics end $class->output = preg_replace( "/<!--START TABLE-->/" , "$start_table" , $class->output ); |
A. Trouver dans function add_reply(..)
|
if ( $class->obj['moderate'] == 1 or $class->obj['moderate'] == 3 ) |
|
//-- mod_enhanced_topics begin if ($class->can_enhanced_topics) { $release_date = $this->topic['release_date']; if ($release_date && $release_date > time()) $class->obj['moderate'] = 0; } //-- mod_enhanced_topics end if ( $class->obj['moderate'] == 1 or $class->obj['moderate'] == 3 ) |
B. Trouver dans function add_reply(..)
|
//------------------------------------------------- // If we are still here, lets update the |
|
//-- mod_enhanced_topics begin if ($class->forum['f_all_private']) { $private = 1; } else { $private = $this->topic['private']; if (!$class->can_post_private) { $private = '0'; } } if ($private) { global $mod_enhanced_topics; $mod_enhanced_topics->update_private_topic($class, $this); $std->boink_it($class->base_url."act=ST&f={$class->forum['id']}&t={$this->topic['tid']}"); } if ($class->can_enhanced_topics && $release_date && $release_date > time()) { $std->boink_it($class->base_url."act=ST&f={$class->forum['id']}&t={$this->topic['tid']}"); } //-- mod_enhanced_topics end //------------------------------------------------- // If we are still here, lets update the |
A. Trouver dans function add_reply(..)
|
if ( $class->obj['moderate'] == 1 or $class->obj['moderate'] == 3 ) |
|
//-- mod_enhanced_topics begin if ($class->can_enhanced_topics) { $release_date = $this->topic['release_date']; if ($release_date && $release_date > time()) $class->obj['moderate'] = 0; } //-- mod_enhanced_topics end if ( $class->obj['moderate'] == 1 or $class->obj['moderate'] == 3 ) |
B. Trouver dans function add_reply(..)
|
//------------------------------------------------- // If we are still here, lets update the |
|
//-- mod_enhanced_topics begin if ($class->forum['f_all_private']) { $private = 1; } else { $private = $this->topic['private']; if (!$class->can_post_private) { $private = '0'; } } if ($private) { global $mod_enhanced_topics; $mod_enhanced_topics->update_private_topic($class, $this); $std->boink_it($class->base_url."act=ST&f={$class->forum['id']}&t={$this->topic['tid']}"); } if ($class->can_enhanced_topics && $release_date && $release_date > time()) { $std->boink_it($class->base_url."act=ST&f={$class->forum['id']}&t={$this->topic['tid']}"); } //-- mod_enhanced_topics end //------------------------------------------------- // If we are still here, lets update the |
A. Trouver dans function do_simple_search(..)
|
if ( $ibforums->input['sortby'] != "relevant" ) |
|
//-- mod_enhanced_topics begin if ($ibforums->member['mgroup'] != $ibforums->vars['admin_group']) { $time = time(); $hide = "WHERE ((t.release_date IS NULL) OR t.release_date<='$time') AND "; $hide .= "((t.private IS NULL) OR (t.private='0') OR (t.private='{$ibforums->member['id']}')) AND "; $cache = str_replace("WHERE", $hide , $cache); } //-- mod_enhanced_topics end if ( $ibforums->input['sortby'] != "relevant" ) |
B. Trouver dans function do_main_search(..)
|
//------------------------------------------------ // Get the topic ID's to serialize and store into |
|
//-- mod_enhanced_topics begin if ($ibforums->member['mgroup'] != $ibforums->vars['admin_group']) { $time = time(); $hide = " AND ((t.release_date IS NULL) OR (t.release_date<='$time')) AND "; $hide .= "((t.private IS NULL) OR t.private='0' OR (t.private='{$ibforums->member['id']}')) "; $topics_query .= $hide; $posts_query = preg_replace("` LEFT JOIN ibf_topics t ON \(.*?\)`is", "", $posts_query); $posts_query = str_replace("ibf_posts p", "ibf_posts p LEFT JOIN ibf_topics t ON (p.topic_id=t.tid)", $posts_query); $posts_query .= $hide; } //-- mod_enhanced_topics end //------------------------------------------------ // Get the topic ID's to serialize and store into |
Trouver dans function do_main_search(..)
|
//------------------------------------------------ // Get the topic ID's to serialize and store into |
|
//-- mod_enhanced_topics begin if ($ibforums->member['mgroup'] != $ibforums->vars['admin_group']) { $time = time(); $hide = " AND ((t.release_date IS NULL ) OR (t.release_date<='$time')) AND "; $hide .= "((t.private IS NULL) OR (t.private='0') OR (t.private='{$ibforums->member['id']}')) "; $topics_query .= $hide; $posts_query = preg_replace("` LEFT JOIN ibf_topics t ON \(.*?\)`is", "", $posts_query); $posts_query = str_replace("ibf_posts p", "ibf_posts p LEFT JOIN ibf_topics t ON (p.topic_id=t.tid)", $posts_query); $posts_query .= $hide; } //-- mod_enhanced_topics end //------------------------------------------------ // Get the topic ID's to serialize and store into |