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 - Sorky - SubForum List Control (https://vborg.vbsupport.ru/showthread.php?t=233084)

bigrover 09-21-2010 06:28 PM

I was able to fix the collapsing forum issue by modifying the parse_templates plugin. I found the problem was related to missing </ol> tags in the html code delivered to the browser by comparing output using the baseline configuration where the collapse feature works, and with the Sub-Forum List Control enabled.

I tried to locate where these tags were supposed to be reinserted into the content per the embedded notes but I never determine where that should have been.

In the parse_templates plugin:

Replace:
PHP Code:

$vbulletin->templatecache[forumhome_forumbit_level1_nopost] = str_replace($Sorky01_SubforumOLBefore ''$vbulletin->templatecache[forumhome_forumbit_level1_nopost]); 

With:
PHP Code:

    // hack to fix collapsing forums
    // $vbulletin->templatecache[forumhome_forumbit_level1_nopost] = str_replace($Sorky01_SubforumOLBefore , '', $vbulletin->templatecache[forumhome_forumbit_level1_nopost]);
    // end hack 


bigrover 09-21-2010 08:19 PM

I found another problem related to how the Sub-Forum List Control is handling the <ol> tag. When the parse_templates plugin replaces the data for categories it removes an <ol> tag that is defining the container that holds the displayed data, while leaving the closing </ol> tag. This causes the container to close early, leaving all remaining forums, and the footer outside of the bounding box. I can fix it by commenting out the removal of the <ol> tag as indicated below, but that causes problems with the table width resulting in the sub-forums getting bunched up to the left rather than properly spaced as intended by the mod. This is apparently caused by the class attribute in the <ol> tag. I modified the plugin to remove the class attribute and have satisfactory results.

In the parse_templates plugin:

Replace:
PHP Code:

$vbulletin->templatecache[forumhome_forumbit_level1_nopost] = str_replace($Sorky01_SubforumOLBefore ''$vbulletin->templatecache[forumhome_forumbit_level1_nopost]); 

With:
PHP Code:

    // hack to correct forum home formatting
    
$Sorky01_SubforumOLReplace '<ol>' "\r\n";
    
$vbulletin->templatecache[forumhome_forumbit_level1_nopost] = str_replace($Sorky01_SubforumOLBefore $Sorky01_SubforumOLReplace$vbulletin->templatecache[forumhome_forumbit_level1_nopost]);
    
// end hack 


pedroenf 09-21-2010 08:31 PM

Quote:

Originally Posted by bigrover (Post 2101516)
I was able to fix the collapsing forum issue by modifying the parse_templates plugin. I found the problem was related to missing </ol> tags in the html code delivered to the browser by comparing output using the baseline configuration where the collapse feature works, and with the Sub-Forum List Control enabled.

I tried to locate where these tags were supposed to be reinserted into the content per the embedded notes but I never determine where that should have been.

In the parse_templates plugin:

Replace:
PHP Code:

$vbulletin->templatecache[forumhome_forumbit_level1_nopost] = str_replace($Sorky01_SubforumOLBefore ''$vbulletin->templatecache[forumhome_forumbit_level1_nopost]); 

With:
PHP Code:

    // hack to fix collapsing forums
    // $vbulletin->templatecache[forumhome_forumbit_level1_nopost] = str_replace($Sorky01_SubforumOLBefore , '', $vbulletin->templatecache[forumhome_forumbit_level1_nopost]);
    // end hack 



Thanks for the bug correction. It DOES work. I've been trying to solve this issue for a very long time. Time to update the MOD now, where's the coder? :)

chriske 09-23-2010 02:10 PM

Quote:

Originally Posted by pedroenf (Post 2101586)
Time to update the MOD now, where's the coder? :)

Please update this wonderful mod :cool:

ChaFF 09-24-2010 07:57 AM

I think this mod should be a default in vb board

Alex@Mk3OC 10-06-2010 02:55 PM

Has anyone had a problem with this mod messing the display of the forum index up in IE7?

I originally suspected vb to be at fault, but when I disable this mod it displays as it should in IE7?

haidm 10-06-2010 03:44 PM

how can I remove "sub-forum" text with this mod?

ZacFields 11-28-2010 02:46 PM

Okay maybe I am just stupid, but I seem to be the only one having this problem:

I have an NFL forum, and I have all the NFL Team sub-forums set up perfectly through this mod. But for some reason, I can figure out how to make my other forums their normal size (using the standard large "new post" icons and showing the last post, etc.

On my forums www.NationalFootballForum.com , I want the "Site News" and "General NFL Discussion" forums to go back to looking like they did before. Any ideas? I see it working on other peoples' forums but I can't figure it out on mine.


*Edit* Nevermind I figured this out. You've just got to set the forums an extra level down and change an option in your VB ACP

Kyo-dono 01-24-2011 03:02 PM

@pedroenf
You are my personal hero!

But is there not a typo?
you wrote:
Code:

$Sorky01_SubforumOLReplace = '<ol>' . "\r\n";
but must be:
Code:

$Sorky01_SubforumOLReplace = '</ol>' . "\r\n";
With this its working for me.
Thanks for help:)

Sorky 02-17-2011 01:05 AM

Sorry I've been away for such a long time... Different PC, new role, very little spare time and no copy of vBulletin to work with seriously impacts my ability to play with this ;-)

While the comments from "pedroenf" and "bigrover" will definitely help users with collapse issues, the real reason for the problem is (I expect) that my Mod is supposed to remove both the start and end outline, however I expect that in some users cases the applied class names "subforumlist commalist" may be different and the html produced does therefore not contain <ol class="subforumlist commalist">. This means that the start of the outline is not actually removed (as I intended) and hence the removal of the end of the outline causes issues.

Depending on feedback and time, I could (a) change that section of the code to be a little more reliable even with class changes or I could (b) make it possible to disable the outline change with an option or I could (c) just remove that section (lines 540 to 552). To do (a) I'll need to see a few sites that have my mod applied that I can look at to see the variations that I'd have to deal with. Note: I took the liberty of looking at pedroenf's site and saw <ol class="commalist">, so in that case, removing the "subforumlist " from line 542 of my Mod should also solve the problem, but in the way I intended, by removing the entire outline, both start and finish.


All times are GMT. The time now is 12:13 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.01325 seconds
  • Memory Usage 1,760KB
  • 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
  • (2)bbcode_code_printable
  • (6)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