12-10-2009, 07:21 PM
Hello guys.
I made this tutorial to show you how to add the thread type before the post like "Poll:" (already in MyBB).
The Poll is already in MyBB. When you create a poll the forum display will input the "Poll: THREAD NAME".
After this tutorial you will make a sticky thread and before the name it will display "Sticky: THREAD NAME".
So...lets start? =D
First of all make a backup of the ./MYBB_ROOT/forumdisplay.php and inc/languages/english/global.lang.php in case you need to back to the old files.
1- Go to ./MYBB_ROOT/forumdisplay.php and search for:
Below add:
2- Now go to the inc/languages/english/global.lang.php and search for:
Below add:
Note: You can change the "Sticky" for whatever you want to call the sticky thread (Pinned/Stickied...).
Save all files and upload.
I made this tutorial to show you how to add the thread type before the post like "Poll:" (already in MyBB).
The Poll is already in MyBB. When you create a poll the forum display will input the "Poll: THREAD NAME".
After this tutorial you will make a sticky thread and before the name it will display "Sticky: THREAD NAME".
So...lets start? =D
First of all make a backup of the ./MYBB_ROOT/forumdisplay.php and inc/languages/english/global.lang.php in case you need to back to the old files.
1- Go to ./MYBB_ROOT/forumdisplay.php and search for:
Code:[Highlight]
if($thread['sticky'] == "1" && !$donestickysep)
{
eval("\$threads .= \"".$templates->get("forumdisplay_sticky_sep")."\";");
$shownormalsep = true;
$donestickysep = true;
}
else if($thread['sticky'] == 0 && $shownormalsep)
{
eval("\$threads .= \"".$templates->get("forumdisplay_threads_sep")."\";");
$shownormalsep = false;
}
Below add:
Code:[Highlight]
if($thread['sticky'])
{
$prefix = $lang->sticky_prefix;
}
2- Now go to the inc/languages/english/global.lang.php and search for:
Code:[Highlight]
$l['poll_prefix'] = "Poll:";
Below add:
Code:[Highlight]
$l['sticky_prefix'] = "<strong>Sticky:</strong>";
Note: You can change the "Sticky" for whatever you want to call the sticky thread (Pinned/Stickied...).
Save all files and upload.