vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - Rules and User Agreement Hack (https://vborg.vbsupport.ru/showthread.php?t=97699)

uae 10-05-2005 10:00 PM

Rules and User Agreement Hack
 
This modification currently contains a vulnerability. You are hereby advised to disable this modification until such time that the author provides a fix.
- vBulletin.org Staff


Rules and User Agreement Hack-------------------------------------
Hack Version: 1.1.5
vB-version: 3.5
Developer: WwW.UAEWEB.CoM
Install-difficulty: Easy
Port of: https://vborg.vbsupport.ru/showt...threadid=77666

Introduction:
Rules and User Agreement Hack Is an agreement rules systems, that requires user to agree to each individual forum or/and pages rules within the whole board community ?if applicable? prior to permission them to different action (Viewing a Forum, Posting New Thread for the first time, Posting New Thread, Posting Reply).

This will limit the forum breaches that occur often due to unawareness of the rules and agreement. This shall automate the manual procedures that are followed by users to read the ?rules and agreement? and will enforce to some extent the users to be aware of rules in place. Moreover this will eliminate the options of any denial by certain users of not being aware of ?rules and agreements? being in place for the desired forum.

This can also be used as alerts, broadcasts, messages and tutorials? etc to certain individual, multi users or groups.

Features:
  • Unlimited* Rule(s).
  • An Individual Forum can have multi rules agreement.
  • An Individual FILE within your forum can have mutli rules agreement.
  • List All Rules that user has agreed to from his/her profile page "if a url was provided".
  • Edit/Delete Rule(s).
  • Reset Rule(s) Manually or with Cron Job.
  • Rules can use bbcode.
  • Set to show a rule(s) agreement in any selected forum/page (file url) IF:
- User's Usergroup is Y.
- User's Additional Usergroups is Y.
- User's User Id is X.
- User's User Name is XXX.
- User's first time posting a new thread in this forum.
- User's has posts greater than x posts.
- User's has posts less than x posts.
- User's Join Date is After (yyyy-mm-dd).
- User's Join Date is Befor (yyyy-mm-dd).
- User's Last Activiy is After (yyyy-mm-dd).
- User's Last Activiy is Befor (yyyy-mm-dd).
- User's Last Post is After (yyyy-mm-dd).
- User's Last Post is Befor (yyyy-mm-dd).
* Can Use Conditionals.
  • Fully "phrased" so translations are made easy.
Settings in the Admin CP:
  • List Rule(s).
  • Add New Rule(s).
  • Edit / Delete Rule(s).
  • Reset Rule(s).
  • Activate and Inactivate Rule(s)
Screenshots:

See attachments.

Hack Installation Details:

1 Product XML with 3 Plugins, and 45 Phrases

New files for this Hack: 3
/admincp/rulesagreement.php
/includes/cron/cron_ruleshack.php
/includes/xml/cpnav_rulesagreement.xml

New templates for this Hack: 2
ruleshack_rules
ruleshack_rulesbit

File-edits: 0

Template-edits: 1
MEMBERINFO

New DB tables for this Hack: 1
ruleshack

DB Tables modified for this Hack: 1
user

How to Install:
To install this hack, simply download the zip file, Unzip it to a directory on your computer and follow the steps from README.txt

History:
1.0.0
Initial Version for vBulletin 3.5

1.1.0
Added Rule(s) from URL
Fixed typo in Phrase

1.1.1
Fixed bug with new registration
-> to upgrade, import product-rulesagreement.xml and set Allow Overwrite to yes

1.1.2
Fixed bug with Reseting Rules every 12 hours
-> to upgrade, import product-rulesagreement.xml and set Allow Overwrite to yes

1.1.3
Fixed bug with with TABLE_PREFIX missing
-> to upgrade, import product-rulesagreement.xml and set Allow Overwrite to yes


1.1.4
Fixed bug with with Template / memberinfo Agreed Rules List
-> to upgrade, import product-rulesagreement.xml and set Allow Overwrite to yes

1.1.5
Fixed bug with this & this
-> to upgrade, import product-rulesagreement.xml and set Allow Overwrite to yes

PLEASE REMEMBER TO BACKUP BEFORE YOU BEGIN!

If you like this hack, please be kind and click on https://vborg.vbsupport.ru/ :)

SnowBot 10-06-2005 06:02 AM

WOW this looks great, i will give this a try. Thanks for your efforts :)

Wasim 10-06-2005 07:01 AM

Ive been looking for something like this for quite a while. Thanks!

There is just one rule hack I need, and that is a quiz hack when you register for the forum to quiz you if you have read the rules.

sickboy6ths 10-06-2005 10:46 AM

VERY interesting hack... problem is when I try to import the product I get this error and I have no clue what is wrong (already installed more products, without problems :S)

Fatal error: Cannot use object of type mysqli_result as array in admincp\plugin.php(1226) : eval()'d code on line 35

Mu5icMan 10-06-2005 10:47 AM

Can this be edited so it records the people who have signed the contract and when.

PixelFx 10-06-2005 10:59 AM

Quote:

Originally Posted by Mu5icMan
Can this be edited so it records the people who have signed the contract and when.

thank you so much been wanting something like this for a long time.

COBRAws 10-06-2005 12:46 PM

/me installs

uae 10-06-2005 02:40 PM

Quote:

Originally Posted by sickboy6ths
VERY interesting hack... problem is when I try to import the product I get this error and I have no clue what is wrong (already installed more products, without problems :S)

Fatal error: Cannot use object of type mysqli_result as array in admincp\plugin.php(1226) : eval()'d code on line 35

I'll look into this.

uae 10-06-2005 02:42 PM

Quote:

Originally Posted by Mu5icMan
Can this be edited so it records the people who have signed the contract and when.

If you look at the first screenshot image you'll see the records of the rules people have signed, unless you're talking about a new seprate page where it will list all users.

For the date of when the user has signed, I think that can be easly added, I'll need some time tho.

Basboss 10-06-2005 02:46 PM

wow this one has it all
installed here :)

ixian 10-06-2005 02:59 PM

AWESOME hack, thanks!

hbalagh1 10-06-2005 03:16 PM

great hack thank just what i needed :)

xtreme-mobile 10-06-2005 03:30 PM

will this hack allow you to set the rules to show before they enter the specific forum rather than when they try to post etc?

on the VB 3.0 version you did there was a addon which done this, is this standard now?

regards

dean

hbalagh1 10-06-2005 03:35 PM

Quote:

Originally Posted by xtreme-mobile
will this hack allow you to set the rules to show before they enter the specific forum rather than when they try to post etc?


on the VB 3.0 version you did there was a addon which done this, is this standard now?

regards

dean

it will let you before they read

xtreme-mobile 10-06-2005 03:36 PM

great will be installing this then :D

hbalagh1 10-06-2005 03:53 PM

Found a typo :)

"When Viewing Froum" under Rules Options

uae 10-06-2005 06:21 PM

Quote:

Originally Posted by hbalagh1
Found a typo :)

"When Viewing Froum" under Rules Options

Fixed :)

thedvs 10-06-2005 08:07 PM

what an absolutely amazing bloody ****ing brilliant hack
well done uae

*INSTALLED*

hbalagh1 10-06-2005 08:17 PM

would this mod have anything kind of modification to the registration process... When a user tries to register on my site and they click on the sites rules box and hit ok it gives them this error

You have chosen not to accept the forum rules, so registration can not continue.

Click here to return to the main forums page, or click the 'Back' button on your browser if you now want to agree with the forum rules

thedvs 10-06-2005 08:21 PM

One problem I have found, on my custom skin when I add

<!-- [START HACK='Rules and User Agreement' AUTHOR='WwW.UAEWEB.COM' VERSION='1.1.0' CHANGEID= 1 ] -->
<if condition="$agreedrules">
<fieldset class="fieldset">
<legend>$vbphrase[ruleshack_agreed]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td>
<phrase 1="$userinfo[username]">$vbphrase[ruleshack_x_has_agreed_to_the_following_rules]</phrase>
</td>
</tr>
$agreedrules
</table>
</fieldset>
</if>
<!-- [END HACK='Rules and User Agreement' AUTHOR='WwW.UAEWEB.COM' VERSION='1.1.0' CHANGEID= 1 ] -->

To the member info it doesnt show above the referrals at all.
I have my agreement to reset every 12 hours too if that helps

hbalagh1 10-06-2005 08:22 PM

Quote:

Originally Posted by thedvs
One problem I have found, on my custom skin when I add

<!-- [START HACK='Rules and User Agreement' AUTHOR='WwW.UAEWEB.COM' VERSION='1.1.0' CHANGEID= 1 ] -->
<if condition="$agreedrules">
<fieldset class="fieldset">
<legend>$vbphrase[ruleshack_agreed]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
<tr>
<td>
<phrase 1="$userinfo[username]">$vbphrase[ruleshack_x_has_agreed_to_the_following_rules]</phrase>
</td>
</tr>
$agreedrules
</table>
</fieldset>
</if>
<!-- [END HACK='Rules and User Agreement' AUTHOR='WwW.UAEWEB.COM' VERSION='1.1.0' CHANGEID= 1 ] -->

To the member info it doesnt show above the referrals at all.
I have my agreement to reset every 12 hours too if that helps

I read in the set up that you have to have a url listed for that function to work :)

hbalagh1 10-06-2005 08:24 PM

I uninstalled this mod so now i can have users register again, so there is definitially some kind of issue there
Quote:

Originally Posted by hbalagh1
would this mod have anything kind of modification to the registration process... When a user tries to register on my site and they click on the sites rules box and hit ok it gives them this error

You have chosen not to accept the forum rules, so registration can not continue.

Click here to return to the main forums page, or click the 'Back' button on your browser if you now want to agree with the forum rules


thedvs 10-06-2005 08:31 PM

@hbalagh1 url to what exactly? a file, txt file......

hbalagh1 10-06-2005 08:32 PM

url to your rules page (from what i understand) im not using that feature

thedvs 10-06-2005 08:38 PM

errr do you mean the forum url or an outside page?

hbalagh1 10-06-2005 08:40 PM

this isn't my mod so i really don't know, im guessing it would be something like yourdomain.com/rules.php

hbalagh1 10-06-2005 08:41 PM

have you checked to see if you can have new registrations after adding this hack, cause i had to uninstall it

thedvs 10-06-2005 08:44 PM

just checked & yes i have the same problem, damn :(

hbalagh1 10-06-2005 09:00 PM

glad it wasn't just me :(

Hope it gets fixed soon so i can add it back :)

Valter 10-06-2005 09:12 PM

This is really great hack. I'll try it when uae fix bugs mentioned above. Thanks bro.

uae 10-07-2005 12:42 PM

Sorry for that,

Problem been fixed, just import the latest product-rulesagreement.xml from the zip file and set Allow Overwrite to YES.

DBs 10-07-2005 03:58 PM

When I attempt to reset a rule I get the following error message:

Warning: Cannot modify header information - headers already sent by (output started at /data/websites/forums.freddyshouse.com/includes/adminfunctions.php:236) in /includes/functions.php on line 2346

Warning: Cannot modify header information - headers already sent by (output started at /data/websites/forums.freddyshouse.com/includes/adminfunctions.php:236) in /includes/functions.php on line 2349

but the rule IS reset.

Also, can you explain the following option and provide an example (I'm confused, just can't get the rule listed in memberinfo)

Rule's Page URL (Optional) If you leave it empty, Rule will not be listed in MEMBRIFNO.

Many thanks.

uae 10-07-2005 06:25 PM

Quote:

Originally Posted by DBs
When I attempt to reset a rule I get the following error message:

Warning: Cannot modify header information - headers already sent by (output started at /data/websites/forums.freddyshouse.com/includes/adminfunctions.php:236) in /includes/functions.php on line 2346

Warning: Cannot modify header information - headers already sent by (output started at /data/websites/forums.freddyshouse.com/includes/adminfunctions.php:236) in /includes/functions.php on line 2349

but the rule IS reset.

Also, can you explain the following option and provide an example (I'm confused, just can't get the rule listed in memberinfo)
Rule's Page URL (Optional) If you leave it empty, Rule will not be listed in MEMBRIFNO.
Many thanks.

I have no idea about the error you're getting, but I'll look into it.

Regarding Rules Page URL

Now, if you add a url in that field, and a user submit to agree on the rule, you will be able to see the rule tilte with a link to the rules page if there was one in his/her profile page.

The idea behind this is that you may want to add a rule but you don't want others to see what poeple has agreed on unless you use the url field.

thedvs 10-07-2005 06:37 PM

Is the rules url meant to be the forums URL or a url to a php/html rules page?

uae 10-07-2005 08:34 PM

Quote:

Originally Posted by thedvs
Is the rules url meant to be the forums URL or a url to a php/html rules page?

if you are talking about the Rule's Page URL field which is just under the rule's text field in the Add New Rule Page in ADMINCP, that would be the url to the rules and agreement page you've got already, if there was one, filling this field with a url will have the rules listed in the member profile page whenever they submit to agree on that rules.

Leaving that field empty, will not list the rules in the member profile page even if they submit to agree on the rules.

Think of it as an option weather you want others to see what rules a specific user has agreed on when viewing their profile page.

But if you were talking about the from File URL field which is at the very end of the Add New Rule Page in ADMINCP, then that would be the page you want to show the rules at whenever a user try to view it.

thedvs 10-07-2005 09:54 PM

Thank you... all works perfectly now!
Great job uae! :)

thedvs 10-08-2005 02:10 PM

Seems to be a problem with the 12 hour reset now, after the 12 hours it asks you again to sign the rules, you agree... then instead of letting you continue viewing threads it keeps asking for you to sign the rules again. Any ideas? To me it seems to be a cron issue.

uae 10-08-2005 04:01 PM

Quote:

Originally Posted by thedvs
Seems to be a problem with the 12 hour reset now, after the 12 hours it asks you again to sign the rules, you agree... then instead of letting you continue viewing threads it keeps asking for you to sign the rules again. Any ideas? To me it seems to be a cron issue.

did you install the latest version?

thedvs 10-08-2005 06:24 PM

yes i did

Delphiprogrammi 10-09-2005 11:09 AM

hi people,

i get this MySQL error while trying to add the product XML

Quote:

Database error in vBulletin 3.5.0:

Invalid SQL:
INSERT INTO cron (weekday, day, hour, minute, filename, loglevel, title )
VALUES (-1, -1, 0, 'a:1:{i:0;i:-1;}', './includes/cron/cron_ruleshack.php', 1,
'Rules and User Agreement Hack Reset');

MySQL Error : Table 'delphipr_forums.cron' doesn't exist
Error Number : 1146
Date : Sunday, October 9th 2005 @ 01:48:11 AM
Script : plugin.php
Referrer : plugin.php?do=productadd
IP Address :
Username :
Classname : vb_database
seems like . "TABLE_PREFIX ." thingy is missing somewhere


All times are GMT. The time now is 04:52 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01466 seconds
  • Memory Usage 1,843KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete