Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-24-2014, 06:50 PM
seventhaxis seventhaxis is offline
 
Join Date: Feb 2013
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default [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.



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"


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!



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.



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.
Reply With Quote
  #2  
Old 02-24-2014, 08:34 PM
Seven Skins's Avatar
Seven Skins Seven Skins is offline
 
Join Date: Sep 2008
Location: London, UK
Posts: 1,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #3  
Old 02-24-2014, 08:49 PM
seventhaxis seventhaxis is offline
 
Join Date: Feb 2013
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 02-24-2014, 11:00 PM
Seven Skins's Avatar
Seven Skins Seven Skins is offline
 
Join Date: Sep 2008
Location: London, UK
Posts: 1,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
Благодарность от:
seventhaxis
  #5  
Old 02-25-2014, 12:06 AM
seventhaxis seventhaxis is offline
 
Join Date: Feb 2013
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah yeah forgot to close it up that's why. Still a no go but thanks SS. Any other ideas perhaps?
Reply With Quote
  #6  
Old 02-25-2014, 02:28 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
2 благодарности(ей) от:
RSNF, seventhaxis
  #7  
Old 02-25-2014, 03:25 PM
seventhaxis seventhaxis is offline
 
Join Date: Feb 2013
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Worked perfectly. Thank you both Seven and Joe. I really appreciate the help!
Reply With Quote
Благодарность от:
BirdOPrey5
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:12 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03945 seconds
  • Memory Usage 2,230KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (4)post_thanks_box_bit
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete