vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - Force Site Rules (Announcements) to be read (https://vborg.vbsupport.ru/showthread.php?t=67547)

Logikos 07-23-2004 10:00 PM

Force Site Rules (Announcements) to be read
 
====================
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:
PHP Code:

if ($agree

Replace with
PHP Code:

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:
PHP Code:

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

Under add:
PHP Code:

$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

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.


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

Quote:

Originally Posted by Live Wire
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

Quote:

Originally Posted by The Realist
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

Quote:

Originally Posted by Skyline_GT
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

Quote:

Originally Posted by lanc3lot
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,


All times are GMT. The time now is 11:43 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.01370 seconds
  • Memory Usage 1,820KB
  • 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
  • (4)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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