vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - AgeLock v3.5 (https://vborg.vbsupport.ru/showthread.php?t=235780)

m1thr0s 03-28-2011 05:28 AM

absolutely love this mod - thanks for putting the work into it!

EdQ 08-04-2011 09:30 PM

Has anyone been able to promote an Article while its enabled?

I get an error on this update. It doesn't seem to know the prefix of the table name
PHP Code:

UPDATE cms_article SET agelock=''agelock_method='',agelock_age='' WHERE contentid='134'


stuie_b 08-05-2011 02:39 PM

Quote:

Originally Posted by EdQ (Post 2229420)
I get an error on this update. It doesn't seem to know the prefix of the table name

EDIT: The fix didnt really fix the CMS bug, There was a change to the way the articles are handled and agelock went the wrong way :) i've found the bug and fixed it this time (i promise)

Because there is a database change to make it work with 4.1.5 you will need to reinstall agelock (3.5b)

Appologies for the cock up

Stuie

Hostboard 08-05-2011 04:23 PM

The version number in the plugin & product system still shows 3.5a

BTW this modification was a godsend for me. Thank you!

EdQ 08-05-2011 08:56 PM

Installing over it didn't work.
This is when I tried to promote an Article

PHP Code:

Database error in vBulletin 4.1.5:

Invalid SQL:
UPDATE xxx_cms_node SET agelock=''agelock_method='',agelock_age='' WHERE nodeid='135';

MySQL Error   Unknown column 'agelock' in 'field list' 

So I tried to uninstall and got this

PHP Code:

Database error in vBulletin 4.1.5:

Invalid SQL:
ALTER TABLE xxx_forum DROP `agelock` ,
DROP `agelock_parent` ,
DROP `agelock_method` ,
DROP `agelock_age`;

MySQL Error   Can't DROP 'agelock'; check that column/key exists 


EdQ 08-05-2011 09:17 PM

BTW, it did promote the Article.

Hostboard 08-06-2011 01:17 AM

Saw this was updated again today. Installed, set to over write... Got error... System still shows 3.5a

Code:

Database error in vBulletin 4.1.3:

Invalid SQL:
ALTER TABLE forum ADD agelock INT(1) DEFAULT '0';

MySQL Error  : Duplicate column name 'agelock'
Error Number  : 1060
Request Date  : Friday, August 5th 2011 @ 09:16:09 PM
Error Date    : Friday, August 5th 2011 @ 09:16:09 PM
Script        : http://www.MyDomain.com/forums/admincp/plugin.php?do=productimport
Referrer      : http://www.MyDomain.com/forums/admincp/plugin.php?do=productadd
IP Address    : xxx.xxx.xxx.xxx
Username      : UserID
Classname    : vB_Database_MySQLi
MySQL Version : 5.1.41-3ubuntu12.10


stuie_b 08-08-2011 12:40 PM

Quote:

Originally Posted by Hostboard (Post 2229925)
Saw this was updated again today. Installed, set to over write... Got error... System still shows 3.5a

The package was updated to reflect the correct version build! (3.5b) within an hour of your original post, However version info is irrelevant, The version number is for my internal use, it doesn't hold any weight within Agelock it's self.

Quote:

Originally Posted by Hostboard (Post 2229925)
Code:

Database error in vBulletin 4.1.3:

Invalid SQL:
ALTER TABLE forum ADD agelock INT(1) DEFAULT '0';

MySQL Error  : Duplicate column name 'agelock'
Error Number  : 1060
Request Date  : Friday, August 5th 2011 @ 09:16:09 PM
Error Date    : Friday, August 5th 2011 @ 09:16:09 PM
Script        : http://www.MyDomain.com/forums/admincp/plugin.php?do=productimport
Referrer      : http://www.MyDomain.com/forums/admincp/plugin.php?do=productadd
IP Address    : xxx.xxx.xxx.xxx
Username      : UserID
Classname    : vB_Database_MySQLi
MySQL Version : 5.1.41-3ubuntu12.10


Due to the fact AgeLock 3.5 is NOT considered upgrade safe at the moment there is NO upgrade instructions! you must perform a full reinstall (uninstall and re-install) on major changes like this.

However in an effort to help everyone upgrade to the latest build without the need to re-apply each and every lock state I've attached a version of agelock which will perform the db changes needed for 3.5b, Which will hopefully address this problem.

Code:


1. Goto  ADMINCP --> Plugins & Products -->Manage Products --> Add/Import Product
2. Select "product-aglk35b (CMS Edition) UPGRADE ONLY" from the agelock package
3. Set to overwrite
4. Import
5. Upload install/agelock_upgrade.php to your vbulletin root
6. goto install/agelock_upgrade.php
7. Remove install folder

Note: The upgrade package is simply Age Lock with the Database change for vb 4.1.5, Uninstalling the upgrade pack WILL remove all traces of age Lock not just the upgrade, If your installing a fresh use "product-aglk35b (CMS Edition)"

Note2: Age Lock version 3.5b is only needed for suite editions of vbulletin. Age Lock 3.5 is fully functional for current builds of vbulletin's Forum edition (upto 4.1.5pl1).

Stuie

Hostboard 08-08-2011 01:47 PM

Thank you for the explaination and more importantly thank you for your support and furthering this modificaiton.

sbelle731 08-08-2011 03:21 PM

I am having the issue where our members are not able to set the privacy for their birthdates. I know this mod prevents them from editing the date of birth, but does it also prevent them from displaying it as well? Any usergroup excluded from the agelock mod does not have this problem.

A few weeks ago, our forum crashed and we've had to reupload several mods because of it. I'm just not sure if the issue I'm having is a feature of the Age Lock mod, or if it is something else that is still screwed up LOL. I don't want to run around trying to fix something that isn't broke.

Hostboard 08-09-2011 02:26 AM

I used your upgrade file to 3.5b and it worked.
I tried to set a forum to age lock and it threw a DB error. I tried to uninstall and start fresh and it threw a DB error. Sorta stuck...

Here is the uninstall error:
Code:

Database error in vBulletin 4.1.3:

Invalid SQL:
ALTER TABLE cms_node DROP `agelock` ,
DROP `agelock_method` ,
DROP `agelock_age`;

MySQL Error  : Can't DROP 'agelock'; check that column/key exists
Error Number  : 1091
Request Date  : Monday, August 8th 2011 @ 10:20:22 PM
Error Date    : Monday, August 8th 2011 @ 10:20:22 PM
Script        : http://www.MyDomain.com/forums/admincp/plugin.php?do=productkill
Referrer      : http://www.MyDomain.com/forums/admincp/plugin.php?do=productdelete&productid=aglk35&s=
IP Address    : xxx.xxx.xxx.xxx
Username      : UserID
Classname    : vB_Database_MySQLi
MySQL Version : 5.1.41-3ubuntu12.10

Here is the error when I try to set a forum to age lock:
Code:

Database error in vBulletin 4.1.3:

Invalid SQL:
UPDATE forum SET
    title_clean = 'Adults',
    title = 'Adults',
    description_clean = '',
    description = '',
    link = '',
    displayorder = 1,
    parentid = 8,
    daysprune = -1,
    defaultsortfield = 'lastpost',
    defaultsortorder = 'desc',
    showprivate = 0,
    newpostemail = '',
    newthreademail = '',
    ### Bitfield: forum.options ###
        options = IF(options & 8, options - 8, options),
        options = IF(options & 16, options - 16, options),
        options = IF(options & 32, options - 32, options),
        options = IF(options & 32768, options - 32768, options),
        options = IF(options & 8192, options, options + 8192),
        options = IF(options & 4, options, options + 4),
        options = IF(options & 1, options, options + 1),
        options = IF(options & 2, options, options + 2),
        options = IF(options & 16384, options, options + 16384),
        options = IF(options & 256, options - 256, options),
        options = IF(options & 64, options, options + 64),
        options = IF(options & 128, options, options + 128),
        options = IF(options & 512, options, options + 512),
        options = IF(options & 1024, options, options + 1024),
        options = IF(options & 2048, options, options + 2048),
        options = IF(options & 4096, options, options + 4096),
        options = IF(options & 65536, options, options + 65536),
        options = IF(options & 131072, options - 131072, options),
    styleid = 0,
    imageprefix = '',
    password = '',
    vbseo_enable_likes = 1,
    vbseo_moderatepingbacks = 1,
    vbseo_moderatetrackbacks = 1,
    vbseo_moderaterefbacks = 1,
    xx_owner = 0,
    xx_ownername = '',
    xx_deletion = 0,
    xx_validparent = 1,
    xx_views = 0,
    agelock = '1',
    agelock_age = '18',
    agelock_method = '0'
WHERE forumid = 55;

MySQL Error  : Unknown column 'agelock' in 'field list'
Error Number  : 1054
Request Date  : Monday, August 8th 2011 @ 10:24:29 PM
Error Date    : Monday, August 8th 2011 @ 10:24:29 PM
Script        : http://www.MyDomain.com/forums/admincp/forum.php?do=update
Referrer      : http://www.MyDomain.com/forums/admincp/forum.php?do=edit&f=55
IP Address    : xxx.xxx.xxx.xxx
Username      : UserID
Classname    : vB_Database_MySQLi
MySQL Version : 5.1.41-3ubuntu12.10


HMBeaty 08-09-2011 02:29 AM

Looks to me like it didn't even create the column agelock

Hostboard 08-09-2011 02:36 AM

I also did run the php file in the install directory and it said upgrade successful.

Hostboard 08-10-2011 02:13 PM

Stuie, thank you for taking the time to trouble shoot my problem with AgeLock. Support like this is unprecedented and rarely matched.

Thank you...

EdQ 08-10-2011 11:14 PM

Still get this when I post an article

Code:

Invalid SQL:
UPDATE xxx_cms_node SET agelock='', agelock_method='',agelock_age='' WHERE nodeid='141';

MySQL Error  : Unknown column 'agelock' in 'field list'
Error Number  : 1054


stuie_b 08-11-2011 02:19 PM

Quote:

Originally Posted by EdQ (Post 2229850)
Installing over it didn't work.
This is when I tried to promote an Article

PHP Code:

Database error in vBulletin 4.1.5:

Invalid SQL:
UPDATE xxx_cms_node SET agelock=''agelock_method='',agelock_age='' WHERE nodeid='135';

MySQL Error   Unknown column 'agelock' in 'field list' 

So I tried to uninstall and got this

PHP Code:

Database error in vBulletin 4.1.5:

Invalid SQL:
ALTER TABLE xxx_forum DROP `agelock` ,
DROP `agelock_parent` ,
DROP `agelock_method` ,
DROP `agelock_age`;

MySQL Error   Can't DROP 'agelock'; check that column/key exists 


Both errors are because agelock isn't installed correctly, the fields necessary for agelock to function dont exist.

If you have access to phpmyadmin manually confirm this before trying the following. (Making sure that all agelock fields dont exist! - forum,blog,cms_node)
If they dont exist you have 2 options


* Edit the agelock product in vb and remove the uninstall code, then uninstall agelock before installing agelock with "product-aglk35b (CMS Edition).xml"

-or-


* Re-create the fields via phpmyadmin using the sql code below. (replacing " . TABLE_PREFIX . " with your tables prefix)

Code:

ALTER TABLE " . TABLE_PREFIX . "forum ADD agelock INT(1) DEFAULT '0';
ALTER TABLE " . TABLE_PREFIX . "forum ADD agelock_parent INT(1) DEFAULT '0';
ALTER TABLE " . TABLE_PREFIX . "forum ADD agelock_method INT(1) DEFAULT '0';
ALTER TABLE " . TABLE_PREFIX . "forum ADD agelock_age varchar(10);

ALTER TABLE " . TABLE_PREFIX . "blog ADD agelock INT(1) DEFAULT '0';
ALTER TABLE " . TABLE_PREFIX . "blog ADD agelock_method INT(1) DEFAULT '0';
ALTER TABLE " . TABLE_PREFIX . "blog ADD agelock_age varchar(10);

ALTER TABLE " . TABLE_PREFIX . "cms_node ADD agelock INT(1) DEFAULT '0';
ALTER TABLE " . TABLE_PREFIX . "cms_node ADD agelock_method INT(1) DEFAULT '0';
ALTER TABLE " . TABLE_PREFIX . "cms_node ADD agelock_age varchar(10);


If they do exist
* Check all the agelock fields exist (forum,blog,cms_node)
If it is missing the fields on certain tables you can either
* Remove the fields from the tables that do have the fields and then perfom option 1 from above
* Re-create the missing fields using the SQL code above.
None of the fields exist on any tables
* Edit the agelock product in vb and remove the uninstall code, then uninstall agelock before installing agelock with "product-aglk35b (CMS Edition).xml"
If you opt to re-create the fields then agelock will function as it should, However to prevent any issues elsewhere i would recommend re-installing age lock using "product-aglk35b (CMS Edition).xml"

Stuie

EdQ 08-14-2011 10:00 PM

I did this

Quote:

* Re-create the missing fields using the SQL code above.
I don't get that error anymore.

Could not re-install because it told me the field was there.
So un-installed and re-installed.
So far so good.

8thos 08-14-2011 11:32 PM

Interesting.

tbl33 09-22-2011 03:52 PM

I just installed a fresh copy of vBulletin 4.1.6. Will this Mod work with the latest version of VB?

Scyther 10-30-2011 03:21 PM

good mod.

marked installed.

jagtpf 11-24-2015 07:52 AM

Does anyone run this hack under later versions of 4.2?

4.2.3 perhaps?


All times are GMT. The time now is 12:54 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.01329 seconds
  • Memory Usage 1,817KB
  • 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
  • (7)bbcode_code_printable
  • (5)bbcode_php_printable
  • (5)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
  • (21)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