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
Details »»

Version: , by Scott MacVicar Scott MacVicar is offline
Developer Last Online: Mar 2016 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 09-20-2001 Last Update: Never Installs: 85
 
No support by the author.

I had tried a version suggested by someone else instead of my own and well, all it did was send the load average up by about 10 times what it was.

This version inserts the last title into the forum database when it is updating the last post name and time. There is no difference in loading time as everything is called normally by vBulletin.

This works on 2.0.x and 2.2.x

Updated at 11:34 GMT on 28th September 2002

Thanks to floren for the latest update.

Show Your Support

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

Comments
  #192  
Old 06-01-2002, 01:57 PM
Frank-kun Frank-kun is offline
 
Join Date: Nov 2001
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey, how about that, I solved my own problem

I believe that in 2.2.6, the file to update forum post counts and lastposters was changed, so that the "title" is not part of the SELECT statement that is called in order to get the lastposts info. Because of this, $lasttitle is set to blank because according to the code, it tries to set itself using the "title" variable.

As a quick fix, you can simply have the SELECT statement call the title column again. So if you have this hack installed, your code should look like this:

in admin/functions.php:

PHP Code:
if ($lastposts['lastpost']>$lastpost) {
    
$lastposts=$DB_site->query_first("
            SELECT lastpost,lastposter
            FROM thread
            WHERE forumid = 
$forumid AND lastpost = '$lastposts[lastpost]'");
        
$lastpost=$lastposts['lastpost'];
        
$lastposter=$lastposts['lastposter'];
        
$lasttitle=$lastposts['title']; 
Just replace it with:

PHP Code:
if ($lastposts['lastpost']>$lastpost) {
    
$lastposts=$DB_site->query_first("
            SELECT lastpost,lastposter,title
            FROM thread
            WHERE forumid = 
$forumid AND lastpost = '$lastposts[lastpost]'");
        
$lastpost=$lastposts['lastpost'];
        
$lastposter=$lastposts['lastposter'];
        
$lasttitle=$lastposts['title']; 
...and you should have no problems with moving/deleting with PPN's Last Title hack.

Now, I don't know if the "title" was taken out of the code for some reason to fix a bug, but if it was, perhaps a better fix that preserves the bugfix might be more useful. But this one's a quick fix.

Thanks again PPN for a great hack.
Reply With Quote
  #193  
Old 06-01-2002, 02:01 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you need to chnage it to this for 2.2.5 too or just 2.2.6?
Reply With Quote
  #194  
Old 06-01-2002, 06:55 PM
Frank-kun Frank-kun is offline
 
Join Date: Nov 2001
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Boofo
Do you need to chnage it to this for 2.2.5 too or just 2.2.6?
Probably just for 2.2.6. If you're working ok with the hack and you have 2.2.5 you should probably just leave it be. But if you're having problems when you move or delete posts, then you should probably try to apply the change.
Reply With Quote
  #195  
Old 06-01-2002, 07:33 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would it mess anything up to just go ahead and add it to avoid any problmes that could arise? I mean, if it won't hurt anything then it might be a good idea to go ahead and update it.

Quote:
Originally posted by Frank-kun


Probably just for 2.2.6. If you're working ok with the hack and you have 2.2.5 you should probably just leave it be. But if you're having problems when you move or delete posts, then you should probably try to apply the change.
Reply With Quote
  #196  
Old 07-03-2002, 08:55 AM
alanvo alanvo is offline
 
Join Date: Feb 2002
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it screws up my tables, why is that, can anybody please help me...

http://www.demsang.net/forums
Reply With Quote
  #197  
Old 07-03-2002, 09:42 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to change the length you want the last time to be in this line:

Code:
$forum['lasttitle'] = substr($forum['lasttitle'], 0, 28);
The default length of the last title is 28 right now. Either make it a smaller number or add space.gif to your forumhome_forumbit_level1_nopost like this:

Code:
<td bgcolor="#1D6AA0" nowrap><smallfont color="#EEEEFF"><img src="https://vborg.vbsupport.ru/images/space.gif" width="200" height="1"><br><b>Last Post</b></smallfont></td>
Quote:
Originally posted by alanvo
it screws up my tables, why is that, can anybody please help me...

http://www.demsang.net/forums
Reply With Quote
  #198  
Old 07-04-2002, 12:23 PM
fonzerelli_79's Avatar
fonzerelli_79 fonzerelli_79 is offline
 
Join Date: Nov 2001
Posts: 259
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i installed the hack on my test forums and everything seems fine when i upload the files

when i change the template though i get this error on the forums home

Quote:
Parse error: parse error, expecting `']'' in ......./index.php(362) : eval()'d code on line 2
any ideas folks?
Reply With Quote
  #199  
Old 07-07-2002, 11:02 PM
Dark Jim's Avatar
Dark Jim Dark Jim is offline
 
Join Date: Apr 2002
Location: Netherlands
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would also like to have the posticon used last next to it on the forum home.
Reply With Quote
  #200  
Old 07-09-2002, 08:03 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[QUOTE]Originally posted by PPN
ok open showthread.php and above

PHP Code:
if ($goto=="nextnewest") {
  
$thread verifyid("thread",$threadid,1,1); 
add

PHP Code:
// goto newest thread
if ($goto=="newthread") {
  if (isset(
$forumid) and $forumid!=0) {
    
$foruminfo=verifyid("forum",$forumid,1,1);
    
$forumid=$foruminfo['forumid'];
    
$lastthread=$DB_site->fetch_array($DB_site->query("SELECT threadid FROM post WHERE username='$foruminfo[lastposter]' AND dateline='$foruminfo[lastpost]'"));
    
header("Location: showthread.php?s=$session[sessionhash]&threadid=$lastthread[threadid]");
    exit;
  }

now change the bit i told you to to
PHP Code:
<a href="showthread.php?s=$session[sessionhash]&goto=newthread&forumid=$forum[forumid]">$forum[lasttitle]</a
sorry it took so long to reply, i thought vBulletin would have had a way to do this, but it didn't so i wrote one.
Reply With Quote
  #201  
Old 07-16-2002, 09:21 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Scott,

Have you had a chance to look at the problem I am haing with apostrophes in the last poster name? (Posts 185 and 186 of this thread).
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 03:21 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.06589 seconds
  • Memory Usage 2,345KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_code
  • (5)bbcode_php
  • (4)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
  • (2)pagenav_pagelinkrel
  • (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_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