The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Add text to breadcrumb line
I would like to add the text "You are at: " at the beginning of the breadcrumb line. I am a newbie to vBulletin and PHP and learning as I go.
I determined the template to modify is the navbar.php template. I find the breadcrumb section but don't know how to format the code properly to have it display as one common line. I tried various lines and can get the words to display, but not in line with the current location. I've tried {vb: phrase and {vb:rawphrase but can't come up with something that works. This is the line of code from the template: Code:
<div id="breadcrumb" class="breadcrumb"> <div class="main_wrap"> <ul class="floatcontainer"> {vb:raw navbits.breadcrumb} {vb:raw navbits.lastelement} </ul> </div> </div> You are at: Forum/Category1/Threadname Thanks Paul |
#2
|
|||
|
|||
The simple way:
At navbar: Find: Code:
<div class="body_wrapper"> <div id="breadcrumb" class="breadcrumb"<vb:if condition="THIS_SCRIPT == 'index'"> style="display:none;"</vb:if>> <ul class="floatcontainer"> <li class="navbithome">You are at: <a href="index.php{vb:raw session.sessionurl_q}" accesskey="1"><img src="{vb:stylevar imgdir_misc}/navbit-home.png" alt="{vb:rawphrase home}" /></a></li> {vb:raw navbits.breadcrumb} {vb:raw navbits.lastelement} </ul> Code:
<!-- closing div for above_body --> Code:
<li class="navbithome">You are at: <a href="index.php{vb:raw session.sessionurl_q}" accesskey="1"><img src="{vb:stylevar imgdir_misc}/navbit-home.png" alt="{vb:rawphrase home}" /></a></li> Code:
<img src="{vb:stylevar imgdir_misc}/navbit-home.png" alt="{vb:rawphrase home}" /> Now, if you want something more "official".. Go to: AdminCP -> Languages & Phrases -> Phrase Manager -> Add new Phrase Leave the type and product as it is, and as for the "Varname", use something that is related to what you want. For example, for the sake of it lets use "you_are_at" (with the _) and in the Text box, type in You are at:. So, you'll be having this: Phrase Type: GLOBAL Product: vBulletin Varname: you_are_at Text: You are at: You can ignore the translation box if you don't use any translation files other than English. Now, go back to the navbar template and replace: Code:
<li class="navbithome">You are at: <a href="index.php{vb:raw session.sessionurl_q}" accesskey="1"><img src="{vb:stylevar imgdir_misc}/navbit-home.png" alt="{vb:rawphrase home}" /></a></li> Code:
<li class="navbithome">{vb:rawphrase you_are_at} <a href="index.php{vb:raw session.sessionurl_q}" accesskey="1"><img src="{vb:stylevar imgdir_misc}/navbit-home.png" alt="{vb:rawphrase home}" /></a></li> |
3 благодарности(ей) от: | ||
Lynne, MarkFL, TheLastSuperman |
#3
|
||||
|
||||
An alternate that won't require you to edit any templates, and will work in all of your styles would be to create the following plugin:
Product: vBulletin Hook Location: parse_templates Title: Add Text Before Breadcrumb Execution Order: 5 PHP Plugin Code: PHP Code:
Click "Save". |
3 благодарности(ей) от: | ||
Lynne, Skyrider, TheLastSuperman |
#4
|
|||
|
|||
Thanks, everyone - worked perfectly.
|
2 благодарности(ей) от: | ||
MarkFL, TheLastSuperman |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|