Previous Thread
Next Thread
Print Thread
Rate Thread
#275131 06/16/2004 12:01 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Mod Name / Version: Force Rules 1.1

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

Files Altered: ubbt.inc.php (optional ubbt_footer.tmpl)

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.
Attachments
115337-115326-ForceRules1.1.zip (0 Bytes, 53 downloads)

Sponsored Links
Joined: Nov 2002
Posts: 554
Code Monkey
Code Monkey
Offline
Joined: Nov 2002
Posts: 554
Pretty simple mod but I have this error

Fatal error: Call to undefined function: getmicrotime() in /usr/www/efs/ubbthreads/includes/main.inc.php on line 16

This line of code ;

$Query .= "U_Username,U_Password,U_SessionId, U_StyleSheet, U_Status, U_Privates, U_FrontPage, U_Number, U_Banned,U_LastOn";


Actually looks like this due to the sidebar modification and something else I dont recognize;

$Query .= "U_Username,U_Password,U_SessionId, U_StyleSheet, U_Status, U_Privates, U_FrontPage, U_Number, U_Banned,U_LastOn,U_OC_Userid, U_SideBar,U_Agree"; //<<<is that correct?


and you left out in the instructions where to put showrules.php. I assume it goes in the threads directory?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
The error with main generally will occur if you don't have the path set correctly.

Yes, if you've modified the authenticate query - you'll add the U_Agree onto the end of it.

Joined: Nov 2002
Posts: 554
Code Monkey
Code Monkey
Offline
Joined: Nov 2002
Posts: 554
I am sorry Josh I am not sure I follow you.

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!

Joined: Mar 2003
Posts: 118
Journeyman
Journeyman
Offline
Joined: Mar 2003
Posts: 118
fantastic ...thanks!

Sponsored Links

Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Ruben Rocha
Ruben Rocha
Lutz,FL,USA
Posts: 254
Joined: January 2000
Forum Statistics
Forums63
Topics37,575
Posts293,930
Members13,823
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)