PDA

View Full Version : Miscellaneous Hacks - Force Site Rules (Announcements) to be read


Logikos
07-23-2004, 10:00 PM
====================
Author: Ken 'LiveWire' Iovino
Site: www.initialz.com
Hack: Force Site Rules`
Version: 1.0.0
====================

Notes to me
rules_on_index_page.txt (9.4 KB, 21 views) Before update

Updates
Now have 2 methods of using this.

For the rules to be forced on the index page please download rules_on_index_page.txt
For the rules to be forced on the usercp page please download rules_on_usercp_page.txt


Update the users to 'not read'.

The abilty to set all users back to "not read", so you can update the rules.



Important Notice To Existing Users
Update #1
If you are using the index.php method please do this important update. I found a bug in the hack that will show guest the rules and try to force them to agree with them, and if they did it still wouldn't allow them to see the fourms, it would just redirect them back to the rules page. Please do this update so you don't lose your guest viewing your site. All new users, i have updated the install file.

In Index.php find:

if ($agree)


Replace with

if (!$bbuserinfo['userid'] or $agree)


---------------------------------

Update #2
If you installed this hack before 10-03-2004, and are using the usercp.php method, please do this important update. This will delete one less query. All new users, the files have been updated.

Open forums/usercp.php and find:

$globaltemplates = array(
'USERCP_SHELL',
'USERCP',
'usercp_nav_folderbit',

Under add:

$globaltemplates = array(
'USERCP_SHELL',
'USERCP',
'usercp_nav_folderbit',
'forum_rules',


What this does
This will force your members to read the site rules. When they try to go in the UserCp or the main forums (depending on the method you are using) they will be directed to the Site Rules. (which you make) and have to agree to them in order to use the usercp or forumshome.. Once they agree to the sites forum rules, they will be directed back to the user cp, or forumhome and not be forced to see that page again.

If you want this to force members on a difrrent page, please request it here and i will release how to do it on another page.


To do list...

Time to install: 5 minutes
Queries to run: 1
New Files: 1

/forum/rules.php

File Mods: 1

/forum/usercp.php

Templates to add: 1
New Phrases: 1



Please read carefully and make all the necessary changes as stated. This is will work if installed properly.
PLEASE REMEMBER TO BACKUP BEFORE YOU BEGIN! If you like this hack

Click It
https://vborg.vbsupport.ru/ (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=67547)

Help & Support
Before asking for support Please make sure you have done all necessary changes! If you still need support please post a reply here.

Please post bugs and errors here. Hope you like, feedback welcomed.

https://vborg.vbsupport.ru/external/2004/12/1.gif (https://www.paypal.com/xclick/business=iovinojr%40msn.com&item_name=Initial+Z+Free+Scripts&no_note=1&tax=0&currency_code=USD)

SnowBot
07-23-2004, 11:05 PM
Now this is a great idea and one that will come in handy for any board :) Fantastic.

I will install later as i have a banging head through to much ale :) But i clicked install :)

SnowBot
07-23-2004, 11:13 PM
Not installed yet but one quick question, is the navbar included on the rules page? Sorry i know i should read the code/install file but im abit drunk so dare not touch my board yet :)

Ryan Ashbrook
07-23-2004, 11:30 PM
From the screenshot, I say probably not.

Great hack, LiveWire! :)

Logikos
07-23-2004, 11:32 PM
Updated with link added to Navbar.

platnum
07-24-2004, 12:32 AM
Love it :D

One question... I rule an auction type site. Would it be possible to hook this up to the forums?

Thanks :D

Logikos
07-24-2004, 12:33 AM
What is it that you want it to do? You can make it so it forces in the index.php page of your vB forums

platnum
07-24-2004, 12:37 AM
Yes that would be great :D

If someone sends them a URL to a post on the forum, will the rules still popup ?

Merjawy
07-24-2004, 12:52 AM
Very nice, not gonna install as yet but I am sure I will be.. Thanks

The user will only see the rules once? is that based on cookies?

Logikos
07-24-2004, 12:53 AM
you mean any url to your forum? If so i might be able to work that, Gotta check it out.

AN-net
07-24-2004, 01:01 AM
what about when posting?

SnowBot
07-24-2004, 01:10 AM
how about for the arcade.php.

platnum
07-24-2004, 01:34 AM
you mean any url to your forum? If so i might be able to work that, Gotta check it out.


Yes, thats what I need :D

Logikos
07-24-2004, 01:59 AM
I can do arcade.php, and what do you mean when posting? i can try any url.

SnowBot
07-24-2004, 02:14 AM
Thanks live wire :)

chrisvonc
07-24-2004, 10:56 PM
Nice, I am going to try this one out later tonight!

FredFlintstone
07-25-2004, 08:52 AM
A modification to work on the main index.php page of the board would be great, or on newpost.php and newthread.php.

Thanks!

The Realist
07-25-2004, 10:47 AM
Questions:
1) Whats the rules.php for?
2) I could not run:
Type: GLOBAL
Varname: $vbphrase[site_rules]
Text: Rules
So I left it out
3) installed on without the above and working fine.

Laters

alkatraz
07-26-2004, 12:00 AM
awesome idea thx

Skyline_GT
07-26-2004, 01:39 AM
can you make a agree rules before post?

Logikos
07-26-2004, 02:22 PM
Questions:
1) Whats the rules.php for?
2) I could not run:
Type: GLOBAL
Varname: $vbphrase[site_rules]
Text: Rules
So I left it out
3) installed on without the above and working fine.

Laters

opps that should be:
Type: GLOBAL
Varname: site_rules
Text: Rules

Updated text.

Red Blaze
07-26-2004, 05:02 PM
Well, this is almost what I need, but I want one that will show up for someone that is posting for the first time, instead of seeing the UserCP for the first time.

Logikos
07-26-2004, 07:10 PM
When i get home from work i will make this work for posting, and for the arcade. Been busy.

ChurchMedia
07-28-2004, 02:12 AM
Perfect! We made some policy changes recently. I could have used this last week --- but thanks for it now!

:)

*installs*

Skyline_GT
07-28-2004, 08:02 AM
can you make a agree rules before post?
any answers plz?

vbIce
07-28-2004, 11:29 AM
I have been looking for something like this with a little DIFFERNT twist to it.

I do not know about you but I am TIRED of people NOT reading rules or important annoucements etc. What I would LOVE to have is a way to FORCE Everyone to read a certain message no matter what they are doing.

Users are logged in, I create a NEW Rule or Message that I want EVERYONE to read. As soon as I create the RULE etc I would like to be able to FORCE EVERYONE to read it before they can PROCEED viewing forums etc. So say a member is reading a POST, I create a NEW RULE and choose FORCE READ. When those members click anything else in the forum it auto POPS up NEW message with the NEW RULE etc I just made.

The ONLY way I thought this would work right is to FORCE CLEAR ALL cookies (FORECE LOGOUT) for the Forum so that the message would Appear as soon as they logged back in they would have to CLICK a button on message to continue, even possibly the ADMINS can set how LONG they must READ it BEFORE they can continue.

Can you do this? This would be of great benefit, it would allow Forums to KNOW that EVERYONE got the NEWS or NEW RULES. People would no longer have an excuse well I didn't know, I didn't see the new rules etc. I know for me this would be of GREAT help :)

Reeve of shinra
07-30-2004, 02:43 AM
I'm thinking of something simliar only have it redirect the user to our index page. Alot of people link to the forum directly and I want to cut back on that.

Logikos
10-03-2004, 07:50 PM
Force Site Rules is back, and will have updated instrutions later tonight for the forums index.php, and the arcade.php.

lanc3lot
10-03-2004, 09:44 PM
So u will do it be shown before ppl see the index forum page?
SWEET, looking forward for it mate

Logikos
10-03-2004, 09:49 PM
Yes when a member comes to your site, the first thing they will see is the rules, when they click i accept. it will record it in the database, and they will no be prompt the rules again. I'm also making it so you have updated rules. If you update your rules for w/e reason, then you add the new rules, and click on a update button, and it will make it so all user have not agreeded to the new rules, and they will be prompt the new rules again.

lanc3lot
10-03-2004, 10:01 PM
Live Ware, instead of Rules(although i want to use it also in Rules), it could be an Announcement for example?

I mean, this can be changed in text right?

Sorry for my bad english, i just got home after a long drinking night, and i am little dizzy:P

Logikos
10-03-2004, 10:42 PM
Yes you can use this for anything, rules just seemed to be the more common use of this. You can just edit the template and place an announcement there. :) Which makes me think, i'll change the title of my hack ^^

lanc3lot
10-03-2004, 11:45 PM
:)

Greaaaaaat mate...i just wait then, for a release:)
This would be a must have hack:)

Logikos
10-04-2004, 01:28 AM
Please read first thread, updates completed.

Mosh
10-06-2004, 05:59 AM
Live Wire,

This may be a stupid question, but where is the rules.php file mentioned in the 1st post and both text files, as I can not seem to find it and I have looked twice?

Thanks in advance,

JD. :)

Logikos
10-06-2004, 07:27 AM
Opps, i must have deleted it when i did the updates, thanks will reupload now. :)

KeithMcL
10-06-2004, 09:15 PM
Any chance you could add an option like this hack?

lanc3lot
10-07-2004, 11:35 AM
Live also, as i am ready to install...is this hack, includes what u wrote here:

""The abilty to set all users back to "not read", so you can update the rules, will release tomorrow. 10-05-2004""

?
Thanks a lot

Logikos
10-08-2004, 10:40 PM
IMPORTANT BUG FIX FOR THE INDEX.PHP METHOD!
If you are using the index.php method please do this important update. I found a bug in the hack that will show guest the rules and try to force them to agree with them, and if they did it still wouldn't allow them to see the fourms, it would just redirect them back to the rules page. Please do this update so you don't lose your guest viewing your site. You can find the update in the first post of this thread. All new users, I have updated the install file.

Logikos
10-08-2004, 10:49 PM
Live also, as i am ready to install...is this hack, includes what u wrote here:

""The abilty to set all users back to "not read", so you can update the rules, will release tomorrow. 10-05-2004""

?
Thanks a lot
I'm releasing that in a few mintues buddy,

Logikos
10-09-2004, 01:44 AM
New feature update:
The abilty to set all users back to not read so you can update the rules, and reforce the users to check the box again. Please redownload from the first post of this thread. See new screenshot for a better understanding.

lanc3lot
10-09-2004, 01:48 AM
U rule....going to install it tommorow after i get some sleep

Thanks a million:)


Ps

I think, u have the best support in hacks...its pity u are not the one who has released hacks like V3 Articles...u could have done good job there too:) Its pity, as it is dead now:(

Logikos
10-09-2004, 02:14 AM
Thanks alot lanc, well I have time now as i'm no longer the owner at vBhacks.us. And the more hacks I release and support the more I seem to learn. Got a couple of big hacks coming soon, well big to me cause they took awhile to write.

And I thank you and everyone else that uses this hack, gives feedback, and clicks the install button! :)

lanc3lot
10-13-2004, 03:31 PM
In the Rules in The index txt, u say to run a query..

That means, run an sql query or is somewhere else?

:nervous:

The Realist
02-16-2005, 09:38 AM
Is there anyway to put a delay on this so it stops peeps just agreeing to the rules and not reading them?

Laters

Freezerator
02-19-2005, 08:40 AM
Nice hack :)

djjeffa
02-19-2005, 11:37 PM
i tried to run the query and got
An error occurred while attempting to execute your query. The following information was returned.
error number: 1146
error desc: Table 'djjeffa_djjeffaVB.user' doesn't exist
I have seen tis error befor when tring to install hacks do any of you have any tips or ideals?

djjeffa
02-23-2005, 10:05 PM
i tried to run the query and got
An error occurred while attempting to execute your query. The following information was returned.
error number: 1146
error desc: Table 'djjeffa_djjeffaVB.user' doesn't exist
I have seen tis error befor when tring to install hacks do any of you have any tips or ideals?
Bump? :nervous:

Nutz
02-25-2005, 05:21 PM
Is there away so that the rules will show up to guests

BeePee
03-06-2005, 11:00 PM
djjeffa, looks like you didn't do the changes to the admincp/queries.php correctly. looks like the "case 05:..." is missing

Nutzz, do the 'Navbar' template change and edit the rules.php and delete this:
if (!$bbuserinfo['userid'])
{
print_no_permission();
}
after that guest can follow the rules link in the navbar.

TJFweb
03-22-2005, 10:57 AM
Try this for the forum_rules template instead:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<!-- no cache headers -->
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="Cache-Control" content="no-cache" />
<!-- end no cache headers -->
<title><phrase 1="$vboptions[bbtitle]">$vbphrase[x_powered_by_vbulletin]</phrase></title>
$headinclude
</head>
<body>
$header
$navbar
<form action="index.php" method="post">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
<td class="tcat">Design Forum Rules</td>
</tr>
<tr>
<td class="panelsurround" align="center">
<div class="panel">

<div style="width:640px" align="left">

<fieldset class="fieldset">
<legend>Forum Rules</legend>
<table cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td>In order to proceed, you must agree with the following rules:</td>
</tr>
<tr>

<td>
<div class="alt1" style="border:thin inset; padding:6px; height:225px; overflow:auto">



<!-- regular forum rules -->
$vbphrase[custom_forum_rules]
<!-- regular forum rules -->
</div>
<div><label><input type="checkbox" name="agree" value="1" /><strong>I have read, and agree to abide by $vboptions[bbtitle] rules.</strong></label>
</div>
</td>
</tr>

</table>
</fieldset>
</div>
</div>

<div style="margin-top:6px">
<input type="hidden" name="$bbuserinfo[userid]" />
<input type="submit" value="Submit">

</div>
</td>
</tr>
</table>
</form>
$footer

The Realist
03-23-2005, 06:52 PM
Can this hack be turned off and on from admin?

Reason I ask is I want to install it but have not sorted out any rules as yet so I want to have the option to disable it for now.

Laters

YLP1
03-23-2005, 09:26 PM
Hello everyone, I am using the cp version of this mod on vb 3.0.7.... All is working except that when the cp linked the person will put a check mark in the the I agree and when they go back to the CP they have to again agree to the terms.

Did I install something incorrectly which is causing the rules to be agreed to everytime someone goes to the CP panel or is this how this was designed?

Any help is greatly appreciated.

Raptor
03-25-2005, 03:19 AM
works great on vb3.07 - thanks