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 - Exclude Forums from What's New & FORUMHOME (https://vborg.vbsupport.ru/showthread.php?t=256264)

HolyKiller 06-19-2011 11:13 PM

THANKS !!!!! Working like a charm on vB 4.1.4.

Just don't forget to enable one disabled plugin. Just go to ACP -> Plugins & Products -> Plugin manager , and enable "Exclude Forums from What's New" (there are 4 , but one of them is disabled ... ENABLE it !)

Then simply edit permissions for forums ... :)

ForumsMods 06-23-2011 04:17 AM

v4.1
===
- Fixed Bug: Forums not being excluded from searches
- New Feature: Added Hide from FORUMHOME

BadgerDog 06-23-2011 10:04 AM

Ok, re-installed 4.1 for testing on 4.1.3 of vBulletin ....

I now see how individual users can exclude forums from being searched, but where does one do a setting that PREVENTS one (or more) specific forum(s) for ALL users to NOT be searched?

Regards,
Doug

HolyKiller 06-23-2011 11:50 AM

2 BadgerDog:

For specific usergroup:
ACP -> Forums & Moderators -> Forum Permissionst -> Edit permission for that usergroup in that forum where you want block search. And set: Can Search Forums - No

For specific sub-forum for all of the users
ACP -> Forums & Moderators -> Forum Manager -> Edit specific forum and set: Index New Posts in Search Engine - No
(Setting this to 'No' will prevent anyone from being able to search in this forum) and rebuild search indexes:

Maintenance -> Update Counters -> Rebuild Search Index
This will take some time! Depending how big your forum is. And i recommand to CLOSE forum before you start this !!! And, ofcourse, make a DB backup ;)

BadgerDog 06-23-2011 11:59 AM

Quote:

Originally Posted by HolyKiller (Post 2211726)
2 BadgerDog:

For specific usergroup:
ACP -> Forums & Moderators -> Forum Permissionst -> Edit permission for that usergroup in that forum where you want block search. And set: Can Search Forums - No

For specific sub-forum for all of the users
ACP -> Forums & Moderators -> Forum Manager -> Edit specific forum and set: Index New Posts in Search Engine - No
(Setting this to 'No' will prevent anyone from being able to search in this forum) and rebuild search indexes:

Maintenance -> Update Counters -> Rebuild Search Index
This will take some time! Depending how big your forum is. And i recommand to CLOSE forum before you start this !!! And, ofcourse, make a DB backup ;)

Thank you ... :up:

Regards,
Doug

HolyKiller 07-03-2011 12:09 PM

Quote:

Originally Posted by ForumsMods (Post 2211630)
New Feature: Added Hide from FORUMHOME

This is AMAZING! Users on my forum totally LOVE this feature. They finally can hide unneeded forums.

MOTM +1 :]

BANDiT600 07-11-2011 10:40 AM

Now it's working!

rootsxrocks 11-24-2011 03:07 PM

I thought this was working fine, however when I acually used it myself I discovered that when I go to the CMS Home tab it causes mass Chaos
using 4.18 with assorted new post widgets on the home page including most viewed post by friends and latest post.
PHP Code:

vB_Legacy_Forum does not have a field 'title' on line 40 in 

/home/host1/public_html/example/vb/legacy/dataobject.php
#0 /home/host1/public_html/example/vb/legacy/forum.php(60): 

vB_Legacy_Dataobject->get_field('title')
#1 /home/host1/public_html/example/packages/vbforum/search/result/post.php(157): 

vB_Legacy_Forum->get_field('title')
#2 /home/host1/public_html/example/packages/vbcms/widget/searchwidget.php(620): 

vBForum_Search_Result_Post->render(Object(vB_Legacy_CurrentUser), 

Object(vB_Search_Criteria), 'vbcms_searchres...')
#3 /home/host1/public_html/example/packages/vbcms/widget/searchwidget.php(356): 

vBCms_Widget_Searchwidget->renderResult(Array, Array)
#4 /home/host1/public_html/example/packages/vbcms/controller/content.php(230): 

vBCms_Widget_Searchwidget->getPageView()
#5 [internal function]: vBCms_Controller_Content->actionView()
#6 /home/host1/public_html/example/vb/controller.php(191): call_user_func_array(Array, 

Array)
#7 /home/host1/public_html/example/packages/vbcms/route/content.php(97): 

vB_Controller->getResponse()
#8 /home/host1/public_html/example/vb/router.php(251): 

vBCms_Route_Content->getResponse()
#9 /home/host1/public_html/example/vb/bootstrap.php(58): vB_Router::getResponse()
#10 /home/host1/public_html/example/content.php(30): require_once('/home/host1/pu...')
#11 /home/host1/public_html/example/index.php(56): require('/home/host1/pu...')
#12 {main}


Fatal errorvB_Legacy_Forum does not have a field 'title' on line 40 in 

[path]/vb/legacy/dataobject.php in [path]/vb/vb.php on line 287
#0 vb_error_handler(256, vB_Legacy_Forum does not have a field 'title' on line 40 in 

/home/host1/public_html/example/vb/legacy/dataobject.php 

/
home/host1/public_html/example/vb/vb.php287, Array ([exception] => Exception Object ([] => 

vB_Legacy_Forum does not have a field 'title',[] => ,[] => 0,[] => 

/
home/host1/public_html/example/vb/legacy/dataobject.php,[] => 40,[] => Array ([0] => Array 

([
file] => /home/host1/public_html/example/vb/legacy/forum.php,[line] => 60,[function] => 

get_field,[class] => vB_Legacy_Dataobject,[type] => ->,[args] => Array ([0] => title)),[1] => Array 

([
file] => /home/host1/public_html/example/packages/vbforum/search/result/post.php,[line] => 

157,[function] => get_field,[class] => vB_Legacy_Forum,[type] => ->,[args] => Array ([0] => title)),[2

=> Array ([
file] => 

/
home/host1/public_html/example/packages/vbcms/widget/searchwidget.php,[line] => 

620,[function] => render,[class] => vBForum_Search_Result_Post,[type] => ->,[args] => Array ([0

=> 
vB_Legacy_CurrentUser Object ([] => ,[] => ,[] => ,[] => vB_Registry Object ([datastore] => 

vB_Datastore Object ([defaultitems] => Array ([0] => options,[1] => bitfields,[2] => 

attachmentcache,[3] => forumcache,[4] => usergroupcache,[5] => stylecache,[6] => 

languagecache,[7] => products,[8] => pluginlist,[9] => cron,[10] => profilefield,[11] => loadcache,[12

=> 
noticecache),[registry] => vB_Registry Object ( *RECURSION*,[dbobject] => vB_Database 

Object 
([functions] => Array ([connect] => mysql_connect,[pconnect] => 

mysql_pconnect,[select_db] => mysql_select_db,[query] => mysql_query,[query_unbuffered] => 

mysql_unbuffered_query,[fetch_row] => mysql_fetch_row,[fetch_array] => 

mysql_fetch_array,[fetch_field] => mysql_fetch_field,[free_result] => mysql_free_result,[data_seek

=> 
mysql_data_seek,[error] => mysql_error,[errno] => mysql_errno,[affected_rows] => 

mysql_affected_rows,[num_rows] => mysql_num_rows,[num_fields] => 

mysql_num_fields,[field_name] => mysql_field_name,[insert_id] => 

mysql_insert_id,[escape_string] => mysql_escape_string,[real_escape_string] => 

mysql_real_escape_string,[close] => mysql_close,[client_encoding] => 

mysql_client_encoding,[ping] => mysql_ping),[registry] => vB_Registry Object 

*
RECURSION*,[fetchtypes] => Array ([2] => 2,[1] => 1,[0] => 3),[appname] => 

vBulletin,[appshortname] => vBulletin,[database] => host1_firstforum,[connection_master] => 

Resource id #9,[connection_slave] => Resource id #9,[connection_recent] => Resource id 

#9,[multiserver] => ,[shutdownqueries] => Array ([lastvisit] => UPDATE user SET lastactivity = 

1322146912 WHERE userid ),[sql] => ,[reporterror] => 1,[error] => ,[errno] => 0,[maxpacket] => 

0,[locked] => ,[querycount] => 222),[prefix] => ,[checked_options] => 1),[input] => vB_Input_Cleaner 

Object 
([shortvars] => Array ([f] => forumid,[t] => threadid,[p] => postid,[u] => userid,[a] => 

announcementid,[c] => calendarid,[e] => eventid,[q] => query,[pp] => perpage,[page] => 

pagenumber,[sort] => sortfield,[order] => sortorder),[superglobal_lookup] => Array ([g] => _GET,[p

=> 
_POST,[r] => _REQUEST,[c] => _COOKIE,[s] => _SERVER,[e] => _ENV,[f] => _FILES),[scriptpath

=> ,[
reloadurl] => ,[wolpath] => ,[url] => ,[ipaddress] => ,[alt_ip] => ,[registry] => vB_Registry Object 

*
RECURSION*,[cleaned_vars] => Array ([vbulletin_collapse] => 7,[CC_referrerid] => 3,[CC_userid

=> 
3,[CC_password] => 7,[CC_lastvisit] => 3,[CC_lastactivity] => 3,[CC_threadedmode] => 

9,[CC_sessionhash] => 9,[CC_userstyleid] => 3,[CC_languageid] => 3,[CC_skipmobilestyle] => 

1,[s] => 9,[styleid] => 2,[langid] => 2,[api] => 0,[referrerid] => 3,[a] => 7,[nojs] => 1,[ajax] => 

1,[dofbredirect] => 1,[CC_cms_rate] => 7,[page] => 2,[pagenumber] => 3,[CC_thread_lastview] => 

7),[friendly_uri] => ),[db] => vB_Database Object ([functions] => Array ([connect] => 

mysql_connect,[pconnect] => mysql_pconnect,[select_db] => mysql_select_db,[query] => 

mysql_query,[query_unbuffered] => mysql_unbuffered_query,[fetch_row] => 

mysql_fetch_row,[fetch_array] => mysql_fetch_array,[fetch_field] => 

mysql_fetch_field,[free_result] => mysql_free_result,[data_seek] => mysql_data_seek,[error] => 

mysql_error,[errno] => mysql_errno,[affected_rows] => mysql_affected_rows,[num_rows] => 

mysql_num_rows,[num_fields] => mysql_num_fields,[field_name] => mysql_field_name,[insert_id

=> 
mysql_insert_id,[escape_string] => mysql_escape_string,[real_escape_string] => 

mysql_real_escape_string,[close] => mysql_close,[client_encoding] => 

mysql_client_encoding,[ping] => mysql_ping),[registry] => vB_Registry Object 

*
RECURSION*,[fetchtypes] => Array ([2] => 2,[1] => 1,[0] => 3),[appname] => 

vBulletin,[appshortname] => vBulletin,[database] => host1_firstforum,[connection_master] => 

Resource id #9,[connection_slave] => Resource id #9,[connection_recent] => Resource id 

#9,[multiserver] => ,[shutdownqueries] => Array ([lastvisit] => UPDATE user SET lastactivity = 

1322146912 WHERE userid ),[sql] => ,[reporterror] => 1,[error] => ,[errno] => 0,[maxpacket] => 

0,[locked] => ,[querycount] => 222),[userinfo] => Array ([userid] => 1,[temp] => ,[field1] => I have 

done it all Humanitarian Architect Naturalist Sculptor
Oddities Collector MathematicianEngineer 

Botanist
Inventor GeologistDork Idealist Chef Kind Artist Noeticist Docimologist Bacon lover 

Animal behaviorist
Lapidarist Libertarian Satyr,[field2] => Palm CoastFloridaUnited 

States
,[field3] => Community cooperation,[field4] => Artist,[field6] => Jamie Abbott,[field7] => 

4167538,[subfolders] => ,[pmfolders] => ,[buddylist] => 3 4 5 7 8 9 10 11 12 14 15 16 17 20 22 23 24 

25 28 29 31 32 34 35 36 40 44 45 46 49 53 54 57 60 63 71 74 75 80 84 92 94 95 96 97 106 110 111 113 

117 118 119 129 130 140 141 147 150 151 155 158 161 163 186 206 218 221 251 279 289 302 343 398 

414 517
,[ignorelist] => ,[signature] => [CENTER]Get your facts firstthen you can distort them as 

you please.[/CENTER],[searchprefs] => a:1:{s:20:"cmsadmin_showperpage";i:200;},[rank] => 

,[
excludeforums] => 4,[excludeforumhome] => 1,[usergroupid] => 6,[membergroupids] => 

14,[displaygroupid] => 6,[username] => ROOT,[password] => 

542hfgf92c0dd4d27f283a7a5761db271,[passworddate] => 1250222424,[email] => 


hjmaier 02-23-2012 10:46 PM

Thank you for that great AddOn!

I would like to have a larger box in the user control panel (I have over 200 forums). How can I make that box bigger?

nit233 04-05-2012 10:06 AM

Quote:

Originally Posted by HolyKiller (Post 2216184)
This is AMAZING! Users on my forum totally LOVE this feature. They finally can hide unneeded forums.

MOTM +1 :]

How can you hide the unneeded forums from ForumsHome

Alan_SP 04-05-2012 06:58 PM

To hide, you need to go to usergroups and there you need to enable to selected usergroup(s) that they can exclude forums. After that, they can exclude them from searching in What's new and also, there's option that they could use and exclude it from forumhome too if they want it.

Vcize 05-07-2012 02:50 AM

Is there anything that does something similar for VB3?

Deimos 05-21-2012 10:53 AM

Quote:

Originally Posted by hjmaier (Post 2302812)
Thank you for that great AddOn!

I would like to have a larger box in the user control panel (I have over 200 forums). How can I make that box bigger?

Edit the exclude_whatsnew template

Change - <select class="primary" id="sel_excludewn" name="excludewn[]" multiple="multiple" tabindex="1" size="19">

The bit in bold :P

Deimos 05-21-2012 11:01 AM

Quote:

Originally Posted by Vcize (Post 2326920)
Is there anything that does something similar for VB3?

Yes

https://vborg.vbsupport.ru/showthread.php?t=215001

str8bourbon 07-22-2012 02:23 PM

I installed this mod on one of my systems running VB 4.1.11, and it works flawlessy. However, no such luck with 4.2.0. There is no entry in the usergroup search permissions page, and clicking on "general settings" in the (any user) UserCP returns a server error.

Help! This mod is exactly what I need for my forum. I looked over the source, but I'm not familiar enough with the internal workings of VB 4.2 to even know where to start looking for the problem.

str8bourbon 07-22-2012 11:39 PM

Quote:

Originally Posted by str8bourbon (Post 2350433)
I installed this mod on one of my systems running VB 4.1.11, and it works flawlessy. However, no such luck with 4.2.0. There is no entry in the usergroup search permissions page, and clicking on "general settings" in the (any user) UserCP returns a server error.

Help! This mod is exactly what I need for my forum. I looked over the source, but I'm not familiar enough with the internal workings of VB 4.2 to even know where to start looking for the problem.

Nevermind. I uninstalled the product, then re-installed and all seems to be well now. Works great, and it's just what I was after, thanks!

sublo 10-18-2012 05:42 PM

Maybe I'm just an idiot. But now that I've got this mod installed, how do I hide a particular forum from New/What's-New?

viaccess 11-09-2012 05:51 PM

A problem - I have this working on 4.2, at least so far as hiding forums from forum home is concerned. However, highlighting a forum in general settings to hide from the 'What's New' section doesn't want to work. The drop down box is there, and it's possible to highlight and save - but the latest posts from the selected forum remain.

Elric 01-29-2013 03:36 PM

Working not on my vb4.2 pl3, no forum exluded

Elric 02-11-2013 12:27 PM

I have the mod new installed ans now it works but not for the newest themes in the vbcmps portal, have anywhere a idea?

craigvm 05-25-2013 09:50 AM

how do i set it to exclude a forum from whats new for all users

tehbasmentdwell 01-18-2014 07:08 AM

Installed and working thanks :)

HolyKiller 04-26-2014 03:46 PM

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




All times are GMT. The time now is 02:24 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.01515 seconds
  • Memory Usage 1,939KB
  • 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_php_printable
  • (6)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
  • (23)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