vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW TO - vB4] Remove the vB Default Navtabs (https://vborg.vbsupport.ru/showthread.php?t=234220)

Tariq Waheed 10-15-2010 01:52 AM

How CAN I ADD A Twitter button to my Site on my nav bar?

Lynne 10-15-2010 04:19 AM

Quote:

Originally Posted by Tariq Waheed (Post 2110270)
How CAN I ADD A Twitter button to my Site on my nav bar?

I have no idea and this really isn't the thread to post that question in.

XiTCLUB 10-21-2010 05:35 PM

Done ! Thanks

OurCouponHome 10-21-2010 09:57 PM

Thanks!!

paulnicholson 10-25-2010 03:56 PM

How can I remove 'Forum' tab?

The code for removing 'What's New?'tab seems irrelevant in 4.0.8. Do you have the new code to remove?

--------------- Added [DATE]1288026413[/DATE] at [TIME]1288026413[/TIME] ---------------

I think this is the code for vb 4.0.8:

Code:

<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT == 'search'">
                        <vb:if condition="$show['member']">
                        <li  class="selected"><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_Post" accesskey="2">{vb:rawphrase getnew_tab}</a>
                                <ul class="floatcontainer">
                                        <li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_Post">{vb:rawphrase new_posts_nav}</a></li>
                                        <li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_SocialGroupMessage">{vb:rawphrase new_group_messages_nav}</a></li>
                                        <li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_Event">{vb:rawphrase new_events_nav}</a></li>
                                        {vb:raw template_hook.navbar_getnew_menu}
                                        <li><a href="forumdisplay.php?{vb:raw session.sessionurl}do=markread&amp;markreadhash={vb:raw bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a></li>
                                </ul>
                        </li>
                        <vb:else />
                        <li  class="selected"><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_Post" accesskey="2">{vb:rawphrase getnew_tab}</a>
                                <ul class="floatcontainer">
                                        <li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_Post">{vb:rawphrase todays_posts}</a></li>
                                        <li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_SocialGroupMessage">{vb:rawphrase daily_group_message}</a></li>
                                        <li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_Event">{vb:rawphrase daily_events}</a></li>
                                        {vb:raw template_hook.navbar_getdaily_menu}
                                        <li><a href="forumdisplay.php?{vb:raw session.sessionurl}do=markread&amp;markreadhash={vb:raw bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a></li>
                                </ul>
                        </li>
                        </vb:if>
                <vb:elseif condition="$show['member']" />
                        <li><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_Post" accesskey="2">{vb:rawphrase getnew_tab}</a></li>
                <vb:else />
                        <li><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_Post" accesskey="2">{vb:rawphrase getnew_tab}</a></li>
                </vb:if>


theque 12-02-2010 09:02 PM

Thank you! removed whats new in my forum

kfyonur 12-23-2010 01:10 PM

Thank you.

mclarens 12-24-2010 07:30 PM

ok have abit of trouble getting this to work properly.

I get to manage to remove the whats new tab. but then the line under disapear compleetly.ยจ
And i want the home button to stay + the line under the navbar

Anyone who can post theyr text to make this correct or point me to the right direction where i failed?

your24hourstore 12-25-2010 12:58 PM

I want to get rid of the navtab to forum, i don't want to disable forum, just remove the navbar forum tab, i did it by breaking the script but it leaves a blank tab , I then redirected that blank tab to CMS . it does what i need but is their a cleaner way to do it?,

I still want to use forums to post the stuff that will show up in promoted articles and Cms widgets, but no user access to forums, only admin can post, I dont care if they find the forum through the web or even if they goto forum.php, they can have read access but cant post anyway

--------------- Added [DATE]1293289429[/DATE] at [TIME]1293289429[/TIME] ---------------

Quote:

Originally Posted by mclarens (Post 2138729)
ok have abit of trouble getting this to work properly.

I get to manage to remove the whats new tab. but then the line under disapear compleetly.?
And i want the home button to stay + the line under the navbar

Anyone who can post theyr text to make this correct or point me to the right direction where i failed?

go in and replace your template with a default version then use this mod https://vborg.vbsupport.ru/showthread.php?t=238187

kfyonur 01-01-2011 09:51 PM

my cms is not active how can i remove the home for vb4.1

Lynne 01-01-2011 10:59 PM

Quote:

Originally Posted by kfyonur (Post 2142483)
my cms is not active how can i remove the home for vb4.1

If you have disabled your CMS, then the Home tab is not from the cms but from a modification. You will have to figure out which one and then remove it.

asuccar 01-23-2011 12:01 AM

Hey dude,

I followed the instructions to remove 'what's new' to the nth detail but when i try to save it i get an error:

Quote:

The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected '.' in /home/afourso1/public_html/includes/adminfunctions_template.php(5170) : eval()'d code on line 169

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
What is this?

Lynne 01-23-2011 12:44 AM

I just tried the instructions on my 4.1.1 board and didn't get any errors.

asuccar 01-23-2011 07:27 PM

I'm on 4.1.1 but I still get the error nonetheless...what can i do? I'm following ur instructions to the letter!

What could it possibly be?

Lynne 01-23-2011 09:10 PM

Quote:

Originally Posted by asuccar (Post 2153470)
I'm on 4.1.1 but I still get the error nonetheless...what can i do? I'm following ur instructions to the letter!

What could it possibly be?

Is this a totally default template you are editing? You should end up with something like this in there:
HTML Code:

        {vb:raw template_hook.navtab_middle}

        {vb:raw template_hook.navtab_end}

Is that what the template looks like right around where the What's New code was taken out?

asuccar 01-25-2011 01:17 AM

I completely revert the navbar template, and after you instructions this is the code i end up with:

Quote:

<div id="navbar" class="navbar">

<ul id="navtabs" class="navtabs floatcontainer<vb:if condition="$show['member'] AND $notifications_total"> notify</vb:if>">
{vb:raw template_hook.navtab_start}
<vb:if condition="!$vboptions['selectednavtab']">
<li class="selected"><a class="navtab" href="{vb:link forumhome}">{vb:rawphrase forum}</a>
<ul class="floatcontainer">
{vb:raw template_hook.navbar_start}
<vb:if condition="$show['searchbuttons']">
<vb:if condition="$show['member']">
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBFor um_Post">{vb:rawphrase new_posts_nav}</a></li>
<vb:else />
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBF orum_Post">{vb:rawphrase todays_posts}</a></li>
</vb:if>
</vb:if>
{vb:raw template_hook.navbar_after_getnew}
<vb:if condition="$show['pmmainlink']">
<li><a href="private.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase private_messages}</a></li>
</vb:if>
{vb:raw template_hook.navbar_after_pm}
<li><a rel="help" href="faq.php{vb:raw session.sessionurl_q}" accesskey="5">{vb:rawphrase faq}</a></li>
{vb:raw template_hook.navbar_after_faq}
<li><a href="calendar.php{vb:raw session.sessionurl_q}">{vb:rawphrase calendar}</a></li>
{vb:raw template_hook.navbar_after_calendar}

<vb:if condition="$show['communitylink']">
<li class="popupmenu">
<a href="javascript://" class="popupctrl" accesskey="6">{vb:rawphrase community}</a>
<ul class="popupbody popuphover">
{vb:raw template_hook.navbar_community_menu_start}
<vb:if condition="$show['quick_links_groups']">
<li><a href="{vb:link grouphome}">{vb:rawphrase social_groups}</a></li>
</vb:if>
<vb:if condition="$show['quick_links_albums']">
<li><a href="album.php{vb:raw session.sessionurl_q}">{vb:rawphrase pictures_and_albums}</a></li>
</vb:if>
<vb:if condition="$bbuserinfo['userid']">
<li><a href="profile.php?{vb:raw session.sessionurl}do=buddylist"><vb:if condition="$show['friends_and_contacts']">{vb:rawphrase contacts_and_friends}<vb:else />{vb:rawphrase contacts}</vb:if></a></li>
</vb:if>
<vb:if condition="$show['memberslist']">
<li><a href="memberlist.php{vb:raw session.sessionurl_q}">{vb:rawphrase members_list}</a></li>
</vb:if>
{vb:raw template_hook.navbar_community_menu_end}
</ul>
</li>
</vb:if>
{vb:raw template_hook.navbar_after_community}
<li class="popupmenu">
<a href="javascript://" class="popupctrl">{vb:rawphrase forum_actions}</a>
<ul class="popupbody popuphover">
<li>
<a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}forumdisplay.php?{vb:raw session.sessionurl}do=markread&amp;markreadhash={v b:raw bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a>
</li>
<vb:if condition="$show['member']">
<li>
<a href="profile.php?{vb:raw session.sessionurl}do=editoptions">{vb:rawphrase edit_options}</a>
</li>
<li>
<a href="profile.php?{vb:raw session.sessionurl}do=editprofile">{vb:rawphrase edit_your_details}</a>
</li>
</vb:if>
</ul>
</li>
<li class="popupmenu">
<a href="javascript://" class="popupctrl" accesskey="3">{vb:rawphrase quick_links}</a>
<ul class="popupbody popuphover">
<vb:if condition="$show['member']">
<li><a href="{vb:link subscription}" rel="nofollow">{vb:rawphrase subscribed_threads}</a></li>
<li><a href="javascript://" onclick="window.open(getBaseUrl() + 'misc.php?{vb:raw session.sessionurl}do=buddylist&amp;focus=1','budd ylist','statusbar=no,menubar=no,toolbar=no,scrollb ars=yes,resizable=yes,width=250,height=300'); return false;">{vb:rawphrase open_contacts}</a></li>
</vb:if>
<vb:if condition="$vboptions['forumleaders']">
<li><a href="showgroups.php{vb:raw session.sessionurl_q}" rel="nofollow">
<vb:if condition="$vb_suite_installed">
{vb:rawphrase view_site_leaders}
<vb:else />
{vb:rawphrase view_forum_leaders}
</vb:if>
</a></li>
</vb:if>
{vb:raw template_hook.navbar_quick_links_menu_pos1}
{vb:raw template_hook.navbar_quick_links_menu_pos2}
{vb:raw template_hook.navbar_quick_links_menu_pos3}
<vb:if condition="$show['wollink']">
<li><a href="online.php{vb:raw session.sessionurl_q}">{vb:rawphrase whos_online}</a></li>
</vb:if>
{vb:raw template_hook.navbar_quick_links_menu_pos4}
</ul>
</li>
{vb:raw template_hook.navbar_end}
</ul>

</li>
<vb:else />
<li><a class="navtab" href="{vb:link forumhome}">{vb:rawphrase forum}</a></li>
</vb:if>
{vb:raw template_hook.navtab_middle}
<ul class="floatcontainer">
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBFor um_Post">{vb:rawphrase new_posts_nav}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBFor um_SocialGroupMessage">{vb:rawphrase new_group_messages_nav}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBFor um_Event">{vb:rawphrase new_events_nav}</a></li>
{vb:raw template_hook.navbar_getnew_menu}
<li><a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}forumdisplay.php?{vb:raw session.sessionurl}do=markread&amp;markreadhash={v b:raw bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a></li>
</ul>
</li>
<vb:else />
<li class="selected"><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBF orum_Post" accesskey="2">{vb:rawphrase getnew_tab}</a>
<ul class="floatcontainer">
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBF orum_Post">{vb:rawphrase todays_posts}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBF orum_SocialGroupMessage">{vb:rawphrase daily_group_message}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBF orum_Event">{vb:rawphrase daily_events}</a></li>
{vb:raw template_hook.navbar_getdaily_menu}
<li><a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}forumdisplay.php?{vb:raw session.sessionurl}do=markread&amp;markreadhash={v b:raw bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a></li>
</ul>

{vb:raw template_hook.navtab_end}
</ul>

<vb:if condition="$vboptions['enablesearches']">
<div id="globalsearch" class="globalsearch">
<form action="search.php?{vb:raw session.sessionurl}do=process" method="post" id="navbar_search" class="navbar_search">
<vb:comment><input type="hidden" name="s" value="{vb:raw session.sessionurl}" /></vb:comment>
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="do" value="process" />
<span class="textboxcontainer"><span><input type="text" value="" name="query" class="textbox" tabindex="99"/></span></span>
<span class="buttoncontainer"><span><input type="image" class="searchbutton" src="{vb:stylevar imgdir_button}/search.<vb:if condition="(is_browser('ie') AND !is_browser('ie', 7) AND !is_browser('ie', 8))">gif<vb:else />png</vb:if>" name="submit" onclick="document.getElementById('navbar_search'). submit;" tabindex="100"/></span></span>
</form>
<ul class="navbar_advanced_search">
<li><a href="search.php{vb:raw session.sessionurl_q}" accesskey="4">{vb:rawphrase advanced_search}</a></li>
</ul>
</div>
</vb:if>
</div>
</div><!-- closing div for above_body -->

<div class="body_wrapper">
<div id="breadcrumb" class="breadcrumb">
<ul class="floatcontainer">
<li class="navbithome"><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>
<hr />
</div>

{vb:raw ad_location.ad_navbar_below}
{vb:raw ad_location.global_below_navbar}

<vb:if condition="$show['notices'] AND THIS_SCRIPT != 'register'">
<form action="profile.php?do=dismissnotice" method="post" id="notices" class="notices">
<input type="hidden" name="do" value="dismissnotice" />
<input type="hidden" name="s" value="{vb:raw session.sessionurl}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" id="dismiss_notice_hidden" name="dismiss_noticeid" value="" />
<input type="hidden" name="url" value="{vb:raw return_link}" />
<ol>
{vb:raw notices}
</ol>
</form>
</vb:if>

Lynne 01-25-2011 03:29 AM

Quote:

Originally Posted by asuccar (Post 2154153)
I completely revert the navbar template, and after you instructions this is the code i end up with:

You need to delete everying between these areas:
HTML Code:

        <vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT == 'search'">
            <vb:if condition="$show['member']">
            <li  class="selected"><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_Post">{vb:rawphrase getnew_tab}</a>
...
a bunch more stuff
...
            </li>
            </vb:if>
        <vb:elseif condition="$show['member']" />
            <li><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_Post">{vb:rawphrase getnew_tab}</a></li>
        <vb:else />
            <li><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_Post">{vb:rawphrase getnew_tab}</a></li>
        </vb:if>

The "a bunch more stuff" means all the code inbetween those areas.

asuccar 01-25-2011 08:12 PM

Mea culpa:)

It worked perfectly...cheers!

andrew_m 03-02-2011 10:41 PM

I read the article suggested above but it did not describe how to remove the forum tab, I would actually like to remove the Forum tab (i have already remove the other tabs) and the background it is on. Any help would be appreciated.

i have vB 4.1.2

thanks

Lynne 03-03-2011 05:14 PM

Quote:

Originally Posted by andrew_m (Post 2168909)
I read the article suggested above but it did not describe how to remove the forum tab, I would actually like to remove the Forum tab (i have already remove the other tabs) and the background it is on. Any help would be appreciated.

i have vB 4.1.2

thanks

I believe that has been covered in the forums before - try a search.

Laurent42 03-16-2011 07:02 PM

Hello,

I want to move the Forum tab at the middle and then a custom tab at the left.
I have hooked my custom tab with $template_hook['navtab_left'].

I do not find $template_hook['navtab_left'] for the Forum tab. I do not know where to put
$template_hook['navtab_middle'] for this default tab.

Help! :D

--
Laurent

Lynne 03-16-2011 07:39 PM

The Forum tab doesn't use a template_hook since it is entered right into the navbar template.

Laurent42 03-16-2011 07:42 PM

You mean left?
Well, an idea how to put it in the middle? :)

Lynne 03-16-2011 07:52 PM

What do you want in the middle? You would change the template_hook in the plugin to use the one you want. If you want to see exactly where they are located, then look in the navbar template.

Laurent42 03-16-2011 08:05 PM

I just want the forum tab at the middle (it's left by default).
But I do not know how to do it :)

Lynne 03-16-2011 09:27 PM

You will have to add any navtab you want to add to the navtab_left template_hook if you want it to the left of the forum navtab.

Laurent42 03-16-2011 09:58 PM

Well, that's not the case.

I hook on the middle for my custom tab and it works.
When I hook on the left (what i want), the custom tab disappear... because of the forum tab which is located to the left by default... I suppose. ;)

Sad to see a such basic feature does not exist on vBulletin :(

Lynne 03-17-2011 12:15 AM

It works just fine on my test site, so maybe your code is incorrect? Or perhaps you didn't try changing the Execution Order of the plugin?

Laurent42 03-17-2011 08:04 AM

First of all thanks for your answers Lynne,

I have just changed the following line in the plugin (MediaLibrary):
$template_hook['navtab_middle'] .= $templater->render();
to
$template_hook['navtab_left'] .= $templater->render();

then after your post I have changed the order from 5 to 1. (but I do not well if it's correct)
The Media Library tab still does not appear. :'(

Lynne 03-17-2011 07:42 PM

Quote:

Originally Posted by Laurent42 (Post 2174314)
First of all thanks for your answers Lynne,

I have just changed the following line in the plugin (MediaLibrary):
$template_hook['navtab_middle'] .= $templater->render();
to
$template_hook['navtab_left'] .= $templater->render();

then after your post I have changed the order from 5 to 1. (but I do not well if it's correct)
The Media Library tab still does not appear. :'(

So the MediaLibrary tab shows up if you have it set to navtab_middle but not if you have it set to navtab_left? Have you looked in your navbar template to verify you have that template_hook there?

Laurent42 03-17-2011 09:28 PM

Quote:

So the MediaLibrary tab shows up if you have it set to navtab_middle but not if you have it set to navtab_left?
Exactly!

Quote:

Have you looked in your navbar template to verify you have that template_hook there?
There is no navtab_left hook called in the navbar template? It should? In the default template there is one??

I do not have modified my default template and by doing a search, I do not find navtab_left hook in the default navbar!

--------------- Added [DATE]1300401520[/DATE] at [TIME]1300401520[/TIME] ---------------

Ok, I have fixed the problem.

I just needed to hook navtab_start. =)
But I do not understand the difference of navtab_left/navtab_start.

So good to know => the first element is navtab_start and not navtab_left...

A big thanks to Lynne for his/her time!

Laurent42 03-19-2011 10:26 AM

1 Attachment(s)
So now my tabs in the correct order!

My custom tab is the first one.
The forum tab is the second one.

The new problem I have is...
That's the second tab that is selected by default.

What should I hook in order to have my first tab selected by default when I go on the site?

Laurent42 03-19-2011 11:50 AM

Maybe this can help, here is the plugin code:

Code:

    $perms = media_permissions();

    $vbulletin->options['selectednavtab'] = 'media';

    $categories = $vbulletin->db->query_read("
        SELECT * FROM ".TABLE_PREFIX."media_category
        WHERE catOrder != '0'
        ORDER BY catOrder
    ");

    $href['playlists'] = construct_href_playlists();
    $href['pmine'] = construct_href_playlists_mine();
    $href['pcreate'] = construct_href_playlists_create();
    $href['favorites'] = construct_href_favorites();
    $href['subscriptions'] = construct_href_subscriptions();
    $href['submit'] = construct_href_submit();
    $href['random'] = construct_href_random();
    $href['cats'] = construct_href_admin("cats");
    $href['tags'] = construct_href_admin("tags");
    $href['host'] = construct_href_admin("host");

    while ($category = $vbulletin->db->fetch_array($categories))
    {
        $category['href'] = construct_href_category($category);

        $category['align'] = "";
        for ($i = 0; $i < $category['catDepth']; $i++) { $category['align'] .= '-- '; }

        $templater = vB_Template::create('8WR_media_NAVTAB_cat');
        $templater->register('category', $category);
        $categorybits .= $templater->render();
    }
}

$templater = vB_Template::create('8WR_media_NAVTAB');
$templater->register('perms', $perms);
$templater->register('href', $href);
$templater->register('categorybits', $categorybits);
$template_hook['navtab_start'] .= $templater->render();


Lynne 03-19-2011 04:20 PM

You know this is an article about removing default navtabs, right? I just realized that you are talking about adding a navtab which has nothing to do with this article.

But anyway, if you need someone to try to debug your plugin, you should post your own thread. I do notice you have an extra } just sitting in there without a beginning.

Laurent42 03-19-2011 04:35 PM

Ok, I'm going to start a new thread.

For the '}' it's ok, the beginning of the code has not been pasted.

ps: It's not my plugin, but a well known (Media Library).

screenmates 04-02-2011 05:07 AM

Hi Lynne,

vB 4.1.2

We tried several times to remove the code precisely as you suggested from the navbar template but the What's New button remains intact. Also tried clearing CMS cache but no luck. Has something else changed in 4.1.2 and do we need to do anything special?

Please help...

Thanks!

Lynne 04-02-2011 03:40 PM

Make sure you are editing the correct style. There is no way you could remove all that code and still have the tab. If you are not using a default style, then make sure it isn't in there twice. And, make sure a modification is not adding the tab.

CardMafia 05-12-2011 10:43 PM

Thank you for this article! Very helpful and less involved than the first article I read on the subject.

sortega 07-25-2011 06:33 PM

I made the changes above as best I could and got the following error message when complete (it did remove my "Home" and "Blog" buttons which is what I wanted)

"Parse error: syntax error, unexpected '<' in /home2/hersheyi/public_html/forum/includes/class_bootstrap.php(537) : eval()'d code on line 9"

but how do I correct that?

I did notice that for your removing the Blog button code your code did not match mine (see both exampled below) so I commented out the section I thought applied.

Yours:
Code:

if (defined('VBBLOG_CACHED_TEMPLATES'))
{
    if (defined('VBBLOG_SCRIPT'))
    {
        $vbulletin->options['selectednavtab'] = 'vbblog';
    }
    $template_hook['navtab_middle'] .= vB_Template::create('blog_navbar_link')->render();
        $template_hook['navbar_getnew_menu'] .= vB_Template::create('blog_navbar_whatsnew_link')->render();
    if ($show['blog_search'])
    {
        $template_hook['navbar_search_menu'] .= vB_Template::create('blog_navbar_search')->render();
    }
}

Mine:
Code:

<!-- if (defined('VBBLOG_CACHED_TEMPLATES'))
{
        if (defined('VBBLOG_SCRIPT'))
        {
                $vbulletin->options['selectednavtab'] = 'vbblog';
        }
        $template_hook['navtab_middle'] .= vB_Template::create('blog_navbar_link')->render();
        $template_hook['navbar_getnew_menu'] .= vB_Template::create('blog_navbar_whatsnew_link')->render();
} -->


if (STYLEID != $vbulletin->userinfo['blogstyleid'])
{
        $vbulletin->userinfo['blocktext'] = '';
}

HELP!

Lynne 07-25-2011 10:40 PM

That is not how you comment out php. You use /* at the beginning and */ at the end. If you use those for that section that you showed, then it will work. <!-- and --> are used for commenting out html.


All times are GMT. The time now is 02:27 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01570 seconds
  • Memory Usage 1,901KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_html_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete