vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Remove thread title in navbits if you have large thread title installed (https://vborg.vbsupport.ru/showthread.php?t=43157)

VietSoil 09-03-2002 10:00 PM

Remove thread title in navbits if you have large thread title installed
 
Large thread title template mod is here

If you have that template mod installed, you might want to use this hack. This is the simplest hack ever! (I guess) :cool:. What it does: it will remove the thread title in the navbits so you won't have 2 thread titles displayed. Make sense!

OK, to the code modification:

In admin/functions.php, find:
PHP Code:

$nav_title=$threadinfo[title]; 


Replace that with:
PHP Code:

$nav_title=""

You're done!

I'm sure there are other ways to do this, but this is the simplest way, I believe.

Screenshot: see the attachment

Edit: This would work with all 2.2.x as well

Boofo 09-04-2002 04:38 AM

But you still have the arrow at the end of the navbar. To get rid of that also, do this instead:

Code:

==========================
In admin/functions.php, replace this:
==========================

      if ($highlightlast) {
        $templatename="nav_linkon";
      } else {
        $templatename="nav_linkoff";
      }

      if (strlen($code)>0) {
        $code.=gettemplate("nav_joiner",0);
      }

      $threadinfo=getthreadinfo($id);
      $nav_url="showthread.php?s=$session[sessionhash]&threadid=$id";
      $nav_title=$threadinfo[title];     


==========================
With this:
==========================

      if ($highlightlast) {
        $templatename="nav_linkon";
      } else {
        $templatename="nav_linkoff";
      }

      $nav_title='';

==========================


VietSoil 09-04-2002 05:08 AM

Thanks Boofo for the code to remove the arrow at the end of the navbar. I haven't tested it though. By the way, I still prefer the little arrow at the end so it will point to the big thread title below. That's my opinion. If you don't like the arrow at the end of navbar, use Boofo's instruction instead of mine.

Boofo 09-04-2002 05:12 AM

I used to have it with the arrow still there and it just didn't look quite right to me so that is why I removed it. I wish you had been around with this code about 2 weeks ago when I spent an all nighter trying to figure out what to remove and what to keep in the code that wouldn't screw anything else up. :)

traekwon 09-04-2002 08:21 PM

Awesome, works perfectly.

bitbender 09-04-2002 08:36 PM

Thanki, thanki...Also perfecto mundo, on my 2.2.6 !

Austin Dea 09-04-2002 11:21 PM

Used Boofo's, good work ;D.

FleaBag 09-05-2002 01:35 AM

Cool hack - working on 2.2.7. Cheers. :D

TECK 09-14-2002 10:59 AM

i think the best way is to use the strlen() to limit the lenght.
for example...
in functions.php, replace:
Code:

      $nav_title=$threadinfo[title];
with:
Code:

      $nav_title=$threadinfo[title];
      if (strlen($threadinfo[title]) > 25) {
        $nav_title = substr($threadinfo[title], 0, 23) . '...';
      }

now all you have to do is change the the values 25 and 23 to whatever you like your title to be in lenght. value 25 represents the total title lenght and 23 represents the total title lenght - 2 characters, because you add the "..." dots at the end.

Boofo 09-14-2002 12:29 PM

That's only if you still want it there. I removed it because I have the thread title in big letters at the top (like it is here) so you don't need it in the navbar. It's kind of redundant to have it in both places.

Quote:

Originally posted by TECK
i think the best way is to use the strlen() to limit the lenght.
for example...
in functions.php, replace:
Code:

      $nav_title=$threadinfo[title];
with:
Code:

      $nav_title=$threadinfo[title];
      if (strlen($threadinfo[title]) > 25) {
        $nav_title = substr($threadinfo[title], 0, 23) . '...';
      }

now all you have to do is change the the values 25 and 23 to whatever you like your title to be in lenght. value 25 represents the total title lenght and 23 represents the total title lenght - 2 characters, because you add the "..." dots at the end.



All times are GMT. The time now is 07:33 AM.

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.01174 seconds
  • Memory Usage 1,741KB
  • 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
  • (5)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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