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)
-   -   Age Lock Hack (https://vborg.vbsupport.ru/showthread.php?t=95992)

Mastar 11-18-2005 08:36 PM

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.

stuie_b 11-18-2005 08:39 PM

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

cheers

Mastar 11-18-2005 08:46 PM

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'");


Mastar 11-20-2005 06:32 PM

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?

stuie_b 11-21-2005 11:06 AM

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

Mastar 11-21-2005 02:26 PM

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.

KBV 12-01-2005 09:50 PM

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.

stuie_b 12-02-2005 09:22 PM

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

KBV 12-03-2005 06:44 AM

Thank you, it works perfect now. ;) Great work Stuie!

KBV 12-11-2005 07:46 AM

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?


All times are GMT. The time now is 09:32 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.01110 seconds
  • Memory Usage 1,740KB
  • 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_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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