vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   [CSS] Forum Title TOP Padding, level2_post (https://vborg.vbsupport.ru/showthread.php?t=308848)

seventhaxis 02-24-2014 06:50 PM

[CSS] Forum Title TOP Padding, level2_post
 
I'm trying to fix the various and annoying alignment issues for the theme I use from the now defunct CompleteVB. One of these issues is the Forum Title alignment seen in the first image below.

https://vborg.vbsupport.ru/external/2014/02/3.jpg

I used the following in-line CSS to position the parent forums (i.e. News & Announcements, Wildstar Online) and the child forums when viewing the respective parent forum.

template: forumhome_forumbit_level1_post
Code:

style="padding-top:10px;!important"
https://vborg.vbsupport.ru/external/2014/02/4.jpg

You can clearly see within this first image that the actual child forum (i.e. Site Feedback, Guild Application), when viewing the full forum category, is not aligned properly. Applying this same code to the h2 class="forumtitle" element within the level2_post template fixes the issue!

https://vborg.vbsupport.ru/external/2014/02/5.jpg

HOWEVER, that alignment is tied to the alignment of the parent forum on FORUMHOME (see final image below). The blurred/transparent position is the original WITHOUT the code added to the level2_post template; the easily visible new location is obviously 10px lower but now misaligned for my forum home.

https://vborg.vbsupport.ru/external/2014/02/6.jpg

So my question -- is there a condition I can add to the level2_post template in order to keep from screwing up the alignment on my forum home?

The full website can be seen at www.parallaxgaming.com/forum.php -- and all help is greatly appreciated.

Seven Skins 02-24-2014 08:34 PM

You may be able to use conditional THIS_SCRIPT and put css in it. e.g.

Code:

<vb:if condition="THIS_SCRIPT == forumhome">css code here</vb:if>

seventhaxis 02-24-2014 08:49 PM

Hmm, so I would enter this?

Code:

<vb:if condition="THIS_SCRIPT == forumhome">
        <h2 class="forumtitle" style="padding-top:10px!important;"><a href="{vb:link forum, {vb:raw forum}}">{vb:raw forum.title}</a></h2>
<vb:else>
        <h2 class="forumtitle"><a href="{vb:link forum, {vb:raw forum}}">{vb:raw forum.title}</a></h2>
</vb:if>

Sorry, just confused from fumbling with it all day.

Edit: This gives me an 'Invalid Tag Nesting' error when trying to save the template.

Seven Skins 02-24-2014 11:00 PM

Try this:

Code:

<vb:if condition="THIS_SCRIPT == forumhome">
        <h2 class="forumtitle" style="padding-top:10px!important;"><a href="{vb:link forum, {vb:raw forum}}">{vb:raw forum.title}</a></h2>
<vb:else />
        <h2 class="forumtitle"><a href="{vb:link forum, {vb:raw forum}}">{vb:raw forum.title}</a></h2>
</vb:if>


seventhaxis 02-25-2014 12:06 AM

Ah yeah forgot to close it up that's why. Still a no go but thanks SS. Any other ideas perhaps?

BirdOPrey5 02-25-2014 02:28 PM

THIS_SCRIPT is correct but there is no value "forumhome"

The THIS_SCRIPT value for the forum homepage (forum.php) is index because it used to be index.php on vBulletin 3.x.

SO the condition would be something like

Code:

<vb:if condition="THIS_SCRIPT == 'index'">
        <h2 class="forumtitle" style="padding-top:10px!important;"><a href="{vb:link forum, {vb:raw forum}}">{vb:raw forum.title}</a></h2>
<vb:else />
        <h2 class="forumtitle"><a href="{vb:link forum, {vb:raw forum}}">{vb:raw forum.title}</a></h2>
</vb:if>

Note- 'index' also needs to be inside single quotes, as any string used in any conditional in a template needs to be inside single quotes.

seventhaxis 02-25-2014 03:25 PM

Worked perfectly. Thank you both Seven and Joe. I really appreciate the help!


All times are GMT. The time now is 06:01 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.01441 seconds
  • Memory Usage 1,729KB
  • 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
  • (5)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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