MyBB Community Forums

Full Version: [Tutorial/Guide] MyBB 1.6 Tips To Get The Most Out Of Your Forum
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
MyBB is great and all but it's not without its problems.
This post will cover most of the issues I have faced and how to fix them.

One of the biggest problem I had was with the lightbulb/indicators on the index page.

If you wanted to use a sub-forum, what would happen is the lightbulb's will stay on all the time saying you have unread posts in the sub-forum even though they where read.
This made using sub-forums a bit of a problem.

Thankfully lukasamd has made a patch to fix this.
To fix this you need to use the lightbulb fix and unread posts.

Grab the functions_forumlist.php from here and upload it to:

root/inc/functions_forumlist.php

Next install this addon: http://community.mybb.com/thread-71986.html

When Firefox 16.1 came out it broke the editor.js
This is the fix for it: http://community.mybb.com/post-924527.html#pid924527

On some servers the GeoIP doesn't work. To fix it so it works on all servers look here:
http://community.mybb.com/thread-95718.html

Sometimes when someone pastes a long bit of code using the code tag. It can go off the screen.
To fix this you need to enter a fixed size for the codeblock in the css.

To do this go to:
ACP >Templates & Style > Themes > Theme In Use > global.css > Advanced Mode

Now find this:
.codeblock

There maybe a few .codeblock in the css but you are looking for the one that has these values on its line:
width: max-width:

This is what it looks like on my forum:
.codeblock{background:#fff;border:1px solid #ccc;padding:0px;width:auto;max-width:800px;}

You basically want a fixed size for the max-width:

Similar to the codeblock problem. People will always post images that are to large for the forum. To set a fixed size for the images you can use this plugin:
http://mods.mybb.com/view/fit-on-page

Gravatar:
Lets users use their Gravatar Avatar saving on forum bandwidth.
http://mods.mybb.com/view/gravatar

Countries Flags:
Here is the mod I made for the flags that show up on my forum:
http://community.mybb.com/thread-87947.html

Add Top & Bottom Links/Buttons To Posts:
This will add arrows next to the post number so you can get to the top or bottom of the page. Handy for mods when they need to delete or move a post.
http://community.mybb.com/thread-99185.html

Move Posts:
By default MyBB hasn't got away to move a single/multiple post to another thread. This plugin allows you to do that:
http://mods.mybb.com/view/move-posts

MySpoiler:
Was kinda shocked to find out that MyBB doesn't use the Spoiler tag by default.
http://mods.mybb.com/view/myspoiler

I know not many forums have this feature but I believe its something all forums/boards software should have.
Delete Account:
http://community.mybb.com/thread-115714.html

Doesn't matter what you do, spam is going to be an issue. Lucky for Mybb owners there are some great plugins that will almost stop all spam accounts and posts.

Spam Manager for MyBB:
http://mods.mybb.com/view/spam-manager

Goodbye Spammer:
http://mods.mybb.com/view/goodbye-spammer

Hide Sigs and Website of New Users:
http://mybbhacks.zingaburga.com/showthread.php?tid=356

Registration Security Question:
http://mods.mybb.com/view/registration-s...y-question

reCAPTCHA Plugin:
http://mods.mybb.com/view/recaptcha

Spamalyser:
This will delete spam post and the user for you automatically.
http://mybbhacks.zingaburga.com/showthread.php?tid=1006

[Image: LFe5OCs.png]

Bad Behavior:
As this logs every IP visited to the site, it can make the database pretty large. You maybe better off using Cloudflare.com instead, but if for any reasons you can't, Bad Behavior is a very good option.
http://community.mybb.com/thread-94101.html

You will need to replace the /inc/bad-behavior/ in the plugin with the latest version as the one the plugin comes with is pretty dated.

If you decide to use Cloudflare.com you will need to do this:
https://support.cloudflare.com/entries/2...ybb-forums

You can also block know spam sites from ever getting onto your forum with a .htaccess file.
For an already made/complete .htaccess with blocking of know spam sites and caching and compressing of your content you can use this already made .htaccess file.

To help against DDOS attacks I would add a direct-connect A record so people can't find out your sites IP.

Here is an guide to add a firewall to your forum.
http://community.mybb.com/thread-103695.html

If you run a forum nowadays it would be wise to let your users gain access to your forum using a mobile device. Nearly everyone has a smart phone or tablet nowadays. Because of this you really should have a mobile version of your boards/forum.

With MyBB you can give people mobile access to the forum pretty easily with two addons:
http://www.mybbgm.com/download.php
http://www.tapatalk.com

I did have some issues with the latest version of Tapatalk 3.1.0, but you can find the fix here: http://support.tapatalk.com/threads/fail...post-76772

Really handy guide to speed up the forum:
http://community.mybb.com/thread-93652.html

But if you don't want to mess around with editing files and combining JS and CSS, these two addons will help out a fair bit, and all you need to do is upload them and turn them on.

http://mybbhacks.zingaburga.com/showthread.php?tid=497
http://mods.mybb.com/view/imei-page-optimizer

Here is a tool to scheduled a task to Optimize Database Tables. I have it setup to run every 8 hours.

http://community.mybb.com/thread-101842.html

Here is a robots.txt for MyBB that will stop search bots going to places you don't want them to:
Sitemap: http://Your-Forum/sitemap-index.xml

User-agent: *
Crawl-delay: 15
Disallow: /admin*
Disallow: /member.php
Disallow: /contact-us.php
Disallow: /donate.php*
Disallow: /captcha.php
Disallow: /editpost.php
Disallow: /misc.php
Disallow: /modcp.php
Disallow: /moderation.php
Disallow: /newreply.php
Disallow: /newthread.php
Disallow: /online.php
Disallow: /printthread.php
Disallow: /private.php
Disallow: /ratethread.php
Disallow: /report.php
Disallow: /reputation.php
Disallow: /search.php
Disallow: /sendthread.php
Disallow: /task.php
Disallow: /usercp.php
Disallow: /usercp2.php
Disallow: /calendar.php
Disallow: /*action=emailuser*
Disallow: /*action=nextnewest*
Disallow: /*action=nextoldest*
Disallow: /*year=*
Disallow: /*action=weekview*
Disallow: /*action=nextnewest*
Disallow: /*action=nextoldest*
Disallow: /*sort=*
Disallow: /*order=*
Disallow: /*mode=*
Disallow: /*datecut=*
Allow: /

Useful plugins:
Select All In Code And PHP:
http://mods.mybb.com/view/select-all-in-code-and-php
AutoMedia
http://community.mybb.com/thread-55969.html
MyBBPublisher: Really awesome plugin but takes a bit of know how to setup. You do need to create a Twitter API.
http://mods.mybb.com/view/mypublisher
ProStats:
http://prostats.wordpress.com/
Tera Donation Module:
http://community.mybb.com/thread-84084.html

Template Changes for Tera Donation.


Quote:Thanks, got the template sorted now so it doesn't show peoples email. Is there a way to show what Currency they used on the Top Donators page? At the moment its just showing the amount. Also it would be nice to show peoples notes on the Top Donators page.

Another thing that would be nice is instead of showing there emails you could show there website address with a link to it.
Thanks for a great plugin. Forget about my last comment. After doing some digging in the templates pretty much everything I wanted to do can be done.

[Image: pinguyosforumtopdonator.png]

Going to look into adding website links for donators but I don't think it will be that hard to do.

Anyway thanks for this awesome plugin. Its defiantly one of my top 5 Plug-ins for MyBB, and I use a lot Smile

If anyone wants to know how-to get your Top Donators page to look like mine this is how.

Go to Templates & Styles > Templates >Global Templates > teradonate_top

And replace everything with this:

<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->front_teradonate_top_title} </title>
{$headerinclude}
</head>
<body>
{$header}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
    <tr>
        <td class="thead" colspan="5">
            <div>
                <strong>{$lang->front_teradonate_top_title}</strong>
            </div>
        </td>
    </tr>
    <tr>
        <th align="center" class="tcat" width="15%" ><span class="smalltext"><strong>{$lang->global_teradonate_name}</strong></span>
        </th>
                <th align="center" class="tcat"  width="25%"><span class="smalltext"><strong>{$lang->front_teradonate_donationnote}</strong></span>
        </th>
        <th align="center" class="tcat"  width="15%"><span class="smalltext"><strong>{$lang->global_teradonate_amount}</strong></span>
        </th>
        <th align="center" class="tcat"  width="15%"><span class="smalltext"><strong>{$lang->global_teradonate_ebank}</strong></span>
        </th>
        <th align="center" class="tcat"  width="15%"><span class="smalltext"><strong>{$lang->global_teradonate_date}</strong></span>
        </th>
                
    </tr>
    {$donations}
    <tr>
        <td class="tfoot" colspan="5">
            </td>
    </tr>
</table>
<br style="clear: both" />

{$footer}
</body>
</html>

Then go to Templates & Styles > Templates >Global Templates > teradonate_top_donation

And replace everything with this:

<tr>
    <td class="trow1" align="center">
        {$top_donors['name']}
    </td>
    
        <td align="center" class="trow2">
        {$top_donors['note']}
    </td>

    <td align="center" class="trow1">
        {$top_donors['amount']} {$top_donors['currency']}    
        </td>
    
    <td align="center" class="trow2">
    {$top_donors['ebank']}
    </td>
    
    <td align="center" class="trow1">
        {$top_donors['dateline']}
    </td>
    
</tr>

Yesterday I found a PHP script called PHP Speedy. After reading what it could do I decided to give it ago (bear in mind I had already followed this guide so the forum has already been tweaked). After activating the script the forum went from taking around 4-5 seconds to load to 1.5 and under. Not all the features work but the ones that do make a huge differences.

[Image: bOjvXJ1l.jpg]

http://tools.pingdom.com/fpt/#!/KEvobm75...guyos.com/

Guide:

First download the script.
[attachment=29452]

Unzip it and upload it to the root of you're MyBB install.

Next go to http://YOUR-FORUM/php_speedy/install.php

Fill in a user name and password (don't worry about this to much because we will be deleting this later)

[Image: rrKmHhtl.jpg]

On the next page just click next.

[Image: 1N8L2cil.jpg]

On the next page keep all the option as they are and click next.

On Stage 3 of the install you will see a link to a test page. Don't worry about this. It doesn't work but the script works fine.

Near the bottom of the Stage 3 page you will see this:

[Image: LPHlN9dl.jpg]

Copy the parts I have highlighted because you are going to need to add them to the global.php

In the root of you're MyBB install you will find global.php. Download it and edit it to include the bit of code you just copied.

You're global.php should look something like this:

Top of global.php
[Image: cpo1nrAl.jpg]

Bottom of global.php
[Image: CiZFKqll.jpg]

Now save it and upload it back to the MyBB root install.

If everything is working fine then you can go ahead and delete index.php and install.php from the php_speedy folder.

If you are having issues try turning on and off options on Stage 2 of the install.

If its not working at all. Just remove the code you added to the global.php
Except for the functions_forumlist.php file lukasamd offers in the "Fix lightbulb" thread, is view_unread_posts.zip really necessary? Unread posts plugin already offers the same that this plugin.
If you come across this problem: http://community.mybb.com/thread-116019.html

[Image: hnEMxq9.png]

Replace /inc/datahandlers/post.php with this:

[attachment=29451]