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)
-   -   Selective Forum Filter (https://vborg.vbsupport.ru/showthread.php?t=98360)

akanevsky 10-13-2005 10:00 PM

Selective Forum Filter
 
I no longer support my hacks. Please feel free to update them and release new versions elsewhere as long as I get the credit for the original modification.

/*================================================= =====================*\
|| Selective Forum Filter
||
|| Author : Anton Kanevsky
|| Co-Author(s) : Andreas
|| Works on : vBulletin 3.5.x - 3.8.x
|| Released : May 31, 2009
||
|| Time required to install: 30 seconds
|| Difficulty: easy
\*================================================ ======================*/

DESCRIPTION

Ever came across large boards with a huge number of sub forums? Couldn't find your info? Wanted to run away from that huge load of stupid threads? This hack is intended to save your users from having such a horrible experience. It provides them with an opportunity to exclude any number of forums from the forums list (as well as from "get new"/"get daily" searches), which still letting them to access those forums directly and search within them, too.

STATISTICS

Products to Install: 1


INTRODUCTION

To enable "can be excluded" in all forums, run this query:
UPDATE PFXforum SET excludable = 1
To disable "can be excluded" in all forums, run this query:
UPDATE PFXforum SET excludable = 0
In both cases, PFX must be replaced with the actual table prefix that you have defined in config.php.
If you have not defined a prefix, remove PFX from the queries.
After you run either one of these queries, you must then open and save any one forum for the forum cache to be updated.

VERSION HISTORY

1.1.0
[+] The hack is now compatible with vBulletin 3.5.x - 3.8.x.
[+] Eliminated all template edits.

1.0.2
[+] The hack is now compatible with vBulletin 3.6.
[+] Corrected a couple of mistakes in the installation manual.

1.0.1
[+] Added option to set forums as excludable. By default, excludability of all forums is disabled.

1.0.0
First Public Release

The installation manual is contained within the attached file.

IF YOU LIKE MY HACK, PLEASE CLICK INSTALL

Andreas 10-14-2005 01:33 AM

Hmm, not sure but what about

cache_ordered_forums
PHP Code:

$excludeforums explode(','$vbulletin->userinfo['excludeforumids']);
foreach (
$excludeforums AS $forumid)
{
    
$vbulletin->forumcache["$forumid"]['displayorder'] = 0;


to avoid the file edits?

Btw: Where is the Product XML? ;)

theArchitect 10-14-2005 02:11 AM

Quote:

Originally Posted by KirbyDE
Hmm, not sure but what about

cache_ordered_forums
PHP Code:

$excludeforums explode(','$vbulletin->userinfo['excludeforumids']);
foreach (
$excludeforums AS $forumid)
{
    
$vbulletin->forumcache["$forumid"]['displayorder'] = 0;


to avoid the file edits?

Btw: Where is the Product XML? ;)

What he said.

But I love the concept.

heynurse 10-14-2005 05:33 AM

Yes, it looks like a great concept!

JJR512 10-14-2005 12:11 PM

Can this be used to, or be modified to be able to, set a universal forum to exclude from the "get new" from the admincp?

The reason is that I have a hidden forum on my board. It's set to inactive, which as described in the admincp prevents it from showing up on the forum view, but is still open if someone knows the URL to it. But it also shows up through the "get new" feature, and I'd like to avoid that. I don't want to make the forum a password-only or limit by permissions or masks; I want it to be accessible to anyone clever enough to find it, but I don't want it to be too too easy, either. :)

Boofo 10-14-2005 08:50 PM

Will this play well with Kirby's Opt-Out product and what is the difference between the two? ;)

akanevsky 10-14-2005 09:02 PM

Quote:

Originally Posted by KirbyDE
Hmm, not sure but what about

cache_ordered_forums
PHP Code:

$excludeforums explode(','$vbulletin->userinfo['excludeforumids']);
foreach (
$excludeforums AS $forumid)
{
    
$vbulletin->forumcache["$forumid"]['displayorder'] = 0;


to avoid the file edits?

Btw: Where is the Product XML? ;)

Hmm... That hooks only works within if ($getcounters)... And I am not sure that $getcounters are on everywhere. I'll have to research that before I can say yes.

Quote:

Originally Posted by JJR512
Can this be used to, or be modified to be able to, set a universal forum to exclude from the "get new" from the admincp?

The reason is that I have a hidden forum on my board. It's set to inactive, which as described in the admincp prevents it from showing up on the forum view, but is still open if someone knows the URL to it. But it also shows up through the "get new" feature, and I'd like to avoid that. I don't want to make the forum a password-only or limit by permissions or masks; I want it to be accessible to anyone clever enough to find it, but I don't want it to be too too easy, either. :)

This sounds like a vBulletin design issue. Post the problem on vBulletin.com, cause hidden forums should not show up through "get new".

Quote:

Originally Posted by Boofo
Will this play well with Kirby's Opt-Out product and what is the difference between the two? ;)

It will not play nicely. Instead, it is a modified version of his Opt-Out product, which features everything there is in Kirby's product plus removal of forums from forums list, which Kirby refused to add as a feature.

akanevsky 10-14-2005 10:08 PM

Okay, package updated:

1. Missing XML File Added.
2. The hack is now a plugin-type only. Does not require any file edits.

KirbyDE, please move this to an appropriate forum.

theArchitect 10-14-2005 10:54 PM

Quote:

Originally Posted by Dark Visor
Okay, package updated:

1. Missing XML File Added.
2. The hack is now a plugin-type only. Does not require any file edits.

KirbyDE, please move this to an appropriate forum.

You Da Man!

lefthome 10-18-2005 11:48 PM

This has to be one of the very best hacks I have used from this site. We have a lot of sections and a large number of our members get upset because of the size. This just fixed their crying....


THANK YOU, THANK YOU, THANK YOU.

Cyricx 10-27-2005 03:06 AM

Unbelievable. Awesome hack!!! This is just what I was hoping for especially for a site like mine that hosts forums for so many different subjects :)

Cyricx 11-01-2005 02:49 PM

I wonder if you could add like X images or something to the forumbit that were links to disable a forum from view.

Hexemer 11-22-2005 05:16 PM

A very nice usefull hack :)

akanevsky 11-22-2005 05:43 PM

Thank you.

Matt_270581 11-23-2005 11:12 PM

Great Hack:)

[high]* Matt_270581 installs[/high]

zappsan 11-25-2005 11:34 PM

Nice hack
/me clicks install

VAN 11-26-2005 01:31 AM

This is fantastic. Thanks for the work!

Now how about adding an option in the ACP forum manager to allow/disallow a forum from being hidden by users? For example, I have a News & Announcements forum that I would not want anyone to be able to hide. If you can add this functionality, it would be perfect. :)

ChrisBaktis 11-30-2005 06:10 PM

Quote:

Originally Posted by VAN
This is fantastic. Thanks for the work!

Now how about adding an option in the ACP forum manager to allow/disallow a forum from being hidden by users? For example, I have a News & Announcements forum that I would not want anyone to be able to hide. If you can add this functionality, it would be perfect. :)

I second this.

RMS-Chef 12-02-2005 04:22 AM

Great hack.

Is there any way to alter the code a bit to still display the selected forums when viewing but exclude it from Get New searches?

EDIT:
Maybe if I disable the plugin hooking to cache_ordered_forums but leave the rest enabled?

akanevsky 12-02-2005 11:19 AM

No. To get what you want, you need to use Andreas's Opt-Out from GetNew/GetDaily, which is essentially what this hack is based on, as said in first post.

KeithMcL 12-02-2005 02:19 PM

If you've previously installed Andreas's Opt-Out from GetNew/GetDaily hack, is it simply a matter of uninstalling/disabling it in order to use this hack?

akanevsky 12-02-2005 02:30 PM

Yes. This hack is exactly the same as his hack plus the hide forums functionality.

SpadMan 12-20-2005 10:33 AM

Nice! *Installed*

What would I need to do to include the filter in vBadvanced's latesttopics.php? Anyone done this yet?

KBV 12-20-2005 03:13 PM

Might be a stupid question, but can you exclude forums from get new/daily from ACP so that users won't see posts from forum X even if they do not have it selected themselves?

akanevsky 12-20-2005 05:46 PM

Yes, but that'd be a separate hack.

KBV 12-23-2005 07:12 AM

Any chance you could make it? XD Love this mod btw +installed ^^

AquilaEagle 12-27-2005 11:39 AM

downloaded, wont need to install until i have big forums!! :)

Baldy 12-30-2005 04:17 PM

I've been running it for a week on two boards, both pretty big, and from all I can tell it's running great. I really really like this hack.

digitalhome 01-05-2006 02:46 PM

This plugin has stopped working for me! I don't know when - perhaps after the upgrade to 3.5.2. I didn't notice until a member told me.

Anybody else having same problems?

digitalhome 01-05-2006 02:56 PM

Sorry about that. I guess in the upgrade the modifyoptions template was reverted. I have added the code and everything is fine.

lefthome 01-12-2006 06:34 PM

I used this hack, and a great hack I will add, until I upgraded to 3.5.3 and now i have two home pages using Split Forumhome into several Pages Hack.

Here is the minor issue and looking for solution, if one exists. I want to exclude some threads on the first page and some on the second page. In other words, i want to skip some and add others.

I tried to do some and went back and marked others but no luck on the first ones i excluded. Anyway to fix this so I can skip around the forum excluding what I want?

WAR 01-13-2006 12:12 PM

Quote:

Originally Posted by lefthome
I used this hack, and a great hack I will add, until I upgraded to 3.5.3 and now i have two home pages using Split Forumhome into several Pages Hack.

Here is the minor issue and looking for solution, if one exists. I want to exclude some threads on the first page and some on the second page. In other words, i want to skip some and add others.

I tried to do some and went back and marked others but no luck on the first ones i excluded. Anyway to fix this so I can skip around the forum excluding what I want?

I am also having difficulties getting this to work completely.

It will not let me exclude more than ~50 forums at a time. Is there anyway to bump this up to 2-300 as a maximum?

mccollin 01-24-2006 11:53 PM

I like the hack, but would also like to have the ability to exclude some forums from being excluded. I'm concerned that the members will miss some important information that will lead them to post unnecesary threads. Otherwise it looks pretty good.

Can you tell me if it also excludes these forums from searches?

akanevsky 01-25-2006 11:14 AM

Quote:

Can you tell me if it also excludes these forums from searches?
Yes.

Snatch 01-25-2006 12:19 PM

Installed on 3.5.3. Works perfect.

GreeTz
Snatch

Wild-Wing 01-26-2006 02:57 PM

nice hack great for those big boards.

the Sandman 02-08-2006 04:19 PM

Installed, but getting many database errors:

Quote:

Database error in vBulletin 3.5.3:


Invalid SQL:


## GET LATEST THREADS ##
SELECT thread.*,thread.iconid AS threadiconid , post.pagetext AS preview
FROM vb3_thread AS thread
LEFT JOIN vb3_deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')
LEFT JOIN vb3_post AS post ON(post.postid = thread.firstpostid)
WHERE open = '1'
AND forumid NOT IN (0,38,154,83,78,30,114,31,33,32,111,84,123,160,161 ,70,121,71,72,73,74,7,79,81,8,10,108,34,9,68,11,40 ,117,118,)
AND thread.visible = '1'
AND deletionlog.primaryid IS NULL
ORDER BY lastpost
DESC LIMIT 10;


MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')
AND thread.visible = '1'
AND deletionlog.primaryid IS NULL


Error Number : 1064

zylstra 02-08-2006 10:41 PM

Quote:

Originally Posted by WAR
I am also having difficulties getting this to work completely.

It will not let me exclude more than ~50 forums at a time. Is there anyway to bump this up to 2-300 as a maximum?

Or 100,000 for that matter.

Yep, I can't exclude more than ~70 at a time.

the Sandman 02-16-2006 02:07 PM

I cannot enable this hack without getting database errors, mostly for guests. Any ideas?

007 03-14-2006 11:00 AM

This does not seem to work on 3.5.4.

Can anybody else confirm if it does or does not work for 3.5.4? Thanks.

I'm looking at the code and maybe I'm missing something, but since when did setting a forum's display order to 0 make it not show up at all?


All times are GMT. The time now is 04:52 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.02726 seconds
  • Memory Usage 1,838KB
  • 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
  • (3)bbcode_php_printable
  • (10)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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