PDA

View Full Version : Remove thread title in navbits if you have large thread title installed


VietSoil
09-03-2002, 10:00 PM
Large thread title template mod is here (https://vborg.vbsupport.ru/showthread.php?s=&threadid=36073)

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:
$nav_title=$threadinfo[title];


Replace that with:
$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:

==========================
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:
$nav_title=$threadinfo[title];
with:
$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.

Originally posted by TECK
i think the best way is to use the strlen() to limit the lenght.
for example...
in functions.php, replace:
$nav_title=$threadinfo[title];
with:
$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.

blackice912
09-14-2002, 12:34 PM
Ah, very nice little hack

/me installs

TECK
09-14-2002, 12:56 PM
Originally posted by Boofo
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.

it make alot of sense. you are right. :)

FleaBag
10-29-2002, 08:54 PM
Installed on 2.2.8. :D

Chris M
10-29-2002, 10:11 PM
Gamer:mad: - https://vborg.vbsupport.ru/showthread.php?s=&action=showpost&postid=316171

Satan

FleaBag
10-29-2002, 10:25 PM
Oh what a surprise the same spammed link from Satan once more. Could he have no PM'd it to me? Nah, that'd take common sense!

DrkFusion
10-29-2002, 10:27 PM
It also takes common sense to maybe ignore, and possibly take peoples advice. Correct?

Satan, please stop as well, its not worth ruining a perfect support thread over.

-Arunan

FleaBag
10-29-2002, 10:28 PM
I took your advice the moment I read it.

Smoothie
10-30-2002, 01:07 AM
Originally posted by TECK
i think the best way is to use the strlen() to limit the lenght.
for example...
in functions.php, replace:
$nav_title=$threadinfo[title];
with:
$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. Good one Teck!