Mod Name / Version: Unlimited Edit Time for a Special Usergroup
Description: Gives a special user group unlimited post edit time.
Working Under: UBB.Threads 6.4-6.5
Mod Status: Beta
Any pre-requisites: Author(s): JoshPet
Date: 07/02/04
Credits: A client of mine
Files Altered: editpost.php
New Files: none
Database Altered: none
Info/Instructions: Open editpost.php
Find this:
<br />$user = $userob -> authenticate("U_TextCols, U_TextRows, U_Preview");<br />$Username = $user['U_Username'];<br />
Change to this:
<br />$user = $userob -> authenticate("U_TextCols, U_TextRows, U_Preview,U_Groups");<br />$Username = $user['U_Username'];<br /><br />// If they are special - give them longer edit time - by JoshPet<br /> if (strstr($user['U_Groups'],"-5-")) {<br /> $config['edittime'] = 99999;<br /> } <br />
Above, where I have -5- substiture the group number you want to have unlimited edit time. To find your group numbers, do this query:
SELECT * FROM w3t_Groups
If you want to give unlimited edit time to more than one group, use an "if" statement like this:
<br /> if ((strstr($user['U_Groups'],"-5-")) || (strstr($user['U_Groups'],"-6-"))) {<br />
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.