I can confirm that the mod works fine on 4.2.2 PL1
Also following hack could be useful for someone who want to exclude some forums for new users by default :]
- If new registrations needs to be confirmed via email follow
"A"
- If NO email confirmation is required to registration then follow
"B"
A: Go to AdminCP -> Plugins & Products -> Plugin Manager and "[Add New Plugin]"
Product: vBulletin
Hook Location: register_addmember_
complete
Title: <whatever you want>
Execution Order: 5
Plugin PHP Code:
1] For having the "Hide Forums from Forumhome" checked for all new registered users by default
PHP Code:
if (!empty($_POST)){
if($vbulletin->options['verifyemail']){
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "usertextfield SET excludeforumhome = '1' WHERE userid = '".$userid."' LIMIT 1 ");
}
}
2] For excluding some forums from what's new by default
PHP Code:
$forumhide = <list_of_the_forum_IDs>; //example: $forumhide = '487,496,503,504,647';
if (!empty($_POST)){
if($vbulletin->options['verifyemail']){
$vbulletin->input->clean_gpc('p', 'forumhide',TYPE_STR);
if ($forumhide == !NULL){
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "usertextfield SET excludeforums = '".$forumhide."' WHERE userid = '".$userid."' LIMIT 1 ");
}
}
}
3] For combination of BOTH of the things above (Exclude specific forums AND hide from forumhome by default)
PHP Code:
$forumhide = <list_of_the_forum_IDs>; //example: $forumhide = '487,496,503,504,647';
if (!empty($_POST)){
if($vbulletin->options['verifyemail']){
$vbulletin->input->clean_gpc('p', 'forumhide',TYPE_STR);
if ($forumhide == !NULL){
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "usertextfield SET excludeforums = '".$forumhide."', excludeforumhome = '1' WHERE userid = '".$userid."' LIMIT 1 ");
}
}
}
B: Go to AdminCP -> Plugins & Products -> Plugin Manager and "[Add New Plugin]"
Product: vBulletin
Hook Location: register_addmember_
process
Title: <whatever you want>
Execution Order: 5
Plugin PHP Code:
1] For having the "Hide Forums from Forumhome" checked for all new registered users by default
PHP Code:
if (!empty($_POST)){
if(!$vbulletin->options['verifyemail']){
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "usertextfield SET excludeforumhome = '1' WHERE userid = '".$userid."' LIMIT 1 ");
}
}
2] For excluding some forums from what's new by default
PHP Code:
$forumhide = <list_of_the_forum_IDs>; //example: $forumhide = '487,496,503,504,647';
if (!empty($_POST)){
if(!$vbulletin->options['verifyemail']){
$vbulletin->input->clean_gpc('p', 'forumhide',TYPE_STR);
if ($forumhide == !NULL){
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "usertextfield SET excludeforums = '".$forumhide."' WHERE userid = '".$userid."' LIMIT 1 ");
}
}
}
3] For combination of BOTH of the things above (Exclude specific forums AND hide from forumhome by default)
PHP Code:
$forumhide = <list_of_the_forum_IDs>; //example: $forumhide = '487,496,503,504,647';
if (!empty($_POST)){
if(!$vbulletin->options['verifyemail']){
$vbulletin->input->clean_gpc('p', 'forumhide',TYPE_STR);
if ($forumhide == !NULL){
$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "usertextfield SET excludeforums = '".$forumhide."', excludeforumhome = '1' WHERE userid = '".$userid."' LIMIT 1 ");
}
}
}