PDA

View Full Version : Does anyone know whow to add this under the navbar?


joeycannoli
12-10-2009, 06:11 PM
Hey all,



I want to add a section under the navbar that describes the forum that is being viewed... For Example...


https://vborg.vbsupport.ru/external/2009/12/144.jpg


If you click on the B6/B7 S4 forum you will be taken to this...


https://vborg.vbsupport.ru/external/2009/12/145.jpg






I would like to add the section below the navbar as pictured above. I would like to to state what section it is and give a description. I would also like to add a section specific banner for the paid advertisers as shown. I would like this for EVERY section on my forum.



Any ideas on how to do this? Much appreciated



joey

Lynne
12-10-2009, 07:34 PM
You can add the description by just turning on the option - vboptions > forum display > show forum description

If you want to add the banners, modify the template for it. To find the template to modify, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code.

joeycannoli
12-11-2009, 11:19 AM
You can add the description by just turning on the option - vboptions > forum display > show forum description

If you want to add the banners, modify the template for it. To find the template to modify, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code.

Thank you Lynne! Very much appreaciated.

So I right clicked the forum description and opened the source code. It opened forum display template with a lot of code within it. I found where the description is displayed but im not sure what template it is in. It seems it is before nav pop-up button but after navbar link... any idea what template it is in?

<!-- END TEMPLATE: navbar_link --></strong></td>
</tr>
</table>

</td>



<td class="alt2" valign="top" nowrap="nowrap">
<div class="smallfont">
<strong>Welcome, Admin.</strong><br />
You last visited: Today at <span class="time">08:19 AM</span>
<br /><a href="private.php">Private Messages</a>: Unread 0, Total 5.

</div>
</td>



</tr>
</table>
<!-- / breadcrumb, login, pm info -->


<br />

<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<tr>
<td class="alt1" width="100%"><strong>B6/B7 Platform</strong> <span class="smallfont">Discussion and Information for the B6/B7 S4 and RS4 (2003-2008).</span></td>
</tr>
</table>
<br />



<!-- NAVBAR POPUP MENUS -->


<!-- header quick search form -->
<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">Search Forums</td>
</tr>
<tr>

Lynne
12-11-2009, 01:47 PM
If you can't find the template name above the area, then it could be because it is the main template for the whole page. However, in this case it looks like you just needed to look up the page source a few more lines and you would have seen the Start of the Navbar template which is the template it's in. Another way to find the template is a Search in Templates for comments. Like try a Search in Templates for "NAVBAR POPUP MENUS" which is right below your area of interest. You'd then find this in the template right above that comment and this is the area you'll want to modify:
<if condition="$show['forumdesc']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1" width="100%"><strong>$foruminfo[title]</strong> <span class="smallfont">$foruminfo[description]</span></td>
</tr>
</table>
<br />
</if>

joeycannoli
12-11-2009, 02:28 PM
You dont know how much i appreciate your help. So i have to create a seperate if statement for the section below if i want to include a certain banner?

Im guessing there needs to be an if statement for every different forum description if i want the banner to be different?

For this particular section i want this code to show the banner referenced.

<td class="alt1"><div align="center"><a href="http://jhmotorsports.com/shop" target="_blank"><img src="http://www.audizine.com/images/banners/jhm_v8_234.gif" alt="JHMotorsports" border="0"></a></div></td>

If you can't find the template name above the area, then it could be because it is the main template for the whole page. However, in this case it looks like you just needed to look up the page source a few more lines and you would have seen the Start of the Navbar template which is the template it's in. Another way to find the template is a Search in Templates for comments. Like try a Search in Templates for "NAVBAR POPUP MENUS" which is right below your area of interest. You'd then find this in the template right above that comment and this is the area you'll want to modify:
<if condition="$show['forumdesc']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1" width="100%"><strong>$foruminfo[title]</strong> <span class="smallfont">$foruminfo[description]</span></td>
</tr>
</table>
<br />
</if>

Lynne
12-11-2009, 02:43 PM
What I would do is write a plugin and in that plugin define the banner to be shown. I'd spit it out in a $variable and use that variable in the template.

Have you looked at any of the banner modifications here? You may find one that is similar to what you want and then you can just modify it to your needs.

joeycannoli
12-11-2009, 04:00 PM
I have the cyb banner mod for the top of the forum display. This is a little different though because i only want the banner of the vendor sponsoring that particular forum to show up in the forum description. Im not very good at html so im pretty much stuck at the moment.

Lynne
12-11-2009, 04:16 PM
You'd probably write a plugin something like this:
switch ($forumid){
case "1":
$forumbanner = '<a href="http://wherever.com/shop" target="_blank"><img src="http://www.audizine.com/images/banners/banner1.gif" alt="JHMotorsports" border="0"></a>';
break;
case "2":
$forumbanner = '<a href="http://wherever2.com/shop" target="_blank"><img src="http://www.audizine.com/images/banners/banner2.gif" alt="JHMotorsports" border="0"></a>';
break;
case "3":
$forumbanner = '<a href="http://wherever3.com/shop" target="_blank"><img src="http://www.audizine.com/images/banners/banner3.gif" alt="JHMotorsports" border="0"></a>';
break;
default:
$forumbanner = '<img src="clear.gif" alt="nothing" border="0">';
return;
}

And then in your template, something like this:
<if condition="$show['forumdesc']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1" width="100%"><strong>$foruminfo[title]</strong> <span class="smallfont">$foruminfo[description]</span></td>
<td class="alt1"><div align="center">$forumbanner</div></td>
</tr>
</table>
<br />
</if>

joeycannoli
12-11-2009, 04:31 PM
Thank you so much for your help... Im going to give this a shot and see if it works. Hopefully i dont cause any damage. Quick question, where should the "plugin" be placed?

Thank you Lynne!

You'd probably write a plugin something like this:
switch ($forumid){
case "1":
$forumbanner = '<a href="http://wherever.com/shop" target="_blank"><img src="http://www.audizine.com/images/banners/banner1.gif" alt="JHMotorsports" border="0"></a>';
break;
case "2":
$forumbanner = '<a href="http://wherever2.com/shop" target="_blank"><img src="http://www.audizine.com/images/banners/banner2.gif" alt="JHMotorsports" border="0"></a>';
break;
case "3":
$forumbanner = '<a href="http://wherever3.com/shop" target="_blank"><img src="http://www.audizine.com/images/banners/banner3.gif" alt="JHMotorsports" border="0"></a>';
break;
default:
$forumbanner = '<img src="clear.gif" alt="nothing" border="0">';
return;
}

And then in your template, something like this:
<if condition="$show['forumdesc']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1" width="100%"><strong>$foruminfo[title]</strong> <span class="smallfont">$foruminfo[description]</span></td>
<td class="alt1"><div align="center">$forumbanner</div></td>
</tr>
</table>
<br />
</if>

Lynne
12-11-2009, 07:39 PM
Thank you so much for your help... Im going to give this a shot and see if it works. Hopefully i dont cause any damage. Quick question, where should the "plugin" be placed?
Uh, I don't know - this is going on the forumdisplay.php page? So, if I'm in debug mode, I can see all the hooks called on the bottom of the page and I guess I would try forumdisplay_start