MyBB Source

everyBB - The forum owners community

4,000 Members! | Small Policy Change

Latest Releases: Valid Referrals - Bonus - Mark Thread Read

 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sticky: Prefix
Author Message
ccalby
Premium User


Posts: 887
Joined: Jan 2010
Reputation: 8
MyBux: 1038
Post: #1
Sticky: Prefix
Have you noticed in vBulletin how sticky threads appear like
Sticky: Thread Subject
?

Well, this is also possible in MyBB. First, take a backup of forumdisplay.php and global.lang.php incase something happens and you need to revert to the old files.

Now, open ./forumdisplay.php and find
PHP Code:
if($thread['sticky'] == "1" && !$donestickysep)
        {
            eval(
"\$threads .= \"".$templates->get("forumdisplay_sticky_sep")."\";");
            
$shownormalsep true;
            
$donestickysep true;
        }
        else if(
$thread['sticky'] == && $shownormalsep)
        {
            eval(
"\$threads .= \"".$templates->get("forumdisplay_threads_sep")."\";");
            
$shownormalsep false;
        } 
Now, add below
PHP Code:
if($thread['sticky'])
        {
            
$prefix $lang->sticky_prefix;
        } 
Now, in your ./inc/languages/english/global.lang.php

find
PHP Code:
$l['poll_prefix'] = "Poll:"
and add below that
PHP Code:
$l['sticky_prefix'] = "<em><strong>Sticky:</strong></em> 
";


Where you see
Quote:<em><strong>Sticky:</strong></em>
replace with whatever you want in HTML format and now when looking at a forum, all the important stickied threads will appear as Sticky: Subject

Regards,

--Conor

MyBBSource Tutorial Team Leader
MyBBSource Tutorials Are Located Here! - http://mybbsource.com/forum-40.html

MyBB Official Support Technician
05-29-2010 11:59 PM


kdog2fast
Member


Posts: 98
Joined: Jan 2010
Reputation: 0
MyBux: 124
Post: #2
RE: Sticky: Prefix
I'm guessing this will work for both 1.6 and 1.4 correct? And thank you for the tutorial, I was trying to figure something like this out and this gave me the right idea
06-04-2010 03:56 AM
ccalby
Premium User


Posts: 887
Joined: Jan 2010
Reputation: 8
MyBux: 1038
Post: #3
RE: Sticky: Prefix
I think it should, I will confirm it tomorrow however since I have no school xD

MyBBSource Tutorial Team Leader
MyBBSource Tutorials Are Located Here! - http://mybbsource.com/forum-40.html

MyBB Official Support Technician
06-04-2010 05:16 AM
Mikers
Tutorials Team Member



Posts: 146
Joined: Mar 2010
Reputation: 3
MyBux: 1939
Post: #4
RE: Sticky: Prefix
Yes, it'll work for both 1.6 and 1.4.

MyBB Source Tutorials
06-06-2010 10:48 AM
 





Web Design | Web Design Jobs