Description: This allows you to force all users to view and agree to your forum rules. Basically, if they have never agreed to the rules, once they login, they will be presented with the rules page. They won't be able to do anything else until they read to the bottom and click "I agree". It keeps track in the users table who has agreed, and if you ever change or update your rules, you can use an SQL Query to set everyone back, so that they are forced to read/agree again.
Working Under: UBB.Threads 6.5
Mod Status: Beta
Any pre-requisites:
Author(s): JoshPet
Date: 06/16/04
Credits: Commissioned by www.doording.com - Updated for 6.5 by Astaran
New Files: agree.php, showrules.tmpl, showrules.php
Database Altered: New Field, U_Agree, added to the w3t_Uses table.
Info/Instructions:
Disclaimer: Please backup every file that you intend to modify. If the modification modifies the database, it's a good idea to backup your database before doing so.
Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.
There are no path settings in any of the three files for this hack. You may want to look at the install.txt as I said there is no direction on where to put showrules.php but I assumed it is the UBBThreads dir. []### ### Upload New Files ###
Upload showrules.tmpl to the /templates/default directory
Upload agree.php to your ubbthreads directory. [/]
I have removed this at the moment to suppress the error
// If they haven't agreed to the rules, then we force them to - by JoshPet if ((!$user['U_Agree']) && ($user['U_Username']) ) { $topoutput = "<font size="+1"><b>You MUST agree to these rules before you can continue.</b></font><br /><br />"; $agreebutton = "<br /><br /><div align="center"> <form action="{$config['phpurl']}/agree.php" method="post"> <input type="hidden" name="Cat" value="$Cat" /> <input type="hidden" name="number" value="{$user['U_Number']}" /> <input type="submit" class="buttons" name="agree" value="I Agree To These Rules"> </form></div><br /> ";
if (!$debug) { include("$thispath/templates/$tempstyle/showrules.tmpl"); }
// Send the footer $this -> send_footer(); exit; }
}
// ####################################################################### // Not right - something went wrong - UHOH!
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.