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)
-   -   Add Block above Forum Sidebar (https://vborg.vbsupport.ru/showthread.php?t=295435)

David Karol 02-24-2013 09:56 PM

Add Block above Forum Sidebar
 
Is it possible to add a block above the forum sidebar?

With this, I'd like to shift the sidebar down, to leave room for a 300x250 advertisement placement on top of it. I'd like to keep it outside the actual sidebar, to keep the lost real estate at a minimum.

Thanks,
David

David Karol 03-07-2013 04:24 PM

1 Attachment(s)
Here's a screenshot to show what's going on here. I'd like the advertisement to appear above the sidebar block, on a white background. The sidebar block should appear below the advertisement.
https://vborg.vbsupport.ru/attachmen...1&d=1362677038

Thanks,
David

snakes1100 03-07-2013 04:42 PM

Just add a block in the forum block manager & place your ad code in it, then use the display order to make it #1

David Karol 03-07-2013 04:52 PM

Quote:

Originally Posted by snakes1100 (Post 2408572)
Just add a block in the forum block manager & place your ad code in it, then use the display order to make it #1

That's how I'm displaying the ad as showed in the screenshot. It still comes up inside this sidebar 'container'. Is there a way around that?

snakes1100 03-07-2013 05:13 PM

No, without custom coding.

add new template, give it a name like block_custom_sidebar_ad

block templates > block_custom_sidebar_ad

you'd have to then create the block as html & wrap the code to use the custom template above.

David Karol 03-07-2013 08:12 PM

Quote:

Originally Posted by snakes1100 (Post 2408584)
No, without custom coding.

add new template, give it a name like block_custom_sidebar_ad

block templates > block_custom_sidebar_ad

you'd have to then create the block as html & wrap the code to use the custom template above.

The current block is HTML, and it's template consists of nothing but,
Code:

{vb:raw content}
Without {vb:raw content} in there, nothing will display. I'm not sure I understand- is there something additional that needs to go in the template? Or in the block's code? What needs to go there?

Thanks.

David Karol 03-09-2013 02:26 AM

I got it. Instead of using the blocks manager, I inserted the ad tag directly into the FORUMDISPLAY and FORUMHOME templates, between the following lines:

Code:

<div id="sidebar_container"<vb:if condition="$show['sidebarposition'] == 'left'"> class="sidebarleft"</vb:if>>
       
                ***AD TAGS GO HERE***
                <br>
       
<a id="sidebar_button_link" href="#">

Note that I needed an extra line break at the end on the FORUMDISPLAY template only. Without it, the other sidebar blocks would show without any gap. This was not the case on the FORUMHOME template, where the line break seems to occur on its own.

Here's a screenshot of the result:
https://vborg.vbsupport.ru/attachmen...1&d=1362799687


All times are GMT. The time now is 03:55 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.01140 seconds
  • Memory Usage 1,726KB
  • 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
  • (2)bbcode_quote_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