Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-10-2009, 06:11 PM
joeycannoli joeycannoli is offline
 
Join Date: Nov 2009
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Does anyone know whow to add this under the navbar?

Hey all,



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





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









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
Reply With Quote
  #2  
Old 12-10-2009, 07:34 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 12-11-2009, 11:19 AM
joeycannoli joeycannoli is offline
 
Join Date: Nov 2009
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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>
Reply With Quote
  #4  
Old 12-11-2009, 01:47 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
HTML Code:
<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>
Reply With Quote
  #5  
Old 12-11-2009, 02:28 PM
joeycannoli joeycannoli is offline
 
Join Date: Nov 2009
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>

Quote:
Originally Posted by Lynne View Post
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:
HTML Code:
<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>
Reply With Quote
  #6  
Old 12-11-2009, 02:43 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 12-11-2009, 04:00 PM
joeycannoli joeycannoli is offline
 
Join Date: Nov 2009
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 12-11-2009, 04:16 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You'd probably write a plugin something like this:
PHP Code:
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:
HTML Code:
<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>
Reply With Quote
  #9  
Old 12-11-2009, 04:31 PM
joeycannoli joeycannoli is offline
 
Join Date: Nov 2009
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!

Quote:
Originally Posted by Lynne View Post
You'd probably write a plugin something like this:
PHP Code:
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:
HTML Code:
<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>
Reply With Quote
  #10  
Old 12-11-2009, 07:39 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by joeycuccaro View Post
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
Reply With Quote
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 01:08 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.05173 seconds
  • Memory Usage 2,283KB
  • Queries Executed 11 (?)
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
  • (4)bbcode_html
  • (2)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete