vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Detecting Uppermost Forum (https://vborg.vbsupport.ru/showthread.php?t=293911)

Digital Jedi 01-14-2013 04:03 AM

Detecting Uppermost Forum
 
"Hey look! It's that guy! Whatisname...?"

Just stopped by to ask a question about this old version of vB. Was there ever a way to detect the uppermost forum on a given forum page? I may have asked this years ago, but I don't think anyone knew of a way then. What I'd like to do is use a conditional to place a block of code in forumhome, but only above the top forum on a page. Not every forum on the page. Similar to the way <if condition="$post['isfirstshown']"works with the first post on a page. I tried some variations, but none seemed to work without actually putting in the forum IDs, and I'd like to streamline that as much as I can.

kh99 01-14-2013 12:38 PM

I probably don't understand what you're asking, but couldn't you edit the FORUMHOME template and put your code above $forumbits?

Digital Jedi 01-14-2013 09:29 PM

Probably misleading that I said forumhome. Specifically, I meant forumhome_forumbit_level1_nopost. It's repeatedly used on forumhome.php. I've edited the template, but because of the way the template pieces itself together, the code for the very first forum listed on that page is invalid. Open tags. Currently I'm using an if condition that closes the tags out based on the IDs of every category that will be the top one. But I also have to include the IDs of categories that will be the top forum when viewing a subforum. So forum management can become kind of a pain at times, having to edit the templates each time it's needed. I was wondering if vB had a little known if condition or something that knew when a category or forum at the top of a page was the first one.


All times are GMT. The time now is 04:57 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.01422 seconds
  • Memory Usage 1,708KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete