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-22-2011 06:38 AM

1 Attachment(s)
Yes, that's it. :up:

Now it works excellent. I merged both options (for including and excluding), removed your debugging info (appeared on top of page in excluding forums), removed option for including all forums in excluding part and I hope that everything will work as intended. :)

I tested it on my server and now everything works as far as I can tell. I had strange bug, but really strange bug when sometimes excluding forums became including ones after reinstall and where reinstalling product again helped. :eek: I'm not sure why, but I changed plugin execution order for excluding forums plugins to 6 and tried 3 times to reinstall mod and it worked all 3 times fine. If someone would have problems, just try to reinstall.

I attached modified version and BirdOPrey5 I hope you'll to use it too (and support it). :) This is really excellent mod. :up:

Only suggestion is if names of forums in threadbit could become links to these forums? This may be very useful, especially if users would like to open new threads in appropriate forums.

Cybertims 04-22-2011 07:25 AM

Database error in vBulletin 4.1.3 Beta 1:

Invalid SQL:

SELECT COUNT(*) AS threads,
(
SELECT COUNT(*) AS newthread
FROM thread AS thread
WHERE forumid = 12
AND lastpost > 1303460427
AND open <> 10
AND sticky = 0

AND visible IN (0,1,2)



*/ WHERE forumid > 0 AND sticky = 0 AND visible IN (0,1,2)
) AS newthread

FROM thread AS thread

/*
WHERE forumid = 12
AND sticky = 0

AND visible IN (0,1,2)



*/ WHERE forumid > 0 AND sticky = 0 AND visible IN (0,1,2);

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 '*/ WHERE forumid > 0 AND sticky = 0 AND visible IN (0,1,2)
) AS newthre' at line 14
Error Number : 1064
Request Date : Friday, April 22nd 2011 @ 10:21:32 AM
Error Date : Friday, April 22nd 2011 @ 10:21:32 AM
Script : *****/forumdisplay.php/12-Master-Forum
Referrer : ******/index.php
IP Address : *****
Username : ****
Classname : vB_Database
MySQL Version : 5.0.91-log

I continually get this error above as soon as I turn on the product. I have created a forum called master forum which has ID of 12, I add 12|* and always get the above error when trying to view the new forum section.

Cheers

BirdOPrey5 04-22-2011 10:13 AM

Oh, the Master Forum needs at least 1 normal thread in it for this to work. Make a new thread before enabling the product.

Cybertims 04-22-2011 01:08 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2187341)
Oh, the Master Forum needs at least 1 normal thread in it for this to work. Make a new thread before enabling the product.

It does have 1 normal thread in it already.

BirdOPrey5 04-22-2011 01:43 PM

It looks like maybe you didn't make the file edit as explained in the instructions.

You must edit forumdisplay.php, find the code below and delete the line in red and then save and re-upload the file.

Code:

        ($hook = vBulletinHook::fetch_hook('forumdisplay_query_threadscount')) ? eval($hook) : false;

        # Include visible IN (0,1,2) in order to hit upon the 4 column index
        $threadscount = $db->query_first_slave("
          SELECT COUNT(*) AS threads,
          (
          SELECT COUNT(*) AS newthread
          FROM " . TABLE_PREFIX . "thread AS thread
          WHERE forumid = $foruminfo[forumid]
            AND lastpost > $lastread
            AND open <> 10
            AND sticky = 0
            $prefix_filter
            $visiblethreads
            $globalignore
            $limitothers
            $datecut
            $hook_query_where       
          ) AS newthread
                $hook_query_fields
                FROM " . TABLE_PREFIX . "thread AS thread
                $tachyjoin
                $hook_query_joins
                WHERE forumid = $foruminfo[forumid]
                        AND sticky = 0
                        $prefix_filter
                        $visiblethreads
                        $globalignore
                        $limitothers
                        $datecut
                        $hook_query_where
        ");
        $totalthreads = $threadscount['threads'];
        $newthreads = $threadscount['newthread'];


Alan_SP 04-22-2011 10:30 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2187341)
Oh, the Master Forum needs at least 1 normal thread in it for this to work. Make a new thread before enabling the product.

When I tested merging including and excluding options I used only empty forums for Master forums. And it worked without any problems (well, with new code for excluding it does). So I think that you don't have to have any threads in Master forums.

Only problem is you don't see on forum display (index page) that Master forums has any threads. They show only their own threads. At least it looks like that for me...

BirdOPrey5 04-23-2011 11:01 AM

Quote:

Originally Posted by Alan_SP (Post 2187565)
When I tested merging including and excluding options I used only empty forums for Master forums. And it worked without any problems (well, with new code for excluding it does). So I think that you don't have to have any threads in Master forums.

Only problem is you don't see on forum display (index page) that Master forums has any threads. They show only their own threads. At least it looks like that for me...

That is true, forumdisplay won't show threads from the slave forums, only the master. I have no plans to changing this anytime soon, it would require more plugins and probably more file edits.

Alan_SP 04-23-2011 06:45 PM

This is not problem for me. :) I'll write in forum description that there's no information about actual Master forums content and that they look inside themselves.

Master forums are excellent idea and very useful. :up:

BirdOPrey5 04-23-2011 07:04 PM

Noted that for some reason vBulletin used a different version of forumdiplay.php on VB 4.0.7. You DO NOT need to do the manual file edit on 4.0.7, it will just work. I know you MUST do the file edit on 4.0.8 and above and 4.0.4, not sure about 4.0.5/6.

vbandroid 06-04-2011 07:43 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2187718)
That is true, forumdisplay won't show threads from the slave forums, only the master. I have no plans to changing this anytime soon, it would require more plugins and probably more file edits.

This is a great mod! Thanks. I was wondering if its possible to have some sort of work around for this? perhaps add a condition code to the master board, like if forum id=X, then pull stats from a,b,c. That we can manually add. I'm not very good at this but would this be possible?


All times are GMT. The time now is 05:50 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.01192 seconds
  • Memory Usage 1,752KB
  • 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_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