Hello,
Attempting to do this mod and i'm a little confused at your steps 16-18. Looks like step 16 you ask us to search for something and add the code in step 17. Are we then supposed to replace what was searched for in step 16 with step 18?
#
#---------[ 16. FIND (line:513) ]---------------------------------------------------
#
else if (isset($_GET['unstick']))
{
confirm_referrer('viewtopic.php');
$unstick = intval($_GET['unstick']);
if ($unstick < 1)
message($lang_common['Bad request']);
$db->query('UPDATE '.$db->prefix.'topics SET sticky=\'0\' WHERE id='.$unstick) or error('Unable to unstick topic', __FILE__, __LINE__, $db->error());
redirect('viewtopic.php?id='.$unstick, $lang_misc['Unstick topic redirect']);
}
#
#---------[ 17. AFTER, ADD ]---------------------------------------------------
#
//Announce a topic
else if (isset($_GET['announce']))
{
confirm_referrer('viewtopic.php');
$stick = intval($_GET['announce']);
if ($stick < 1)
message($lang_common['Bad request']);
$db->query('UPDATE '.$db->prefix.'topics SET announcement=\'1\' WHERE id='.$stick) or error('Unable to announce topic', __FILE__, __LINE__, $db->error());
redirect('viewtopic.php?id='.$stick, $lang_misc['Announce topic redirect']);
}
// Un-Announce
else if (isset($_GET['unannounce']))
{
confirm_referrer('viewtopic.php');
$unstick = intval($_GET['unannounce']);
if ($unstick < 1)
message($lang_common['Bad request']);
$db->query('UPDATE '.$db->prefix.'topics SET announcement=\'0\' WHERE id='.$unstick) or error('Unable to un-announce topic', __FILE__, __LINE__, $db->error());
redirect('viewtopic.php?id='.$unstick, $lang_misc['Unannounce topic redirect']);
}
#
#---------[ 18. REPLACE WITH ]---------------------------------------------------
#
if ($num_pages_topic > 1) {
if ($cur_topic['announcement'] == '1')
$subject_multipage = '[ '.paginate($num_pages_topic, -1, 'viewannouncement.php?id='.$cur_topic['id']).' ]';
else
$subject_multipage = '[ '.paginate($num_pages_topic, -1, 'viewtopic.php?id='.$cur_topic['id']).' ]';
}