MyBB Community Forums

Full Version: [Tutorial] How to edit the footer message in MyBB Internal/SQL Errors
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
INTRODUCTION:

MyBB Internal/SQL Errors can be quite scary. You usually come for help as you have no idea what to do. Fixing the error is definitely important but something even more important is the user. What will a user think if he sees that kind of message while he was happily browsing through your forum? Not all users will know what it means or what to do. The message in the footer asks you to contact the MyBB Group for support. Well I think it's pretty obvious that if something is operating incorrectly then you should ask for support and fix it. So instead, it should be telling users what's happening and what can they do to help. And that's what I will be teaching you in this tutorial.

TUTORIAL:

1. Open the file /inc/class_error.php.

2. Find the following piece of code in line 542:

<p id="footer">Please contact the <a href="http://mybb.com">MyBB Group</a> for support.</p>

3. Replace what's inside <p id="footer"></p> with your own custom message. (You can use HTML or PHP here)

4. Find the following piece of code in line 564:

<p id="mybb_error_footer">Please contact the <a href="http://mybb.com">MyBB Group</a> for support.</p>

5. Replace what's inside <p id="mybb_error_footer"></p> with the same custom message from step 3.

CONCLUSION:

If you did everything correctly you should end up with something like the example below. And even though I only talked about editing the footer message, you can do a lot more. You can edit colors, edit fonts, replace the logo and even move things around.

[attachment=22306]
Nice tip =)
Nice. I'll use this later. If my forum somehow goes down, users will stay informed!
nice tutorial awesome! Smile
Oh lovely idea! Is there anyway perhaps to redirect to a page after seeing this error such as your irc room, or possible splash page?
Thanks for this. I will probably write my email so they can contact me thru there until the problem is resolved.
(2011-09-07, 04:32 AM)carter Wrote: [ -> ]Oh lovely idea! Is there anyway perhaps to redirect to a page after seeing this error such as your irc room, or possible splash page?
Yes it is.

1. Open the file ./inc/class_error.php in a text editor.

2. Find:

<title>{$mybb->settings['bbname']} - Internal Error</title>

3. Add afterwards:

<meta http-equiv="refresh" content="5;URL=http://example.com" />

4. Change 5 to the number of seconds before the page refreshes and http://example.com to the page it should load next.
very sexy this is a very good TuT
Very useful tip for people to know. Great share faviouz!
This is very simple: http://community.mybb.com/thread-92284-p...#pid753205
But very helpful, Thanks!
Pages: 1 2