Do not bump posting.php
-----
| Author | Message | |
|---|---|---|
|
lotte |
||
| Wed Sep 27, 2006 4:53 pm Post subject: Do not bump posting.php | ||
|
Hi,
I'm running into a small problem while editing posting.php regarding the do not bump mod. It says to find: Code: case 'reply':
case 'vote': if ( empty( $topic_id) ) { message_die(GENERAL_MESSAGE, $lang['No_topic_id']); } $sql = "SELECT f.*, t.topic_status, t.topic_title, t.topic_type FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t WHERE t.topic_id = $topic_id AND f.forum_id = t.forum_id"; break; And replace with: Code: // Do Not Bump - Begin Code Alteration
// Original phpBB Code: case 'reply': case 'vote': if ( empty( $topic_id) ) { message_die(GENERAL_MESSAGE, $lang['No_topic_id']); } $sql = "SELECT f.*, t.topic_status, t.topic_title, t.topic_type FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t WHERE t.topic_id = $topic_id AND f.forum_id = t.forum_id"; break; */ case 'reply': case 'vote': if ( empty( $topic_id) ) { message_die(GENERAL_MESSAGE, $lang['No_topic_id']); } $select_sql = $from_sql = $where_sql = ''; if ( $mode == 'reply' && $submit ) { $select_sql = ', t.topic_time, t.topic_replies, t.topic_poster, p.poster_id as last_poster_id, p.post_time'; $from_sql = ', ' . POSTS_TABLE . ' p '; $where_sql = ' AND t.topic_last_post_id = p.post_id'; } $sql = 'SELECT f.*, t.topic_status, t.topic_title, t.topic_type' . $select_sql . ' FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . ' f ' . $from_sql . " WHERE t.topic_id = $topic_id AND f.forum_id = t.forum_id" . $where_sql; break; // // Do Not Bump - End Code Alteration But the first find code is not the same as my own. Mine is: Code: case 'reply':
case 'vote': if ( empty( $topic_id) ) { message_die(GENERAL_MESSAGE, $lang['No_topic_id']); } $sql = "SELECT f.*, t.topic_status, t.topic_title, t.topic_poster, t.topic_type FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t WHERE t.topic_id = $topic_id AND f.forum_id = t.forum_id"; break; Can I overwrite my part or do I have to overwrite my part with a changed 'replace with' part. Sorry for my bad English, I'm from the Netherlands. Hope you can help me. Lotte |
||
|
Thoul |
||
| Wed Sep 27, 2006 5:08 pm Post subject: re: Do not bump posting.php | ||
|
It would be best to overwrite what you currently have with this. It's a little different.
Code: // Do Not Bump - Begin Code Alteration
// Original phpBB Code: case 'reply': case 'vote': if ( empty( $topic_id) ) { message_die(GENERAL_MESSAGE, $lang['No_topic_id']); } $sql = "SELECT f.*, t.topic_status, t.topic_title, t.topic_type FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t WHERE t.topic_id = $topic_id AND f.forum_id = t.forum_id"; break; */ case 'reply': case 'vote': if ( empty( $topic_id) ) { message_die(GENERAL_MESSAGE, $lang['No_topic_id']); } $select_sql = $from_sql = $where_sql = ''; if ( $mode == 'reply' && $submit ) { $select_sql = ', t.topic_time, t.topic_replies, p.poster_id as last_poster_id, p.post_time'; $from_sql = ', ' . POSTS_TABLE . ' p '; $where_sql = ' AND t.topic_last_post_id = p.post_id'; } $sql = 'SELECT f.*, t.topic_status, t.topic_title, t.topic_poster, t.topic_type' . $select_sql . ' FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . ' f ' . $from_sql . " WHERE t.topic_id = $topic_id AND f.forum_id = t.forum_id" . $where_sql; break; // // Do Not Bump - End Code Alteration |
||
|
lotte |
||
| Wed Sep 27, 2006 5:37 pm Post subject: re: Do not bump posting.php | ||
|
Thanks Thoul !!
Gonna give it a try. Hope your mod works better than the auto lock mod cause that one made the server crash. Lotte |
||
Page 1 of 1