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.


All times are GMT. The time now is 11:24 AM.

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.01393 seconds
  • Memory Usage 1,748KB
  • 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
  • (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
  • (10)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