vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Require Users to Sign a Contract Before Posting in an Individual Forum (https://vborg.vbsupport.ru/showthread.php?t=91867)

amykhar 07-08-2005 10:00 PM

Require Users to Sign a Contract Before Posting in an Individual Forum
 
This is a port of this mod:
https://vborg.vbsupport.ru/showthread.php?t=76835

This little mod forces users to read and sign a "contract" before it allows them to post in certain forums of your choosing. It also allows you to "ticket" users who break your forum rules. After 3 tickets, the user can no longer post in the forum.

You may define a different contract for each of your forums if you so choose.
-------------------------------
YOU may easily extend this idea to make readers sign a contract before reading a certain forum. I do not need this feature and will not be adding it at this time.

-------------
Template Conditionals You May Like to Use for the Ticket System:
Code:

<if condition="$post[reqcontract]">
- In the postbit, this lets you see if tickets are required in the forum.
Code:

<if condition="$post[ticket]">
- Check to see if the user has a ticket. This way, you don't have to show the number of tickets for people who don't have any.
Code:

<if condition="is_member_of($bbuserinfo,5,6)">
- use this to see if the person reading the post is an admin or supermod. If they are, you can show them the links that will ticket users.

Putting it all together, an example way to use the tickets in the postbit:
Code:

<if condition="$post[reqcontract]">
<if condition="is_member_of($bbuserinfo,5,6)">
<if condition="$post[ticket]">
User's Tickets in this forum: $post[ticket]<br />
</if>
<a href="ticket.php?do=addticket&forumid=$post[forumid]&userid=$post[userid]">Ticket User</a><br />
<if condition="$post[ticket]">
<a href="ticket.php?do=rticket&forumid=$post[forumid]&userid=$post[userid]">Remove One Ticket</a><br />
<a href="ticket.php?do=cticket&forumid=$post[forumid]&userid=$post[userid]">Clear the user's tickets</a><br />
</if>
</if>
</if>


A huge thank you to LiveWire, Boofo and HellSatan for testing this out.

Installation on 3.5 RC1 is as simple as importing the product, changing two existing phrases and making one template change.
------------------------------

This hack will always be free, however your donations are kindly accepted and will help towards further development. If you donate, please leave me some info (either your forum site or username at vB.org) so that I can thank you. :)
https://vborg.vbsupport.ru/external/2010/02/12.gif

Amy

Christine 07-09-2005 02:41 PM

My Mods are going to be thrilled. :D

For some reason, your attachment images aren't working though (or it is my browser?)

Elementary question -- I assume this would require signature from installation forward, but if we change the wording, will it somehow trigger people to have to sign a new wording?

amykhar 07-09-2005 03:27 PM

Quote:

Originally Posted by Christine
My Mods are going to be thrilled. :D

For some reason, your attachment images aren't working though (or it is my browser?)

Elementary question -- I assume this would require signature from installation forward, but if we change the wording, will it somehow trigger people to have to sign a new wording?

1. The images aren't working for me either. I don't know why. They are the same screenshots from the original thread.

2. No. If you change the wording and want users to resign, you'll need to clear out everybody's contract. Maybe at some point I'll write a script to do it. If you only have one forum that has a contract, it's easy to do though. Just clear the contracts column in the user table.

amykhar 07-09-2005 03:31 PM

(Removed and built into the new version)

Christine 07-09-2005 03:38 PM

Easy enough! I can just put a clear script in the admin notes in the ACP for each one and use as needed.

Thanks for sharing this -- will get it loaded this weekend. :D

amykhar 07-09-2005 07:57 PM

One nice thing to note. Let's say you want the users to sign a contract before they start a new thread, but don't need them to sign it when they reply to an existing thread. Simply deactivate the 'sign contract before posting a reply' plugin and don't do the code change in showthread.php.

Christine 07-09-2005 08:11 PM

Oh -- the team wants me to go for full boar on this after I told them I was going to test it.

They want all of the pinned-thread-ignoring, FAQ-ignoring, forum-description-ignoring, rules-ignoring, announcements-ignoring (and everywhere else they cross post the rules) members to have to sign in blood, give a saliva sample and submit to a retina scan signifying that they comprehend what will and will not fly before even thinking of entering certain forums.

For now, a contract will do. :p

[off to check out the ticket system now....] :D

Eagle Creek 07-09-2005 09:52 PM

Screenshots aren't working??

amykhar 07-09-2005 10:15 PM

Quote:

Originally Posted by Eagle Creek
Screenshots aren't working??

As noted in post #3, no they aren't. And I don't know why. But, you can see them in the original mod's thread.

Eagle Creek 07-09-2005 10:40 PM

Quote:

Originally Posted by amykhar
As noted in post #3, no they aren't. And I don't know why. But, you can see them in the original mod's thread.

Owh, sorry for the reply then. I will take a look!

pimpery 07-10-2005 12:13 AM

Quote:

Originally Posted by Eagle Creek
Owh, sorry for the reply then. I will take a look!

They are..It's just that he saved the thumbnails from the other thread by accident (instead of the actual images) then uploaded them.

amykhar 07-10-2005 12:57 AM

Quote:

Originally Posted by pimpery
They are..It's just that he saved the thumbnails from the other thread by accident (instead of the actual images) then uploaded them.

Doh! She's (me) not that bright, you know :D

I'll fix it.

MentaL 07-10-2005 06:51 AM

screens work for me, nice idea btw

Milchi 07-12-2005 07:49 AM

Would it be possible to force one contract for multiple forums? We have "trade" forums which need a contract to post. All have the same contract i don't want the users to read and agree the same contract 6 times ...

amykhar 07-12-2005 11:10 AM

Quote:

Originally Posted by Milchi
Would it be possible to force one contract for multiple forums? We have "trade" forums which need a contract to post. All have the same contract i don't want the users to read and agree the same contract 6 times ...

Yes, you could do it. If you go to the code in contract.php that writes the contract signature to the database, you could have it write the contract for all 6 forums when the user agrees to any of the group. The easiest way would be for you to hard code the forum ids into the code.

Chris M 07-13-2005 01:40 AM

Nice idea amy :)

Will use this for an upcoming project :)

Satan

jesus likes pie 07-19-2005 12:57 AM

Is there any way to make this show up before vieweing the forum? So instead of making them sign it when posting, they sign it when they view the forum.

Possible?

amykhar 07-19-2005 01:26 AM

Quote:

Originally Posted by jesus likes pie
Is there any way to make this show up before vieweing the forum? So instead of making them sign it when posting, they sign it when they view the forum.

Possible?

Possible. You would need to do the check for the user having signed the contract on forumdisplay.php and showthread.php instead of where it is now.

Amy

jesus likes pie 07-19-2005 06:34 PM

erm nevermind i got it by adding the plugin/hook to forumdisplay or something.

Andreas 07-26-2005 06:31 PM

@amykhar
I think this Hack could be implemented without File Edits in RC1 by using Hooks forumadmin_edit_form, showthread_post_start and forumdata_start.
Sou you might want to update it :)

chariotdriver 07-26-2005 08:24 PM

I''ve had this Hack installed, and it is showing up in the "Posting Options" in the Forum Manager,.. but when I select "Require users to sign a contract before being allowed to post?" and then Save, and then go directly back in to check it out, it is set to off.
I cannot make it stick,..Anyone know what is happening?
thanks
Phil

amykhar 07-26-2005 08:32 PM

Make sure you made every file change and ran the queries.

amykhar 07-26-2005 09:02 PM

I will be updating this soon for RC1. Under RC1, as of right now, only one file edit is required. I'm trying to figure out a way to make that file edit not necessary either.

Andreas 07-26-2005 09:10 PM

Quote:

Originally Posted by amykhar
I'm trying to figure out a way to make that file edit not necessary either.

Hookname: showthread_post_start
PHP Code:

$contractsigned 1;
// Check to see if a contract is required.
if ($foruminfo['reqcontract'])
{
    
// Check to see if the user has signed the contract.

    
$contracts 0;
    
$contracts explode(",",$vbulletin->userinfo['contracts']);
    if (
$contracts)
    {
        
$contractsigned in_array($foruminfo['forumid'],$contracts);
    }
    else
    {
        
$contractsigned false;
    }
    if (
$show['quickreply'] AND !$contractsigned)
    {
        
$show['quickreply'] = false;
        
$show['wysiwyg'] = 0;
        
$quickreply ''
    }


Should work :)

amykhar 07-27-2005 12:30 AM

Yep. That's the last one I was playing with. :)

Amy

Chris M 07-27-2005 12:33 AM

How did you get it to update class_dm_forum.php? :)

I can't for the life of me figure out how...

Satan

amykhar 07-27-2005 12:39 AM

It's easy. forumdata_start
Code:

$this->validfields['mystrfield'] = array(TYPE_STR, REQ_NO);
$this->validfields['reqcontract'] = array(TYPE_UINT, REQ_NO);


Chris M 07-27-2005 12:42 AM

Quote:

Originally Posted by amykhar
It's easy. forumdata_start
Code:

$this->validfields['mystrfield'] = array(TYPE_STR, REQ_NO);
$this->validfields['reqcontract'] = array(TYPE_UINT, REQ_NO);


You are goddessly :p

In my defence, it is 2:40am :p

Satan

amykhar 07-27-2005 12:43 AM

Don't thank me. Kirby taught me :D

Chris M 07-27-2005 12:45 AM

Quote:

Originally Posted by amykhar
Don't thank me. Kirby taught me :D

Well Kirby isn't here, so when I'm thanking you, then I'm also thanking Kirby :D

Satan

amykhar 07-27-2005 01:07 AM

Unfortunately, products are not working properly for me; so I can't export this for my beta testers to try out. But, I have it down to simply importing the product to install this puppy. I'm hoping Jelsoft resolves my product issue quickly so I can get this stuff released.

Chris M 07-27-2005 01:11 AM

<a href="http://www.vbulletin.com/forum/bugs35.php?do=view&bugid=811" target="_blank">This Bug?</a>
Odd - It doesn't affect me o_O

Satan

amykhar 07-27-2005 01:12 AM

yep. that bug. I feel so left out cause I can't play with products. :(

Amy

Andreas 07-27-2005 06:28 AM

Product ID must not be longer then 15 characters

amykhar 07-27-2005 12:57 PM

Quote:

Originally Posted by KirbyDE
Product ID must not be longer then 15 characters

amykhar_contract was the name I picked. Bingo. 16 characters and I was hosed. Thanks, Kirby.

Amy

amykhar 07-27-2005 01:31 PM

I am going to give this to my beta testing team and once it's approved by them, will post the RC1 version here.

FlyBoy73 08-05-2005 07:07 PM

Great hack, Amy. I know a few of our super mods of a couple dicey forums are going to love you! This is perfect for them.
Thanks!

cruelio 08-05-2005 07:52 PM

Quote:

Originally Posted by FlyBoy73
Great hack, Amy. I know a few of our super mods of a couple dicey forums are going to love you! This is perfect for them.
Thanks!

sorry to be a nag but any progress on the RC1 version? my mods are really excited ;)

Boofo 08-05-2005 09:00 PM

Quote:

Originally Posted by cruelio
sorry to be a nag but any progress on the RC1 version? my mods are really excited ;)

This works fine on 3.5 RC 1. ;)

amykhar 08-05-2005 09:59 PM

It's working on RC2 as well. At least from what I can see.


All times are GMT. The time now is 12:47 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.01349 seconds
  • Memory Usage 1,834KB
  • 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
  • (6)bbcode_code_printable
  • (1)bbcode_php_printable
  • (13)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