View Full Version : Miscellaneous Hacks - Rules and User Agreement Hack
Please update this hack for 3.6.4 as soon as possible.
Bubble #5
01-09-2007, 12:05 AM
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...
socalsoccer
01-09-2007, 02:53 AM
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.
socalsoccer
01-09-2007, 04:03 AM
How can you make this pop up when posting a reply everytime, in any section?
Thanks
stwilson
01-13-2007, 05:27 AM
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
ArchangelX
01-14-2007, 11:19 PM
Great hack! Thanks for protecting our booties!
echamberlain
01-26-2007, 08:48 PM
I ran into an error installing the 3.6.x zipped fix (https://vborg.vbsupport.ru/showpost.php?p=1077478&postcount=216), 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
$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
$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.
stwilson
01-27-2007, 05:47 AM
I tried this on 3.6.4 with MySQL 5 and all I get is this:
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????
SimCityForum
01-29-2007, 01:43 PM
I implemented the modifications suggested in https://vborg.vbsupport.ru/showpost.php?p=1152225&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
Mr_Snob
02-01-2007, 05:20 AM
i have this one ported for 3.6.4 and many features added if you would i release it at vb.org :)
stwilson
02-01-2007, 03:17 PM
i have this one ported for 3.6.4 and many features added if you would i release it at vb.org :)
That would be nice! I have not been able to get this one working on 3.6.4. Can't wait.
Can I also please request that you release the port for 3.64?
I'd be most grateful!:D
Merriweather
02-03-2007, 03:33 AM
I would love to see it for 3.6.4 as well! :)
dutchbb
02-10-2007, 10:35 PM
Mr_Snob: please do :)
Eagle Creek
02-11-2007, 06:29 PM
3.6.4 please!
Black Widow
02-11-2007, 08:15 PM
Attached is the updated hack which works on 3.6.4 and MYSQL 5.
Enjoy...
fixed 1 bug.
Download again.
dutchbb
02-11-2007, 09:39 PM
Tried to make a rule and got this:
Database error in vBulletin 3.6.4:
Invalid SQL:
INSERT INTO ruleshack
(forumid, ruletitle, ruletext, ruleurl, firstnewthread, groupids, memberids, userids,
usernames, postmore, postless, joindateafter, joindatebefore,
lastactiveafter, lastactivebefore, lastpostafter, lastpostbefore,
conditions, allowbbcode, active, repeat, childforum, newthread, newreply, viewforum, fileurl, exactmatch)
values ('25', 'test', 'test', '', '0',
'6', '', '', '', '0',
'0', UNIX_TIMESTAMP(''),
UNIX_TIMESTAMP(''), UNIX_TIMESTAMP(''),
UNIX_TIMESTAMP(''), UNIX_TIMESTAMP(''),
UNIX_TIMESTAMP(''), '0', '1', '1', '0', '0', '0', '0', '1', '',
'0');
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'repeat, childforum, newthread, newreply, viewforum, fileurl, exactmatch)
' at line 5
Error Number : 1064
Date : Monday, February 12th 2007 @ 12:54:56 AM
Script : http://forum.domain.com/admincp/rulesagreement.php?do=submitrule
Referrer : http://forum.domain.com/admincp/rulesagreement.php?do=rule
IP Address : -
Username : dutchbb
Classname : vB_Database
Black Widow
02-12-2007, 10:58 AM
You have MySQL 5 installed.
use the zip file i uploaded just above your post.
It will work then.
dutchbb
02-12-2007, 11:19 AM
Sure, I used that file, uploaded everything.
Black Widow
02-12-2007, 04:23 PM
Sure, I used that file, uploaded everything.
i fixed something there.
download and upload again.
i fixed something there.
download and upload again.
Working just fine on my vb3.6.4 :D
Thanks a lot Black Widow :up:
stwilson
02-13-2007, 12:55 PM
Still a no-go for me. Here is what I get when I access the Rules CP
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'], 'repeated', 0); print_yes_no_row($vbphrase['ruleshack_rules_active'], 'active', 1);
stwilson
02-13-2007, 12:56 PM
Almost forgot. I am on MySQL 5 and 3.6.4. Basically, I uninstalled, reinstalled and got the above error.
s0lidgr0und
02-13-2007, 02:15 PM
Any thoughts?Database error in vBulletin 3.6.4:
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 : Unknown column 'title' in 'field list'
Error Number : 1054
Date : Tuesday, February 13th 2007 @ 10:10:39 AM
dutchbb
02-13-2007, 03:41 PM
i fixed something there.
download and upload again.
Thanks! Nog bugs or problems so far with this one :)
poprulz
02-14-2007, 12:32 PM
I am using vB 3.6.1
I tried installing the original version attached with this thread and it gave me a itle filed eror. So i downloaded the patched 1 with variable name.
When i import product. nothing happens...the bar remains as such and nothing seems to work.
Please provide me with a working version for 3.6.1.
butty
02-14-2007, 12:47 PM
thanks to uae for the hack and thanks to black widow for posting the patch for 3.6.4 got it working perfectly great stuff :)
BigJimTheLug
02-21-2007, 04:37 AM
So this does work on 3.6.4?
f!nal
02-28-2007, 04:53 PM
I have a problem , i have vb version 3.6.4 and when i import the xml file, i become a error:
Invalid argument supplied for foreach() in /includes/functions_cron.php (line 95)
i have the german forum is this the problem?
jadkar
02-28-2007, 09:00 PM
I installed vBSEO after this hack has been running for about a year and now it's dead. Does anyone have any expirence using this with vBSEO??
My problem is that as soon as a user agrees to the rules and clicks submit it bounces them back to the main forum index page. :(:(
This hack was instrumental on my site if this can't work does anyone know of a similar one??
Please help :)
Nobody has an answer to this......please!!
jadkar
03-01-2007, 03:29 AM
OK I tried again with another port of this producr called 2.0. Still the same exact thing. I'm runnig CMPS and whenever the rule pops up an I ageee to it I get sent back to my main CMPS screen. Then once more if I try to except the rule it doe the same thing.... boncing me back to my min CMPS screen
I find it hard to believe that his doen't happen to anyone else. Any help with this would be much appreciated. I'm suprised people on these forums don;t use this hack mre ofter.
AngusMacGyver
03-17-2007, 10:02 PM
I installed the hack and it works almost fine on 3.6.5. Only one issue does't work.
If I choose one usergroup which should see the message, all users of all usergroups see the message. What is wrong in my installation or with my parameters.
Sax on the Web
03-17-2007, 11:23 PM
Installed and got a database error. Cannot get to admincp now. Please help!
==========================================
Database error in vBulletin 3.5.4:
Invalid SQL:
SELECT * FROM ruleshack
WHERE (fileurl LIKE 'http://forum.saxontheweb.net/index.php' AND exactmatch = 1 )
OR (fileurl LIKE 'http://forum.saxontheweb.net/index.php%' AND exactmatch = 0 ) AND active = 1 ORDER BY ruleid;
MySQL Error : Table 'tmp.ruleshack' doesn't exist
Error Number : 1146
Date : Saturday, March 17th 2007 @ 05:17:30 PM
Script : http://forum.saxontheweb.net/
Rickeo
03-21-2007, 12:45 AM
Amazing hack
rjmjr69
03-28-2007, 03:59 PM
i have this one ported for 3.6.4 and many features added if you would i release it at vb.org :)
Could you please release. Or PM a copy something? I know your work is good I can only imagine what OTHER features you have made. Thank you
blogtorank
04-01-2007, 10:43 PM
You have MySQL 5 installed.
use the zip file i uploaded just above your post.
It will work then.
Many thanks for the MySQL 5 version!
stwilson
04-02-2007, 02:54 AM
Has anyone been able to get this working on 3.6.4 with MySQL 5? I have tried three different times and still only get a bunch of this:
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'], 'repeated', 0); print_yes_no_row($vbphrase['ruleshack_rules_active'], 'active', 1); print_table_break(); //**************************** // USERGROUP
blogtorank
04-02-2007, 04:28 AM
Has anyone been able to get this working on 3.6.4 with MySQL 5? I have tried three different times and still only get a bunch of this:
If you check two pages back you will see this post that one guy fixed it:
https://vborg.vbsupport.ru/showpost.php?p=1180148&postcount=266
stwilson
04-02-2007, 12:02 PM
If you check two pages back you will see this post that one guy fixed it:
https://vborg.vbsupport.ru/showpost.php?p=1180148&postcount=266
Guess I should have mentioned that in my post. I tried that fix and it produced the results I posted above. Still not working for me. I have uninstalled and reinstalled, followed the instructions to the letter and still the same results. Still looking for someone with 3.6.4 and MYSQL 5 and a running version of this MOD.
dbirosel
04-03-2007, 12:45 AM
Great hack! But...
I can't find a setting to have this displayed for all forums when posting a new thread or reply. I don't want to have to make a new rule set for each individual forum (we don't have any sub forums). I tried to set it for the main category but of course this did not work.
Any suggestions?
I need help with this too!!!!
dutchbb
04-09-2007, 08:32 AM
This doesn't work with the survey hack, the survey hack stops working once both are enabled. maybe you can make them work together?
ElForro
04-27-2007, 03:14 PM
I've two problems:
- When I check "Include Child Forums", the Rules appears when an Unregistered user tries to enter that forums [and child forums]. I hadn't check that Group to accept the Rules, and it only happens when I turn the "Include Child Forums" option on.
- When I try to enter a forum, the rules are displayed correctly. But when I try to enter directly to a Thread, the Rules and all the page don't loads the CSS file.. It appears that the path is incorrect: Insted of "http://www.domain.com/clientscript/vbulletin_css/style-d219a5c6-00001.css" it's "/clientscript/vbulletin_css/style-d219a5c6-00001.css", that is without the domain name. (I have the CSS to load as a separate file)
Thanks in advance and sorry about my english :$
redraider
07-28-2007, 02:10 AM
I am looking for a similar hack on 3.6.7 or above .... anyone?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.