View Full Version : Miscellaneous Hacks - AgeLock v3.5
stuie_b
02-12-2010, 10:00 PM
Age Lock is an all-in-one Forum locking facility that works off the users age instead of there permissions
It gives you the ability to keep those Under 18's out of your adult section
Change log
+ Added support for CMS (Blog locking is there but not usable (99.9% sure blog locking is prob. pointless, since all users would be able to age restrict posts))
+ Enable/Disable Guest Viewing of age locked forums
+ Moved Age Lock core from outdated hook (global_start) to new (global_bootstrap_init_start)
+ Removed defunct Error message
+ Added abillity to re-enable Date of Birth Editing for all users
+ Fixed Bug where Date of birth editing is still disabled for users who are exempt from Age Lock
+ Reworded Default Age Lock Messages
+ Added support for multi-level forum locking using parent lock state (instead of parent-->forum, now parent-->forum-->subforum-->..)
+ Removed over zelus agelock checking (No more queries to get lock state)
+ Removed vb 3.x support
3.5a Fixes
+ Fixed CMS bugs (missing table prefix)
+ Updated template edit to work with Vb 4.1.5
3.5b Fixes
+ Really fixes the CMS bugs (Sorry :( )
Please be aware although support is provided it is limited. This version is in beta so expect bugs!
enjoy
Stuie
music legend
02-13-2010, 06:52 PM
nevermind
stuie_b
02-13-2010, 06:55 PM
Uninstall all previous versions before installing latest version!
There is NO update code from previous versions to this!
Stuie
messengermatt
02-13-2010, 07:03 PM
This is pointless because what happens when someone lies about their age and they gain access to an 18+ section of someones forum?
Atleast with permissions you have to vet them first using join requests for access to an 18+ group before they can view 18+ forums.
Neptun
02-13-2010, 07:06 PM
the idea is very good .. but i has no sense because nobody can control the ages in the registrations ....
but maybe you can use the functions of this hack for another idea ;)
stuie_b
02-13-2010, 07:15 PM
This is pointless because what happens when someone lies about their age and they gain access to an 18+ section of someones forum?
Atleast with permissions you have to vet them first using join requests for access to an 18+ group before they can view 18+ forums.
Firstly Permissions offer no extra form of protection either, seeing as you have no idea who they are anyway not to mention the level of extra work involved for the admins to "vet".
Secondly, The idea is to remove the legal ramification from the site admins, yes users can and will lie about there age but it works on the basis that you trust your members. it's impossible for you to prevent people signing up with a fake bday unless you required proff of there D.O.B, however it helps to cover your back by providing a service which attempts to prevent under age users viewing adult material.
On a side note if you dont need the mod fine dont use it but dont go around calling mods pointless, at the end of the day you may not need it but someone else may, i wrote this mod a while back and 100+ installs dont seem to show it being pointless!
Stuie
Hornstar
02-13-2010, 08:07 PM
It is actually a great hack. something which I wish I had in some of my mods (vbtube etc.)
Is it possible to have a usergroup ignore the age permission?
stuie_b
02-13-2010, 08:22 PM
Currently the only user group that is exempt is the admin's/mods, I've added that option to list of features for the next update,
Stuie
argothiusz
02-13-2010, 08:27 PM
Just what I needed. Tagged for future use. Sure, members can change their age but this is the internet we are talking about. How many people using your board will most likely sign up with their real birthdate? I think this mod is great and offer extra protection for mature area.
TimberFloorAu
02-13-2010, 08:28 PM
no use to us, but great mod mate, well done and a cracking idea
Cableguy69
02-13-2010, 09:16 PM
Installed, great mod thanks.
The plus side is when a member signs up they are more likely to post there real age then discover they need to be 18 to access that section.
With Adult sections you can never be 100% sure your letting in over 18's only, but as long as you are seen to be trying that is what is important.
rajubd
02-13-2010, 09:56 PM
Can you improvit to adslock. Like person who use adblocker addon on firefox can't view forum. It will be great addon maybe best addon of the year.
Forum Lover
02-14-2010, 12:27 AM
Hell of a hack! :) requesting to integrate with DownloadsII (https://vborg.vbsupport.ru/showthread.php?t=231427). Tagged.
Can we have it like this please?
+ Minor will never see any adult corner. Any post or thread or forum. Not even from any search.
+Lets have an option under "Quick Links" for adults like, "Switch on/off Agelock". So that Adults also get chance to switch it ON in front of any minors from there family and later they can go back to switch it off.
VonDoom
02-14-2010, 01:21 AM
Installed and nominated... works ike a dream.. thanks for this.
messengermatt
02-15-2010, 06:13 PM
Firstly Permissions offer no extra form of protection either, seeing as you have no idea who they are anyway not to mention the level of extra work involved for the admins to "vet".
Secondly, The idea is to remove the legal ramification from the site admins, yes users can and will lie about there age but it works on the basis that you trust your members. it's impossible for you to prevent people signing up with a fake bday unless you required proff of there D.O.B, however it helps to cover your back by providing a service which attempts to prevent under age users viewing adult material.
On a side note if you dont need the mod fine dont use it but dont go around calling mods pointless, at the end of the day you may not need it but someone else may, i wrote this mod a while back and 100+ installs dont seem to show it being pointless!
Stuie
I guess your right but i already pay for a facility that age checks people using their credit card details if they choose to enter 18+.
It's a pricey plugin but you cannot lie about your age then, after all i wouldnt want my kids to lie about their age and then see something they shouldnt causing a whole lot of problems.
CRDeveloper
02-15-2010, 06:51 PM
Hi!
I just installed this mod, but i get a error code in visitor view.
I've a 100% Adult forum haha.
Lets say i blocked a forum and sub-forum and then i go to open internet explorer (for testing) as a visitor, and try to open another section of the website (that i haven't lock) and i get this
Warning: Cannot use a scalar value as an array in [path]/includes/functions.php on line 4085
Warning: Cannot use a scalar value as an array in [path]/includes/functions.php on line 4085
Warning: Cannot use a scalar value as an array in [path]/includes/functions.php on line 4085
Warning: Cannot use a scalar value as an array in [path]/includes/functions.php on line 4085
And the rest of the page is messed up.
My board threads aren't allowed to be view by unregistered members anyway, but even if i disable that the problems still there.
Right now the mod is disable, cuz i don't know what the hell? :confused:
Thanks for the help and the mod!! :)
mudkipper
02-23-2010, 12:03 AM
Hi!
I just installed this mod, but i get a error code in visitor view.
Warning: Cannot use a scalar value as an array in [path]/includes/functions.php on line 4085
Warning: Cannot use a scalar value as an array in [path]/includes/functions.php on line 4085
Warning: Cannot use a scalar value as an array in [path]/includes/functions.php on line 4085
Warning: Cannot use a scalar value as an array in [path]/includes/functions.php on line 4085
And the rest of the page is messed up.
Right now the mod is disable, cuz i don't know what the hell? :confused:
Thanks for the help and the mod!! :)
Im having a similar problem, in that it doesnt affect my whole board, it just shows up when a person enters a wrong password to login to the board - it does this in any browser for me when the add-on is enabled, disabling it solves this however, i would rather be able to use it!
Also mine isnt line 4085 mine is line 4124 in functions.php
Otherwise it is a good add-on ^^
I solved my problem by turning off the option should i hide the forum on the main Index? in the Agelock settings
stuie_b
02-23-2010, 12:16 AM
the problem has been identified and I'll be releasing a fix asap,
as a quick fix, add @ to the forumdisplay_start hook
Stuie
Forum Lover
02-23-2010, 01:23 AM
Stuie, I got some requests (https://vborg.vbsupport.ru/showpost.php?p=1981785&postcount=14) please.
stuie_b
02-26-2010, 10:14 PM
AgeLock v3.1A
Fixed Cannot use a scalar value
Fixed homepage notification bug (shows even when agelock is globally disabled)
For those with v3.0 already installed, the changes can be made without having to uninstall v3.0B and then install v3.1A,
Edit Plugin "global_start"
FIND
if($vbulletin->options['agelock_global'] and $vbulletin->options['agelock_hidemain']){
foreach ($vbulletin->forumcache as $key => $value){
if (agelock_check($vbulletin->forumcache[$key]['forumid'],1)){
$vbulletin->forumcache[$key] =0;
}
}
}
REPLACE WITH
if($vbulletin->options['agelock_global'] and $vbulletin->options['agelock_hidemain']){
foreach ($vbulletin->forumcache as $key => $value){
if (agelock_check($vbulletin->forumcache[$key]['forumid'],1)){
unset($vbulletin->forumcache[$key]);
}
}
}
Template Edit
"forumhome_forumbit_level1_post And forumhome_forumbit_level2_post"
FIND
<vb:if condition="$vboptions['agelock_frmnt'] AND $forum['agelock']">{vb:raw $vboptions['agelock_frmntm']}</vb:if>
REPLACE WITH
<vb:if condition="$vboptions['agelock_frmnt'] AND $forum['agelock'] AND $vboptions['agelock_global']">{vb:raw $vboptions['agelock_frmntm']}</vb:if>
However the new version of AgeLock now allows you to specify Usergroup are exempt from the Agelock check, this requires a full update!
Stuie
Forum Lover
03-02-2010, 07:06 AM
Stuie,
Does adult user can turn the lock off/on now?
Yurified
05-13-2010, 08:59 AM
I apologize I didn't read stuie b post. It works for now. Thanks :D
omega332432
06-24-2010, 07:17 AM
Is it possible to use this for CMS content as well?
Boofo
06-24-2010, 08:35 AM
Firstly Permissions offer no extra form of protection either, seeing as you have no idea who they are anyway not to mention the level of extra work involved for the admins to "vet".
Secondly, The idea is to remove the legal ramification from the site admins, yes users can and will lie about there age but it works on the basis that you trust your members. it's impossible for you to prevent people signing up with a fake bday unless you required proff of there D.O.B, however it helps to cover your back by providing a service which attempts to prevent under age users viewing adult material.
On a side note if you dont need the mod fine dont use it but dont go around calling mods pointless, at the end of the day you may not need it but someone else may, i wrote this mod a while back and 100+ installs dont seem to show it being pointless!
Stuie
But can't they still change their birthdays in the User CP if they find they are locked out of a fourm?
stuie_b
06-24-2010, 11:54 AM
Stuie,
Does adult user can turn the lock off/on now?
At the moment no, i have a few ideas on the best way of doing this, will keep you posted..
Is it possible to use this for CMS content as well?
Yes this feature is being tested right now and should be ready for the next update..
But can't they still change their birthdays in the User CP if they find they are locked out of a fourm?
No Age Lock removes the abillity to change your date of birth from the profile, once its installed only an admin/mod can change user DOB's from the admincp.
Stuie
Boofo
06-24-2010, 11:57 AM
Ahh, ok, so this hacks stops anyone from changing their DOB? Great! Thank you.
tbl33
07-06-2010, 06:12 PM
I installed this on v 4.0.4 and while,the install seemed to go well, it does not seem to work.
I added a few group that I did not want it to worry about like administrator, supermoderator
enabled it and clicked save. When I went to the registered Users group, I see no place to edit any age info. Each usergroup page looks just like it did before I installed this.
Am I missing something?
Thank you in advance!
stuie_b
07-06-2010, 09:56 PM
I installed this on v 4.0.4 and while,the install seemed to go well, it does not seem to work.
I added a few group that I did not want it to worry about like administrator, supermoderator
enabled it and clicked save. When I went to the registered Users group, I see no place to edit any age info. Each usergroup page looks just like it did before I installed this.
Am I missing something?
Thank you in advance!
Age Lock is forum based not user based, to specify any age lock you need to edit your specific forums, Admincp --> Forums & Moderators --> Forum Manager --> Edit
On a side note Admins and mods are already exempt from the age lock you dont need to add them to the Exempt usergroups in the Age lock Options.
Stuie
tbl33
07-07-2010, 03:43 AM
Oh, well don't I feel stupid. hehehe.....
Thank you!!!
tbl33
07-07-2010, 06:35 PM
For some reason I cannot get age lock to exempt the following group.
Unregistered / Not Logged In
I have tried Unregistered / Not Logged In, Guest, 1 for group id of 1.
Not sure what else to try, any advice?
I do not want to block people that are not logged in. I already have that stuff taken care of the way I want it via forum permissions.
I only want to block based on the the registered users group and the coppa groups.
tbl33
07-14-2010, 08:00 PM
Still awaiting an answer. I thought that this mod was supported.
stuie_b
07-14-2010, 09:02 PM
Still awaiting an answer. I thought that this mod was supported.
yes this mod is supported to the best of my abillities and time, i do have other things which need to be sorted before support is an issue like the next version of Age Lock maybe you should be greatful for having support at all,
In answer to your question guest are not exemptable in this version, they are in the latest version which is still under development and at the min there is no eta (problems :) ),
however since you seem hell bent on this here is a modded version of the code which will enable guest viewing
Edit Global_start hook (Age Lock - Global Setup) and replace all with
//Age Lock v3.1
function agelock_populate($fid){
global $db, $vbulletin;
$agelock_qry = $db->query_first("SELECT * FROM " . TABLE_PREFIX ."forum WHERE forumid='".$fid."'");
if($agelock_qry['parentid'] > 0){
//Check for Parent Lock
$agelock_parent = $db->query_first("SELECT * FROM " . TABLE_PREFIX ."forum WHERE forumid='".$agelock_qry['parentid']."'");
if($agelock_parent['agelock_parent']){
//Parent is locked, send lock status for sub-forum from parent
$agelock_ret['locked'] = $agelock_parent['agelock'];
$agelock_ret['method'] = $agelock_parent['agelock_method'];
$agelock_ret['age'] = $agelock_parent['agelock_age'];
}else{
//Parent Lock is Not enabled, send lock status for sub-forum
$agelock_ret['locked'] = $agelock_qry['agelock'];
$agelock_ret['method'] = $agelock_qry['agelock_method'];
$agelock_ret['age'] = $agelock_qry['agelock_age'];
}
}
$pre_year=date("Y"); $pre_month=date("m"); $pre_day=date("d"); $bday = explode("-", $vbulletin->userinfo['birthday']);
if($pre_month>$bday[0] || ($bday[0]==$pre_month && $pre_day>=$bday[1]) ){$agelock_ret['userage'] = $pre_year-$bday[2];}else{$agelock_ret['userage'] = $pre_year-$bday[2]-1;}
return $agelock_ret;
}//End of the AgeLock Population Funcion
function agelock_check($fid,$flag=0){
global $vbulletin,$db;
$agelock = agelock_populate($fid);
if($agelock['locked'] == 1 and $vbulletin->options['agelock_global']){
//if(!$vbulletin->userinfo['userid']){if($flag){return 1;}else{standard_error($vbulletin->options['agelock_guest']);}}
if(!$vbulletin->userinfo['permissions']['adminpermissions'] and !preg_match("/".$vbulletin->userinfo['usergroupid']."/i",$vbulletin->options['agelock_exmptusr'])){
if(!$vbulletin->userinfo['birthday'] and $vbulletin->userinfo['userid']){if($flag){return 1;}else{standard_error($vbulletin->options['agelock_nobday']);}}
if($agelock['method'] == 0){ //This forum has a lock, they need too be older than the value set
if($agelock['userage'] < $agelock['age']){ //Are you old enuff?
if($flag){return 1;}else{standard_error($vbulletin->options['agelock_toyng']);} //Your too young!
}
}elseif($agelock['method'] == 1){ //This forum has a lock, they need too be Younger than the value set
if($agelock['userage'] >= $agelock['age']){ //Are you young enuff?
if($flag){return 1;}else{standard_error($vbulletin->options['agelock_toold']);} //Your too Old!
}
}
} //End of check if there able to bypass the lock (admins/mods or user specified usergroups)
} //End of main age lock code
} //End of function
if($vbulletin->options['agelock_global'] and $vbulletin->options['agelock_hidemain']){
foreach ($vbulletin->forumcache as $key => $value){
if (agelock_check($vbulletin->forumcache[$key]['forumid'],1)){
unset($vbulletin->forumcache[$key]);
}
}
}
untested!
Stuie
tbl33
07-15-2010, 09:16 PM
Thank you! No need to get salty. A simple acknowledgement of my message would have prevented my sending another message, "7 days later". Anyway, thank you for your efforts.
tbl33
07-15-2010, 09:35 PM
FYI, the code works for allowing guests but it would appear that the sub forums locking isn't working real well. It locks the first tier under the category but anything below that is open.
ie. Underground is locked to over 18 the sub of Others is also locked but all of the subs under Others, is wide open.
I didn't notice if that was an issue in 3.1 or just the modified code above.
darksoul
08-08-2010, 08:39 AM
Hello,
We have a board with 148 forums and subforums. On each page load your plugin will query the database for all forums and it managed to fill a 100Mbps pipe line to the mysql server.
The agelock_populate function should use the forumcache instead of querying the database every time.
Regards,
Darksoul
stuie_b
08-11-2010, 10:52 AM
Latest version of Age Lock has now been attached,
Its recommended you uninstall all previous versions and upgrade to v3.5
+ Added support for CMS (Blog locking is there but not usable (99.9% sure blog locking is prob. pointless, since all users would be able to age restrict posts))
+ Enable/Disable Guest Viewing of age locked forums
+ Moved Age Lock core from outdated hook (global_start) to new (global_bootstrap_init_start)
+ Removed defunct Error message
+ Added abillity to re-enable Date of Birth Editing for all users
+ Fixed Bug where Date of birth editing is still disabled for users who are exempt from Age Lock
+ Reworded Default Age Lock Messages
+ Added support for multi-level forum locking using parent lock state (instead of parent-->forum, now parent-->forum-->subforum-->..)
+ Removed over zelus agelock checking (No more queries to get lock state)
Support is limited but i will try to answer as many as possible.
Stuie
CrystaStarLight
08-16-2010, 01:16 AM
This is a great hack, thank you! Marked installed & 5 starred. :)
Oh also, in the template changes, I needed to add vb: in front of the "if" conditions in the code, otherwise I was getting an error when I tried to save the template. I have 4.0.6. I don't know if needing a vb: in front of the IF's is a new thing with that version, I just noticed all the surrounding IF's had vb: in front of them, so I tried it and it got rid of the error. This is what I did:
<vb:if condition="$vboptions['agelock_frmnt'] AND $forum['agelock'] AND $vboptions['agelock_global']">{vb:raw $vboptions['agelock_frmntm']}</vb:if>
stuie_b
08-16-2010, 09:09 AM
This is a great hack, thank you! Marked installed & 5 starred. :)
Oh also, in the template changes, I needed to add vb: in front of the "if" conditions in the code, otherwise I was getting an error when I tried to save the template. I have 4.0.6. I don't know if needing a vb: in front of the IF's is a new thing with that version, I just noticed all the surrounding IF's had vb: in front of them, so I tried it and it got rid of the error. This is what I did:
<vb:if condition="$vboptions['agelock_frmnt'] AND $forum['agelock'] AND $vboptions['agelock_global']">{vb:raw $vboptions['agelock_frmntm']}</vb:if>
Thanks for the notice, i had used the old template code,
Updated package with correct installation details
Stuie
ImmortalForums
08-17-2010, 03:40 AM
Glad to see the query change. 300+ queries for my forum was a bit crazy.
OldSchoolDSL
12-27-2010, 02:16 AM
Installed and working
4.1 PL2
Would be wonderful if someone added the option for this to work with Blogs as well
m1thr0s
03-28-2011, 05:28 AM
absolutely love this mod - thanks for putting the work into it!
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
UPDATE cms_article SET agelock='', agelock_method='',agelock_age='' WHERE contentid='134';
stuie_b
08-05-2011, 02:39 PM
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!
Installing over it didn't work.
This is when I tried to promote an Article
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
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
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
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
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.
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.
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:
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:
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...
Still get this when I post an article
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
Installing over it didn't work.
This is when I tried to promote an Article
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
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)
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
I did this
* 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?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.