Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
Age Lock Hack Details »»
Age Lock Hack
Version: 2.0 Beta 2, by stuie_b stuie_b is offline
Developer Last Online: Aug 2018 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 09-09-2005 Last Update: 06-12-2006 Installs: 52
DB Changes Uses Plugins Template Edits
Is in Beta Stage  
No support by the author.

UPDATE: Updated the code to work with latest versions (both stable and beta)

Quote:
----------------------
Whats it all about?
----------------------
Age Lock is an all-in-one Forum locking facillity that works off the users age instead of there permissions
It gives you the abillity to keep those Under 18's out of your adult section

IMPORTANT NOTICE: Please Make sure you uninstall any currently installed versions prior to
installing this version!! THIS IS A MUST DUE TO MAJOR CODE CHANGES!

---------------
Installaiton?
---------------

- Log into you Admin Control Panel -
#############################################
-----------------------------------------------
1.) Upload the contents of the Upload folder to your forum root
2.) Find Plugin System
3.) Click Manage Products
4.) Click [Add/Import Product]
5.) Under Import Product
6.) Select the Product-AgeLock.xml file
7.) Make sure Allow Overwrite is turned OFF!
8.) Press Import
-----------------------------------------------
Total Template edits: 1
Total File Modifications: 0
Total Plugins: 1
Total Hooks Used: 6
Total extra sql querys: 0

Make sure to read the txt files before installing!!!
limited support will be provided!

enjoy and dont forget to click install

Stuie B

Show Your Support

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

Comments
  #32  
Old 11-18-2005, 08:36 PM
Mastar's Avatar
Mastar Mastar is offline
 
Join Date: Sep 2005
Posts: 680
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm sorry to say that it still doesn't work. Still getting the DB error. I edited the template again and uploaded the product.
Reply With Quote
  #33  
Old 11-18-2005, 08:39 PM
stuie_b stuie_b is offline
 
Join Date: Jul 2005
Location: Newcastle, UK
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can you tell me if there is only one uninstall/install code when you edit the plugin

cheers
Reply With Quote
  #34  
Old 11-18-2005, 08:46 PM
Mastar's Avatar
Mastar Mastar is offline
 
Join Date: Sep 2005
Posts: 680
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by stuie_b
can you tell me if there is only one uninstall/install code when you edit the plugin

cheers

Install Code:
Code:
require_once('./global.php');
$db->query("ALTER TABLE " . TABLE_PREFIX . "forum ADD age_locked ENUM('0','1') DEFAULT '0'");
$db->query("ALTER TABLE " . TABLE_PREFIX . "forum ADD age_type ENUM('0','1') DEFAULT '0'");
$db->query("ALTER TABLE " . TABLE_PREFIX . "forum ADD age_value varchar(10) DEFAULT ''");
$db->query("INSERT INTO " . TABLE_PREFIX . "phrase (`phraseid`, `languageid`, `varname`, `text`, `phrasetypeid`) VALUES ('', '-1', 'ageincorrect', 'Sorry but this forum has been age locked, <br>You seem to be too young to view this forum!!', '1000')");
Uninstall Code:
Code:
require_once('./global.php');
$db->query("ALTER TABLE " . TABLE_PREFIX . "forum DROP COLUMN age_locked");
$db->query("ALTER TABLE " . TABLE_PREFIX . "forum DROP COLUMN age_value");
$db->query("ALTER TABLE " . TABLE_PREFIX . "forum DROP COLUMN age_type");
$db->query("DELETE FROM " . TABLE_PREFIX . "phrase WHERE varname='ageincorrect'");
Reply With Quote
  #35  
Old 11-20-2005, 06:32 PM
Mastar's Avatar
Mastar Mastar is offline
 
Join Date: Sep 2005
Posts: 680
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

New error I found after I install Gallery and try to create a Category:

Code:
Fatal error: Field age_locked is not defined in $validfields in class vb_datamanager_forum in /includes/class_dm.php on line 485
And this hack will not delete. Getting a DB error:

Database error in vBulletin 3.5.1:

Code:
Invalid SQL:
ALTER TABLE forum DROP COLUMN age_locked;

MySQL Error  : Can't DROP 'age_locked'. Check that column/key exists
Error Number : 1091
Date         : Monday, November 21st 2005 @ 04:42:01 AM
Script       : http://www.******.com/admincp/plugin.php
Referrer     : http://www.********.com/admincp/plugin.php?do=productdelete&productid=AgeLimit&s=
IP Address   : *******
Username     : *****
Classname    : vb_database
Any thoughts?
Reply With Quote
  #36  
Old 11-21-2005, 11:06 AM
stuie_b stuie_b is offline
 
Join Date: Jul 2005
Location: Newcastle, UK
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's because the plugin hasn't been installed correctly for some reason it is'nt installing it for you???

To uninstall the plugin, edit the plugin and remove the uninstall code, save it and then retry the uninstall

cheers

stuie
Reply With Quote
  #37  
Old 11-21-2005, 02:26 PM
Mastar's Avatar
Mastar Mastar is offline
 
Join Date: Sep 2005
Posts: 680
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by stuie_b
It's because the plugin hasn't been installed correctly for some reason it is'nt installing it for you???

To uninstall the plugin, edit the plugin and remove the uninstall code, save it and then retry the uninstall


cheers


stuie
Kool it is uninstalled.
Reply With Quote
  #38  
Old 12-01-2005, 09:50 PM
KBV KBV is offline
 
Join Date: Aug 2004
Location: Oslo, Norway
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works on my site, but only for people who are older. If I want a forum that is for people 15 and under, it allowes people 15 and over to post, but not below. Yes, I have tried changing the 0 and 1 thing.
Reply With Quote
  #39  
Old 12-02-2005, 09:22 PM
stuie_b stuie_b is offline
 
Join Date: Jul 2005
Location: Newcastle, UK
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KBV
Works on my site, but only for people who are older. If I want a forum that is for people 15 and under, it allowes people 15 and over to post, but not below. Yes, I have tried changing the 0 and 1 thing.
thanks for the notification i've re-written the code and have also removed the install/uninstall code from the plugin and added an external installer to see if that will fix the problems with the fields not being created correctly in the database


cheers


Stuie B
Reply With Quote
  #40  
Old 12-03-2005, 06:44 AM
KBV KBV is offline
 
Join Date: Aug 2004
Location: Oslo, Norway
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you, it works perfect now. Great work Stuie!
Reply With Quote
  #41  
Old 12-11-2005, 07:46 AM
KBV KBV is offline
 
Join Date: Aug 2004
Location: Oslo, Norway
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The mod is letting people not of the given age into the forums that have a lock. I've observered several 15-17 year olds in my 18+ forum. Not posting, but luriking, because posting would get them banned.

Anyone else see this behaviour?
Reply With Quote
Reply

Thread Tools

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 05:07 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.10051 seconds
  • Memory Usage 2,304KB
  • 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
  • (4)bbcode_code
  • (4)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
  • (4)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