Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Require Users to Sign a Contract Before Posting in an Individual Forum Details »»
Require Users to Sign a Contract Before Posting in an Individual Forum
Version: 1.00, by amykhar amykhar is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 02-21-2005 Last Update: 07-08-2005 Installs: 12
DB Changes
Is in Beta Stage  
No support by the author.

I have seen some rules hacks that require users to agree to the rules before allowing them to post, but they have been board wide from what I have seen.

This one allows you to set up separate contracts on a per-forum basis. You can have a special contract for a debate forum and a different one for your sex forum. It's up to you.

THIS IS A BETA HACK. IT MAY HAVE BUGS. USE AT YOUR OWN RISK.

Planned features:
a - an install script to handle the queries, template and phrases. I want to work the kinks out of the code first.

b. - a ticket system by which you can temporarily or permanantly ban members from posting in individual forums if they violate the contract.

I have no plans of integrating this hack with any other ticket systems. I don't use any of the others because we really only have problems in one forum.

Show Your Support

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

Comments
  #22  
Old 06-08-2005, 05:29 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not yet. I got sidetracked. I'll get back to it now that I know somebody cares

Amy
Reply With Quote
  #23  
Old 06-08-2005, 06:29 PM
PixelFx PixelFx is offline
 
Join Date: Dec 2002
Posts: 1,117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this would be cool if you could add it to the site so that it askes you the info above before allowing people to download attachments.
Reply With Quote
  #24  
Old 07-07-2005, 01:59 PM
SuperFly SuperFly is offline
 
Join Date: Feb 2005
Location: Mentor,Ohio
Posts: 253
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This will definetly be on my install list

*Adds to list*
Reply With Quote
  #25  
Old 07-07-2005, 02:36 PM
Dennis B's Avatar
Dennis B Dennis B is offline
 
Join Date: Jul 2002
Posts: 193
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

On mine as well, this is a great idea.
Reply With Quote
  #26  
Old 07-09-2005, 04:43 AM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dennis B
On mine as well, this is a great idea.
I installed it, but it is buggy. I am turing it off until it gets fixed, but I like the execution. This is the error I get, if it helps:
Quote:
Database error in vBulletin 3.0.7:

Invalid SQL:
UPDATE user
SET contracts = ,21
WHERE userid = 1

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 '21
WHERE userid = 1' at line 2

mysql error number: 1064

Script: http://mysite.com/forum/contract.php
Referer: http://mysite.com/forum/newthread.php?do=newthread&f=21
I surfed up some info on error 1064, and it said:
Quote:
You will get a MySQL query syntax error number 1064 when you incorrectly use a reserved word in your query such as "when" or "order".
edit: but THIS POST suggests that the error may have been server-side due to low disk space! arrgh.. very confusing. Ya gotta love vague error messages.
Reply With Quote
  #27  
Old 07-09-2005, 04:56 AM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by yoyoyoyo
I installed it, but it is buggy. I am turing it off until it gets fixed, but I like the execution. This is the error I get, if it helps:I surfed up some info on error 1064, and it said:edit: but THIS POST suggests that the error may have been server-side due to low disk space! arrgh.. very confusing. Ya gotta love vague error messages.
For some reason, it thinks something is in your contracts column of your user database.

What is in that column for userid 1?
Reply With Quote
  #28  
Old 07-09-2005, 05:08 AM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by amykhar
For some reason, it thinks something is in your contracts column of your user database.

What is in that column for userid 1?
In PHPMyAdmin it says "2" under the contracts column, and I had previously clicked on a contract in Forum ID 2 before I got the error. Another user also has 2 in that column, and another user has 7 (and I had another contract in forum ID 7). I am not sure if this is how it works, but I will wait until later and will turn it back on. It may be a disk full error at my server, or something like that, since this worked well before. What would a database entry for that field with multiple contracts look like? Maybe it was erroring out because something was already there?
Reply With Quote
  #29  
Old 07-09-2005, 06:02 AM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by yoyoyoyo
In PHPMyAdmin it says "2" under the contracts column, and I had previously clicked on a contract in Forum ID 2 before I got the error. Another user also has 2 in that column, and another user has 7 (and I had another contract in forum ID 7). I am not sure if this is how it works, but I will wait until later and will turn it back on. It may be a disk full error at my server, or something like that, since this worked well before. What would a database entry for that field with multiple contracts look like? Maybe it was erroring out because something was already there?
You found a bug.

In contracts.php, Find:
Code:
$contractlist = $contractlist . "," . $forumid;
Change it to:
Code:
$contractlist = $bbuserinfo[contracts] . "," . $forumid;
Reply With Quote
  #30  
Old 07-09-2005, 06:23 AM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by amykhar
You found a bug.
That may have fixed that bug, but I am still getting an error. This time it looks like this:
Quote:
Database error in vBulletin 3.0.7:

Invalid SQL:
UPDATE user
SET contracts = 2,21
WHERE userid = 1

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 '21
WHERE userid = 1' at line 2

mysql error number: 1064

Script: http://mysite.com/forum/contract.php
Referer: http://mysite.com/forum/newthread.php?do=newthread&f=21
Sorry to be a pain, but it just doesn't want to add a 2nd forum ID to that field for some reason.

EDIT: I went in to PHPMyAdmin and deleted that value ("2") from the contracts field, and was able to sign a different contract, but errored out again when adding a 2nd contract to the table.
Reply With Quote
  #31  
Old 07-09-2005, 01:11 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Right. It should be this:

Code:
$contractlist = "'".$bbuserinfo[contracts] . "," . $forumid."'";
I was up too late last night
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 08:14 PM.


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.10787 seconds
  • Memory Usage 2,315KB
  • 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
  • (3)bbcode_code
  • (8)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (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