[HOW TO - vB4] Sidebar in your own mod
Do you like the sidebar ? Here I will explain how to insert it into your own mod.
1.) make sure that you have loaded forumhome.css. This is nessesary for the blocks. 2.) prepare your template(s) (modify your product). You have to do this for all "main" templates you'd like to insert the sidebar! search for: Code:
</head> Code:
<vb:if condition="$show['sidebar']"> Code:
{vb:raw header} Code:
<vb:if condition="$show['sidebar']"> Code:
{vb:raw footer} Code:
<vb:if condition="$show['sidebar']"> Below it you can insert the following script: Code:
// sidebar If you like to change that, simply change the following line: Code:
if ($vbulletin->options['enablesidebar'] AND !(is_browser('ie') AND !is_browser('ie', 7))) Code:
if ($sidebar_in_my_mod AND $vbulletin->options['enablesidebar'] AND !(is_browser('ie') AND !is_browser('ie', 7))) Now the last step. Somewhere you have to register your "main" template, simply insert Code:
$templater->register('sidebar', $sidebar); Remember: This will show all availiable blocks. You can use this mod to set the block on page .... https://vborg.vbsupport.ru/showthread.php?t=235219 I hope this article is helpfull. Coroner |
thank you
nice ! |
|
This isn't working for me... at all. I get the small arrow tab, but it shows on the bottom of my page... instead of on the right... and if I click the arrow, nothing shows up. Below is my page... I cut and pasted the contents directly into it for testing purposes...
Code:
{vb:stylevar htmldoctype} Code:
require_once('./global.php'); Okay... I got it working... but it doesn't align correctly... http://test.8wayrun.com/media.php? |
What do you mean with: "align correctely" ? I see your bar on the right.
|
The TOP of the sidebar is not lined up with the TOP of my main content...
|
Quote:
You can wrap the entire DIV for the sidebar with a simple: <div style="margin: -4px 0px 0px 0px;"> All that code up above here blah blah </div> to test then modify the original css to suit and remove the div style wrapper. |
Thanks, I don't know why I didn't think of that. I've been programming nonstop for a week... so your brain starts to short out after a while.
Any word on how to add this kind of sidebar functionality to my own sidebar? Not the VB Sidebar? |
Quote:
How did you manage to get it working? I'm having the same issue. :confused: |
it want work on activity.php :S
|
All times are GMT. The time now is 02:41 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|