Current time: 08-19-2019, 12:17 AM Hello There, Guest! (LoginRegister)


Announcement
We have the biggest collection of MyBB Plugins here on the Net. We have currently 175+ MyBB Exclusive Plugins, 80+ MyBB Compatible MyCodes and 16+ MyBB 1.4.x Themes (Some are still under construction...) Thus, we provide you the largest MyBB Stuff on the net including tutorials. Stay with us, you will find out some more to come.
Now you can easily create your own buttons set for MyBB! Click here to have a look...
*** You cannot do your registration behind any Proxies anymore! ***
Welcome Guest[34.236.190.216], connected from Ashburn, Virginia United States
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tutorial] Adding Thread Type (Sticky)
12-10-2009, 07:21 PM
Post: #1
[Tutorial] Adding Thread Type (Sticky)
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:
        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:
        if($thread['sticky'])
        {
            $prefix = $lang->sticky_prefix;
        }


2- Now go to the inc/languages/english/global.lang.php and search for:
$l['poll_prefix'] = "Poll:";

Below add:
$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.

skiilz's signature
[Image: signature.php]
Find all posts by this user
Quote this message in a reply
12-10-2009, 08:23 PM
Post: #2
RE: [Tutorial] Adding Thread Type (Sticky)
A nice one. Thanks for the share.

babjusi's signature
Find all posts by this user
Quote this message in a reply
12-10-2009, 09:15 PM
Post: #3
RE: [Tutorial] Adding Thread Type (Sticky)
No problem!
Thank you.

skiilz's signature
[Image: signature.php]
Find all posts by this user
Quote this message in a reply
12-12-2009, 06:37 AM
Post: #4
RE: [Tutorial] Adding Thread Type (Sticky)
Nice tut, very helpful!
Thanks =D
Find all posts by this user
Quote this message in a reply
0 member(s) viewed this thread in the last 365 days :
Post Reply 


Was This Thread Useful ?
Please Link To Us
URL
BBCode
HTML

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [Tutorial] ''How to backup&restore your forum in several different ways'' babjusi 5 2,781 12-12-2009 02:22 PM
Last Post: babjusi
  [Tutorial] Centering the logo. babjusi 1 1,600 11-29-2009 05:45 PM
Last Post: babjusi

Forum Jump:

 
New To Site ?
Some Useful Links
  • Help

  • You Might Need To Register

  • Forum Statistics

  • Mark All Forums Read

  • Forum Staff

  • Log Out
  • Contact Us

  • Mybbcodes

  • Return to Top

  • Return to Content

  • Lite (Archive) Mode

  • RSS Syndication
  • Powered By MyBB, © 2002-2019 MyBB Group.
    Golden Crown - Designed and Published by ghazal & exdiogene of MyBBCodes.
    Hosting provided by WWWHostingServer.com