10-05-2010, 04:12 PM
This is a simple modification which is useful for:
This makes use of the rarely used password feature of MyBB.
Now when users try to enter this forum through any means, they'll be brought up with a simple message before they enter. Once they've clicked the "Agree" button, they'll be able to view the forum. Works for guests too.
- Forums in which you want to display a warning/disclaimer before people enter
- Forums in which you want to force users to view some rules before doing anything in them
This makes use of the rarely used password feature of MyBB.
- Edit the forum you wish to force a message display; set a template prefix if there isn't one set (in this example, we'll use the prefix fwarn_)
- Set the forum password to agree
- Add a template named fwarn_forumdisplay_password (change if you're using a different prefix)
HTML Code<html> <head> <title>{$mybb->settings['bbname']} - {$lang->password_required} </title> {$headerinclude} </head> <body> {$header} <form action="{$_SERVER['REQUEST_URI']}" method="post"> <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder"> <tr> <td class="thead" align="center"><strong> Warning </strong></td> </tr> <tr> <td class="trow2"> You are entering a forum which may be too awesome for you. If you continue, you implicitly acknowledge that we are not responsible for any harm caused by excessive awesomeness. </td> </tr> </table> <br /> <input type="hidden" name="pwverify" value="agree" /> <div align="center"><input type="submit" class="button" name="submit" value="Agree" /></div> </form> {$footer} </body> </html>
Edit the above message to suit your needs. I've spaced out the parts which you may be interested in editing (title and body).
Now when users try to enter this forum through any means, they'll be brought up with a simple message before they enter. Once they've clicked the "Agree" button, they'll be able to view the forum. Works for guests too.