Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

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
  #332  
Old 04-08-2003, 05:32 AM
Mr. X's Avatar
Mr. X Mr. X is offline
 
Join Date: Oct 2001
Location: Iowa
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed this hack on my public forum finally (after an upgrade to 2.3.0) and so far I've had no errors at all, same with my localhost test forum. I wish there was a way to disable lastpost for a forum that only registered members can see, but thats my only gripe. I'd really like to get that icon addon though, so I'll install that tomorrow on my test board and see how it goes.

For my private forum, I have that set that only admins/mods can view it, so it doesnt appear to anyone else, so no problems there.
Reply With Quote
  #333  
Old 04-08-2003, 03:58 PM
kms's Avatar
kms kms is offline
 
Join Date: Mar 2002
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i've had it working on 2.26/7/8&9 but its not straight forward on 2.3 because
Code:
$lastposts=$DB_site->query_first("SELECT MAX(lastpost) AS lastpost FROM thread WHERE forumid=$forumid AND visible=1 AND open<>10");
  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'];
  }

  $lastpostquery=",lastpost='$lastpost',lastposter='".addslashes($lastposter)."'";
isnt in v2.3 /functions/admin/functions.php. How did you get your v2.3.0 working? TIA
Reply With Quote
  #334  
Old 04-08-2003, 04:05 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This code was taken straight out of the 2.3.0 functions.php

PHP Code:
  $lastposts=$DB_site->query_first("SELECT MAX(lastpost) AS lastpost FROM thread WHERE forumid=$forumid AND visible=1 AND open<>10");
  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'];
  }

  
$lastpostquery=",lastpost='$lastpost',lastposter='".addslashes($lastposter)."'"
Reply With Quote
  #335  
Old 04-08-2003, 04:12 PM
kms's Avatar
kms kms is offline
 
Join Date: Mar 2002
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

odd ? but thnx, will try again. Yours works ok?
Reply With Quote
  #336  
Old 04-08-2003, 04:28 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 using 2.2.9, but I took that straight out of the functions.php for 2.3.0. I little tip...if you can't find a block of code, try looking for a single line of code and check it out for the rest of it. Sometimes the formatting is different which will throw things off.
Reply With Quote
  #337  
Old 04-08-2003, 04:36 PM
kms's Avatar
kms kms is offline
 
Join Date: Mar 2002
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thnx. Ignore me btw, its all there, works a treat. Not sure what iwas doing b4?
Reply With Quote
  #338  
Old 04-08-2003, 07:38 PM
Mr. X's Avatar
Mr. X Mr. X is offline
 
Join Date: Oct 2001
Location: Iowa
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

"if you can't find a block of code, try looking for a single line of code and check it out for the rest of it. Sometimes the formatting is different which will throw things off."

Yep, thats exactly what I do. Ultraedit's search isnt great, so I just search for the first line, but if its a line that appears a bunch of times in a file, I move to the next and narrow it down, then compare the block of code.

It sucks, wish I could find blocks of code in Ultraedit though.
Reply With Quote
  #339  
Old 04-08-2003, 07:48 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try EditPlus2. You can find whole blocks of code with it, no matter how big. The one line search is why I ditched Ultra-Edit and switched to EditPlus2. Far better editor.
Reply With Quote
  #340  
Old 04-10-2003, 12:10 AM
Mr. X's Avatar
Mr. X Mr. X is offline
 
Join Date: Oct 2001
Location: Iowa
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm yeah I've been looking into it. UE does have alot of stuff I like, but I might consider switching.

Does the Icon addon work? I get alot of lines that dont appear in 2.3.0 code so Im guessing its a no go now. Bummer, an Icon addition would be nice with this hack.
Reply With Quote
  #341  
Old 04-16-2003, 10:04 AM
Oblivion Knight's Avatar
Oblivion Knight Oblivion Knight is offline
 
Join Date: May 2002
Location: Sheffield, UK
Posts: 1,757
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Scott, it's working flawlessly on 2.3.0 RC3
This is one of those modifications that I believe vBulletin should have as default..

[high]* Oblivion Knight clicks install.[/high]
Reply With Quote
Reply

Thread Tools

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 11:20 AM.


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.08117 seconds
  • Memory Usage 2,301KB
  • 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
  • (1)bbcode_code
  • (1)bbcode_php
  • (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
  • (1)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