Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Remove thread title in navbits if you have large thread title installed Details »»
Remove thread title in navbits if you have large thread title installed
Version: 1.00, by VietSoil VietSoil is offline
Developer Last Online: Jan 2004 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 09-03-2002 Last Update: Never Installs: 3
 
No support by the author.

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) . 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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 09-04-2002, 04:38 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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='';

==========================
Reply With Quote
  #3  
Old 09-04-2002, 05:08 AM
VietSoil VietSoil is offline
 
Join Date: Mar 2002
Location: California, US
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 09-04-2002, 05:12 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 09-04-2002, 08:21 PM
traekwon traekwon is offline
 
Join Date: Mar 2002
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome, works perfectly.
Reply With Quote
  #6  
Old 09-04-2002, 08:36 PM
bitbender's Avatar
bitbender bitbender is offline
 
Join Date: Jan 2002
Location: Sorta near Dallas, Texas
Posts: 166
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanki, thanki...Also perfecto mundo, on my 2.2.6 !
Reply With Quote
  #7  
Old 09-04-2002, 11:21 PM
Austin Dea's Avatar
Austin Dea Austin Dea is offline
 
Join Date: Dec 2001
Location: Denver, CO, USA
Posts: 342
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Used Boofo's, good work ;D.
Reply With Quote
  #8  
Old 09-05-2002, 01:35 AM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool hack - working on 2.2.7. Cheers.
Reply With Quote
  #9  
Old 09-14-2002, 10:59 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 09-14-2002, 12:29 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:45 PM.


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.05991 seconds
  • Memory Usage 2,300KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete