Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Rules and User Agreement Hack Details »»
Rules and User Agreement Hack
Version: 1.1.5, by uae uae is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.5.4 Rating:
Released: 10-05-2005 Last Update: 11-08-2005 Installs: 278
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #252  
Old 01-07-2007, 12:17 PM
Veer Veer is offline
 
Join Date: Feb 2006
Posts: 733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please update this hack for 3.6.4 as soon as possible.
Reply With Quote
  #253  
Old 01-09-2007, 12:05 AM
Bubble #5 Bubble #5 is offline
 
Join Date: Apr 2005
Posts: 984
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This 'used to be' the best rules hack around. Funny how one day it's fine and then when a new version of vb comes out it's worthless. Doesn't look like the author is around anymore either, so I guess we'll have to hope that someone else releases a rules hack for 3.6.x. It was a nice hack while it was working though...
Reply With Quote
  #254  
Old 01-09-2007, 02:53 AM
socalsoccer socalsoccer is offline
 
Join Date: Aug 2005
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you make this pop up before you enter the main forum everytime someone comes to your site? This way they have to accept before they even see your forum.
Reply With Quote
  #255  
Old 01-09-2007, 04:03 AM
socalsoccer socalsoccer is offline
 
Join Date: Aug 2005
Posts: 93
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can you make this pop up when posting a reply everytime, in any section?

Thanks
Reply With Quote
  #256  
Old 01-13-2007, 05:27 AM
stwilson stwilson is offline
 
Join Date: Dec 2006
Location: USA
Posts: 209
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tried to get this working on 3.6.4 with MySQL 5 but no-go. Anyone have it working? I tried to follow michaelk's instructions but could not get to work.

ST
Reply With Quote
  #257  
Old 01-14-2007, 11:19 PM
ArchangelX ArchangelX is offline
 
Join Date: Feb 2006
Location: Oahu, HI
Posts: 298
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack! Thanks for protecting our booties!
Reply With Quote
  #258  
Old 01-26-2007, 08:48 PM
echamberlain's Avatar
echamberlain echamberlain is offline
 
Join Date: Aug 2006
Location: San Francisco
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I ran into an error installing the 3.6.x zipped fix, here was my workaround, incase others have this problem.

The symptom was that the Importing Product task bar would keep growing and not stop. The error log had the following entry:

PHP Fatal error: Cannot use object of type mysqli_result as array in /var/www/html/vBulletin/admincp/plugin.php(1941) : eval()'d code on line 35, referer: https://xxxxxx/admincp/plugin.php?do=productadd

To fix this error, I modified product-rulesagreement.xml and removed the if statement in the install code, by changing the code from

PHP Code:
$xx $db->query("select * from " .  TABLE_PREFIX "user");
    if (
$xx[agreedrule]=='')
     {
$db->query("ALTER TABLE " .  TABLE_PREFIX "user ADD agreedrule TEXT NOT NULL ");
      }
$db->query("DELETE FROM " TABLE_PREFIX "cron WHERE filename like '%cron/cron_ruleshack.php'"); 
to

PHP Code:
$xx $db->query("select * from " .  TABLE_PREFIX "user");
$db->query("ALTER TABLE " .  TABLE_PREFIX "user ADD agreedrule TEXT NOT NULL ");
$db->query("DELETE FROM " TABLE_PREFIX "cron WHERE filename like '%cron/cron_ruleshack.php'"); 
This is a manual workaround, so make sure the agreedrule column does not exist (select agreedrule from vb_users) before making this change.
Reply With Quote
  #259  
Old 01-27-2007, 05:47 AM
stwilson stwilson is offline
 
Join Date: Dec 2006
Location: USA
Posts: 209
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried this on 3.6.4 with MySQL 5 and all I get is this:

Quote:
input->clean_array_gpc('r', array('forumid' => TYPE_INT, 'title' => TYPE_STR, 'ruletext' => TYPE_STR, 'ruleurl' => TYPE_STR, 'userids' => TYPE_STR, 'usernames' => TYPE_STR, 'usergroup_all' => TYPE_INT, 'groupids' => TYPE_ARRAY_INT, 'memberids' => TYPE_ARRAY_INT, 'firstnewthread' => TYPE_INT, 'postmore' => TYPE_INT, 'postless' => TYPE_INT, 'joindateafter' => TYPE_STR, 'joindatebefore' => TYPE_STR, 'lastactiveafter' => TYPE_STR, 'lastactivebefore' => TYPE_STR, 'lastpostafter' => TYPE_STR, 'lastpostbefore' => TYPE_STR, 'active' => TYPE_INT, 'conditions' => TYPE_INT, 'action' => TYPE_STR, 'limitstart' => TYPE_INT, 'ruleid' => TYPE_INT, 'allowbbcode' => TYPE_INT, 'repeated' => TYPE_INT, 'childforum' => TYPE_INT, 'newthread' => TYPE_INT, 'newreply' => TYPE_INT, 'viewforum' => TYPE_INT, 'fileurl' => TYPE_STR, 'exactmatch' => TYPE_INT)); if ($vbulletin->GPC['action'] != 'kill') print_cp_header(); if ($_REQUEST['do'] == 'rule') { print_cp_header($vbphrase['ruleshack_rules_manager']); print_form_header('rulesagreement', 'submitrule'); construct_hidden_code('action', 'newrule'); print_table_header($vbphrase['ruleshack_rules_add']); print_input_row($vbphrase['ruleshack_rules_title'], 'title'); print_textarea_row($vbphrase['ruleshack_rules_text'], 'ruletext', ''); print_input_row($vbphrase['ruleshack_rules_url'], 'ruleurl', ''); print_description_row('', 0, 2, 'thead'); print_yes_no_row($vbphrase['allow_bbcode'], 'allowbbcode', 0); print_yes_no_row($vbphrase['ruleshack_rules_repeated'
Any thoughts????
Reply With Quote
  #260  
Old 01-29-2007, 01:43 PM
SimCityForum SimCityForum is offline
 
Join Date: Feb 2005
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I implemented the modifications suggested in https://vborg.vbsupport.ru/showpost....&postcount=250 and then reinstalled this mod according to the instructions in the readme.txt and it is now working correctly for me on v3.6.1 running on PHP5 and MySQL5
Reply With Quote
  #261  
Old 02-01-2007, 05:20 AM
Mr_Snob Mr_Snob is offline
 
Join Date: Jan 2004
Location: T?RKIYE/BOLU
Posts: 145
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have this one ported for 3.6.4 and many features added if you would i release it at vb.org
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:27 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07566 seconds
  • Memory Usage 2,329KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete