Shows locked topics with a line through them
Global Annoucnements, Announcements & Stickies remain untouched. Note that the following script enables this board wide. If you would like a per-forum option, see urther down
# #-----[ OPEN ]------------------------------------------ # viewforum.php # #-----[ FIND ]------------------------------------------ #
// Send vars to template
# #-----[ BEFORE ADD ]------------------------------------------ #
if ($row['topic_type'] == POST_NORMAL) { $strike_title = ($row['topic_status'] == ITEM_LOCKED) ? '<span style="text-decoration: line-through">' . censor_text($row['topic_title']) . '</span>' : censor_text($row['topic_title']); } else { $strike_title = censor_text($row['topic_title']); }
# #-----[ FIND ]------------------------------------------ #
'TOPIC_TITLE' => censor_text($row['topic_title']),
# #-----[ REPLACE WITH ]------------------------------------------ #
'TOPIC_TITLE' => $strike_title,
# #-----[ ALTERNATIVE REPLACEMENTS ]------------------------------------------ #
If you would like to only strike out titles on in selected forums, use the following code instead of the 1st 'before add'.
$strike_forums = array("1", "2", "3"); // replace 1, 2, 3 with your forum ID's. Add/remove as necessary if (in_array($forum_id, $strike_forums)) { if ($row['topic_type'] == POST_NORMAL) { $strike_title = ($row['topic_status'] == ITEM_LOCKED) ? '<span style="text-decoration: line-through">' . censor_text($row['topic_title']) . '</span>' : censor_text($row['topic_title']); } else if ($row['topic_type'] == (POST_GLOBAL || POST_ANNOUCE || POST_STICKY)) { $strike_title = censor_text($row['topic_title']); } } else { $strike_title = censor_text($row['topic_title']); }
If you would to disable strikes only in selected forums, use the following code instead of the 1st 'before add'.
$strike_forums = array("1", "2", "3"); // replace 1, 2, 3 with your forum ID's. Add/remove as necessary if (!in_array($forum_id, $strike_forums)) { $strike_title = censor_text($row['topic_title']); } else { if ($row['topic_type'] == POST_NORMAL) { $strike_title = ($row['topic_status'] == ITEM_LOCKED) ? '<span style="text-decoration: line-through">' . censor_text($row['topic_title']) . '</span>' : censor_text($row['topic_title']); } else if ($row['topic_type'] == (POST_GLOBAL || POST_ANNOUCE || POST_STICKY)) { $strike_title = censor_text($row['topic_title']); } }