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
characters hack in the title Details »»
characters hack in the title
Version: 1.00, by all-the-vb all-the-vb is offline
Developer Last Online: Oct 2013 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 05-05-2003 Last Update: Never Installs: 17
 
No support by the author.

Hello Everyone

hack : characters hack in the title .

hacked by All-the-vb

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

if a title is more than 40 characters long, what will be taken is only the first number of letters (depends on the number you select), this makes you thread subjects look neater...



example:

if a subject had a thread of 25 characters , you set it to display 14 characters only...



VB land forums.... <-- this is how it will show instead of VB land forums blah blah blah blah

Show Your Support

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

Comments
  #22  
Old 05-06-2003, 07:30 PM
yxboom's Avatar
yxboom yxboom is offline
 
Join Date: Jan 2003
Location: The City
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Perfect!!! Thanks Boofo! You da man!

[edit to add] Hrm.... I just typed in a 70 character title with no truncation

I am running v2.2.9
Reply With Quote
  #23  
Old 05-06-2003, 07:49 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm running 2.2.9 also. Make sure you have the code I gave you right above this:

PHP Code:
      $thread[lastreplydate]=vbdate($dateformat,$thread[lastpost]);
      
$thread[lastreplytime]=vbdate($timeformat,$thread[lastpost]);

      
$thread[gotonew]='';

      
$thread[newoldhot]='folder';
      if (!
$thread[open]) {
        
$thread[newoldhot]='lock'.$thread[newoldhot];
      } 
Reply With Quote
  #24  
Old 05-06-2003, 08:15 PM
all-the-vb's Avatar
all-the-vb all-the-vb is offline
 
Join Date: Apr 2003
Location: Norwich,Uk
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your replies

---------
Boofo
What is the problem? If there were codes working with
the data base?
you make it too huge aranoid:

As you can see, the code I have put is

PHP Code:
if(strlen($thread[title]) > $akbr){

$thread[title] = substr($thread[title],0,$small);

$thread[title] = "$thread[title] ...";
}
//end characters hack 
you can change

$small

with

$akbr

With the numbers you want, and you brought a code from outside,
I don?t have a clue why!!

I have put it as the following


PHP Code:
//start characters hack
$akbr=$DB_site->query("SELECT value FROM setting WHERE settingid=300");
$small=$DB_site->query("SELECT value FROM setting WHERE settingid=301");
             if(
strlen($thread[title]) > $akbr){

$thread[title] = substr($thread[title],0,$small);

$thread[title] = "$thread[title] ...";
}
//end characters hack 
with the extra stuff, so the user will be able to use it from the control panel
and it doesn't need the file to be uploaded every time the number changes
Reply With Quote
  #25  
Old 05-06-2003, 08:18 PM
all-the-vb's Avatar
all-the-vb all-the-vb is offline
 
Join Date: Apr 2003
Location: Norwich,Uk
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yxboom

The hack is working perfectly
I don?t know why it didn't work with you

Do the following

Open

forumdisplay.php

find in line 609 :

PHP Code:
    if ($wordwrap!=0) {
        
$thread[title]=dowordwrap($thread[title]);
      } 
after that add :

PHP Code:
//start characters hack
             
if(strlen($thread[title]) > 30){

$thread[title] = substr($thread[title],0,25);

$thread[title] = "$thread[title] ...";
}
//end characters hack 

30 , 25
That is all, and it will work 100%

But you will not be able to control it from the control panel
Reply With Quote
  #26  
Old 05-06-2003, 08:19 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There's no problem at all. But if I can save 2 queries for each thread just to get the length and set it, then I will go that route. I wasn't trying to infringe on your hack. I just offered an easier solution and avoided the queries.
Reply With Quote
  #27  
Old 05-06-2003, 08:30 PM
all-the-vb's Avatar
all-the-vb all-the-vb is offline
 
Join Date: Apr 2003
Location: Norwich,Uk
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no problem

thank for help

Reply With Quote
  #28  
Old 05-06-2003, 10:48 PM
yxboom's Avatar
yxboom yxboom is offline
 
Join Date: Jan 2003
Location: The City
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 01:49 PM Boofo said this in Post #22
I'm running 2.2.9 also. Make sure you have the code I gave you right above this:

PHP Code:
      $thread[lastreplydate]=vbdate($dateformat,$thread[lastpost]);
      
$thread[lastreplytime]=vbdate($timeformat,$thread[lastpost]);

      
$thread[gotonew]='';

      
$thread[newoldhot]='folder';
      if (!
$thread[open]) {
        
$thread[newoldhot]='lock'.$thread[newoldhot];
      } 
Ok that works perfectly thanks a lot. Not to be inconsiderate or rude but being that I have installed Boofo's version of this hack I still need to know how to remove the options in the Admin panel cause apparently the settings.php isn't showing anything new. Thanks again.
Reply With Quote
  #29  
Old 05-07-2003, 12:52 AM
marsauae marsauae is offline
 
Join Date: Apr 2003
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

????? ??????
Reply With Quote
  #30  
Old 05-07-2003, 12:57 AM
Koutaru's Avatar
Koutaru Koutaru is offline
 
Join Date: Feb 2003
Location: IL
Posts: 589
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

go to your database in phpadmin and manually delete it
Reply With Quote
  #31  
Old 05-09-2003, 11:23 AM
redstaing0 redstaing0 is offline
 
Join Date: Jan 2003
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
05-07-03 at 02:57 AM Koutaru said this in Post #29
go to your database in phpadmin and manually delete it



whats the db tabel name in the db imust delet it ?
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 02:56 PM.


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.04771 seconds
  • Memory Usage 2,334KB
  • Queries Executed 27 (?)
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
  • (6)bbcode_php
  • (2)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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_postinfo_query
  • fetch_postinfo
  • 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