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)
-   -   Forum Display Enhancements - All Topic - Master Forums - Shows threads from multiple forums in one forum (https://vborg.vbsupport.ru/showthread.php?t=245839)

Alan_SP 04-20-2011 12:14 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2186503)
As for usergroup permissions, users will see the thread title for every thread in every forum, but they will get a permission denied error if they try to view a thread from a forum they don't have permission to view.

Thank you for adding option to include all forums, but this is a bit of a problem, because I don't want users to know for threads in special forums, like moderators' and admins' forums. Could you code some kind of operator that would say that I want mentioned forums excluded from all forums?

I have over 300 forums, and I need to exclude just few of them and want every other included in master forum (some kind of making it What's new forum). Is it possible?

EDIT: If you could program it to respect usergroup permissions, it would be excellent.

BirdOPrey5 04-20-2011 01:16 PM

I have no plans to have it respect usergroup permissions for thread titles at this time. I really don't even know how to start that and more importantly, it's not a feature I conceivably would ever need myself.

However to specify just forums to exclude is an easy change.

In the TWO plugins, All Topic Forumdisplay Thread Count and All Topic Forumdisplay Threadid change the line:
PHP Code:

     $hook_query_where "*/ WHERE forumid IN ($alltopics) AND sticky = 0 $prefix_filter $visiblethreads $globalignore $limitothers $datecut"

to

PHP Code:

     $hook_query_where "*/ WHERE forumid NOT IN ($alltopics) AND sticky = 0 $prefix_filter $visiblethreads $globalignore $limitothers $datecut"

Basically adding the word "NOT" to the code.

Now when you specify a master forum the numbers after it will be EXCLUDED instead of INCLUDED in the master forum,
for example:
Code:

2|11,20,58
Will make 2 a master forum that includes threads from EVERY forum except 11, 20, and 58.

Alan_SP 04-20-2011 02:13 PM

Excellent. Just to ask you, if I want to make this available in one mod, but with both including and excluding forums. how can this be made? So I could make some master forums that include forums, and have some that exclude certain forums?

Or it should be made with two mods, based on the same code, but different plugins' names? In case of two mods, could variable names be the same, just plugin names different?

Alan_SP 04-20-2011 02:31 PM

For example, if it could be used + or - sign for including, or excluding forums instead having | sign.

So we would have something like this:

5+5,3,6,7,8
10-5,3,6,7,8

In this example forum 5 would show 5,3,6,7 and 8 forums and forum 10 would show every other forum. It would be great, and this way everything would be covered, even usergruop permissions we could manually control without problems.

BirdOPrey5 04-20-2011 02:57 PM

As it's programmed now you can either include forums or exclude forums, you can't do both. Also making a copy of the mod probably wouldn't work either because they will both try to use the same hooks at the same time.

I will only support the mod as it is written. You are free to customize it if you understand PHP and MySQL but I can't/won't support those changes.

Alan_SP 04-20-2011 03:19 PM

I don't understand it very well, but I'm looking at variables.

I think if I rename variables (not to conflict them) I probably could make this in two mods, one for including and one for excluding mods.

This is what I would rename:

alltopic_enable
alltopic_master
alltopics
alltop
masters
assforums

I think that just adding e in front of this variables (seraching and replacing) would make this two two mods (including and excluding) different enough. Do you think it is enough?

BirdOPrey5 04-20-2011 03:26 PM

As I said above I don't think it will work because two mods are still going to need to try and access the same hook at the same time.

But as I also said, feel free to experiment.

Alan_SP 04-20-2011 03:38 PM

Well, I'll try and see if it could work on my test site. If it works, I'll post here. :)

Alan_SP 04-21-2011 07:40 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2186651)
However to specify just forums to exclude is an easy change.

In the TWO plugins, All Topic Forumdisplay Thread Count and All Topic Forumdisplay Threadid change the line:
PHP Code:

     $hook_query_where "*/ WHERE forumid IN ($alltopics) AND sticky = 0 $prefix_filter $visiblethreads $globalignore $limitothers $datecut"

to

PHP Code:

     $hook_query_where "*/ WHERE forumid NOT IN ($alltopics) AND sticky = 0 $prefix_filter $visiblethreads $globalignore $limitothers $datecut"

Basically adding the word "NOT" to the code.

I just tried to modify mod to enable both including and excluding type of master forums, but I found out the main problem at the moment is in this code. For some reason, when I have this NOT added, every forum becomes Master forum showing all threads. Not only specified, but every.

Do you maybe know how to make excluding type of Master forum?

BirdOPrey5 04-21-2011 11:57 PM

1 Attachment(s)
Yeah I see now it was more work than just changing the word to "NOT".

I am uploading a working "reversed" all topic in this post. In this version of All Topic you exclude forums from the master forum only. Forums not mentioned in all-topic settings work as normal.

Edited- Removed debug output from product file.


All times are GMT. The time now is 12:48 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.01142 seconds
  • Memory Usage 1,758KB
  • 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
  • (1)bbcode_code_printable
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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