PDA

View Full Version : Exclude breadcrumbs from specific forums?


davio33
07-11-2011, 03:24 AM
anyone know how I can exclude breadcrumbs from certain forums?

Thanks

--------------- Added 1310359873 at 1310359873 ---------------

IUpdate I figured out how to the do it to the cms, so i guess by question would be what do i replace index with? can I have index,forum home, forum id?

<vb:if condition="in_array(THIS_SCRIPT, array(index))">

ForumExcellence
07-11-2011, 12:41 PM
To do this, go into your navbar template and find:

<div id="breadcrumb" class="breadcrumb">

This is the beginning of the entire breadcrumb. If you don't want to hide the entire breadcrumb element, but only a part of it (eg. if you've put other things in the div), then edit the placement of these codes appropriately.

Before that, add:

<vb:if condition="!in_array($GLOBALS[forumid], array(4,5))">

Replace the emphasized numbers with the Forum ID of the forums you'd like the breadcrumb hidden in, putting a comma in between each number. You can find the Forum ID either as the number alongside the forum name in the URL when you are browsing that forum, or in case you have custom URL rewrite rules that remove the ID, you can find it by going to Admin CP > Forum s & Moderators > Forum Manage > Click the name of the forum (or click Go beside "Edit Forum" selected from the dropdown box next to the forum name) > At the top of the page you will see: Forum: YourForumname (id: #). It will also be at the end of the URL when you hover over the forum name: http://yoursite.com/admincp/forum.php?do=edit&f=#

Additionally, if you would also like to remove it from specific areas of the site, use this instead:

<vb:if condition="!in_array($GLOBALS[forumid], array(4,5)) AND !in_array(THIS_SCRIPT, array('blog','vbcms'))">

Again, replacing the emphasized values with those which suit your needs. Keep in mind the numbers require no single quotes, but the THIS_SCRIPT values do.

If you are having trouble finding what value to put in the THIS_SCRIPT, go to your "footer" template, find:

<div id="footer_morecopyright" class="shade footer_morecopyright">


And after that, add:

<vb:if condition="is_member_of($bbuserinfo, 6)">
<vb:if condition="$this_script = THIS_SCRIPT"><br /><b>{vb:raw this_script}</b><br /></vb:if></vb:if>

This will show, at the bottom of every page, what the THIS_SCRIPT value is. It will only show it to members of the default Administrator usergroup. If your usergroup is not the default Administrator usergroup, you can either change the emphasized number to the number of your usergroup. Please note that this will display the THIS_SCRIPT value to all members of that usergroup. To display it only for yourself, use this instead:

<vb:if condition="$bbuserinfo['userid'] == 1"><vb:if condition="$this_script = THIS_SCRIPT"><br /><b>{vb:raw this_script}</b><br /></vb:if></vb:if>

And change the emphasized number to your User ID. You can find this either as the number alongside your username in the URL of your profile, or in case you have custom URL rewriting rules in place that remove the number, you can find it by going to Admin CP > Users > Search Users > Search for YourUsername > At the top of the page, it will say: User: YourUsername (id: #)

Then find (very close to the above code)

{vb:raw navbits.breadcrumb}
{vb:raw navbits.lastelement}
</ul>
<hr />
</div>

And after that, add:

</vb:if>

davio33
07-12-2011, 07:17 PM
Thank you so much :)