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
  #252  
Old 09-10-2002, 10:37 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it's fixed now. make sure when you download the file, at the top it says version 1.1, not 1.0.
if it says 1.0, clear your browser temp files.

for those of you who want to have a link the the thread itself, instead of going to the last post do this:

open showthread.php and find:
Code:
if ($goto=="nextnewest") {
replace it with:
Code:
// goto newest thread
if ($goto=="newthread") {
  if (isset($forumid) and $forumid!=0) {
    $foruminfo=verifyid("forum",$forumid,1,1);
    $forumid=$foruminfo['forumid'];

    $forumslist = "";
    $getchildforums=$DB_site->query("SELECT forumid,parentlist FROM forum WHERE INSTR(CONCAT(',',parentlist,','),',$forumid,')>0");
    while ($getchildforum=$DB_site->fetch_array($getchildforums)) {
      if ($getchildforum[forumid]==$forumid) {
        $parentlist=$getchildforum[parentlist];
      }
      $forumslist.=",$getchildforum[forumid]";
    }

    $thread=$DB_site->query_first("SELECT threadid FROM thread WHERE forumid IN (0$forumslist) AND visible=1 AND (sticky=1 OR sticky=0) AND lastpost>='".($foruminfo[lastpost]-30)."' AND open<>10 ORDER BY lastpost DESC LIMIT 1");
    header("Location: showthread.php?s=$session[sessionhash]&threadid=$thread[threadid]");
    exit;
  }
}

if ($goto=="nextnewest") {
your link to the latest thread will become:
Code:
<a href="showthread.php?s=$session[sessionhash]&goto=newthread&forumid=$forum[forumid]">$forum[lastthread]</a>
scott, let me know if you found the code acceptable on the .txt file. thanks you.

update: i'm gonna look also in postings.php file, it needs to be also modified. for example if you edit a thread title, it wont update the thread... i will look into it and post the mod here...

floren.
Reply With Quote
  #253  
Old 09-11-2002, 03:35 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok.. another little bug discovered... and fixed.
in forum/postings.php, find:
Code:
  updateforumcount($threadinfo[forumid]);

  if ($visible) {
replace it with:
Code:
  updateforumcount($threadinfo[forumid]);

  $lastpost=$DB_site->query_first("SELECT * FROM forum WHERE forumid='$threadinfo[forumid]'");
  if($lastpost['lastpost']==$threadinfo['dateline']) {
    $DB_site->query("UPDATE forum SET lastthread='".addslashes(htmlspecialchars($title))."' WHERE forumid='$threadinfo[forumid]'");
  }

  if ($visible) {
that fixes a bug regarding the lastthread update, while you edit the thread (admin options).
if you download the file, make sure it says version 1.2.
Reply With Quote
  #254  
Old 09-12-2002, 05:25 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

now the only problem in postings.php is when you delete a thread, the title is not updated.. i'm working on this as we speak..
Reply With Quote
  #255  
Old 09-12-2002, 06:13 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, in postings.php, under "start do delete thread", i added this way the code:
Code:
  deletethread($threadid,$foruminfo[countposts]);

  $lastpost = $DB_site->query_first("SELECT title,lastpost FROM thread WHERE forumid='$threadinfo[forumid]' ORDER BY lastpost DESC LIMIT 1");
  $DB_site->query("UPDATE forum SET lastthread='".addslashes(htmlspecialchars($lastpost['title']))."' WHERE forumid='$threadinfo[forumid]'");
what do i miss scott?
Reply With Quote
  #256  
Old 09-12-2002, 06:46 AM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually if you just change updateforumcount function to do it, as it gets called when a thread gets moved / deleted

I will write this in my diary to get done tonight just about to go out to work.
Reply With Quote
  #257  
Old 09-12-2002, 06:49 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks alot scott...........
wow it was faster then i expected your answer, i pm'ed you to your new lounge, vb.com... hihi
Reply With Quote
  #258  
Old 09-13-2002, 12:33 AM
Baptizer Baptizer is offline
 
Join Date: Nov 2001
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Teck,
does your 'last post on forum home' display properly when a thread is deleted/moved? just curious.
Reply With Quote
  #259  
Old 09-13-2002, 01:24 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no. it will be fixed by PPN today, or whenever he can spare some time beside his school.
that's the only part i could not fix. the rest is all working great.
Reply With Quote
  #260  
Old 09-13-2002, 11:46 PM
ExAvIoUr ExAvIoUr is offline
 
Join Date: Jan 2002
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just a kind request that PPN or someone post the complete info when it is completed. this thread is making my head spin. :O thanx!
Reply With Quote
  #261  
Old 09-14-2002, 08:26 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm, it doesnt make sense scott. the way it is updateforumcount($forumid) function now, it should update it... what did i miss in the steps???
thanks.
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 08:07 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.05456 seconds
  • Memory Usage 2,311KB
  • 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
  • (6)bbcode_code
  • (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