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
  #312  
Old 12-29-2002, 09:23 PM
influence influence is offline
 
Join Date: Jan 2002
Location: inside a bullet
Posts: 207
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
+-----------------------------------------------+
| File: FORUM/postings.php (1 change) |
+-----------------------------------------------+
| 1. Find this code:
+--------------------------------------------------------------------------+
updateforumcount($threadinfo[forumid]);

if ($visible) {
+--------------------------------------------------------------------------+
|
+-----------------------------------------------+
| Replace it with:
+--------------------------------------------------------------------------+
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 dont show for me either on vb 2.2.6 for the postings.php file.

when i search for updateforumcount($threadinfo[forumid]); .. about 4 of them comes up without the invisible part.

any help?
Reply With Quote
  #313  
Old 01-09-2003, 07:58 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 just installed this on 2.2.9 but I got an error when I went to update the forum info. This is the error:

Quote:
Database error in vBulletin Control Panel 2.2.9:

Invalid SQL: SELECT * FROM thread WHERE forumid='10' AND lastposter='Boofo's Babe' AND lastpost='1042060020'
mysql error: You have an error in your SQL syntax near 's Babe' AND lastpost='1042060020'' at line 1

mysql error number: 1064

Date: Thursday 09th of January 2003 09:51:30 PM
Script: http://www.bearfacts2.com/forum/forum/admin/misc.php
Referer: http://www.bearfacts2.com/forum/admin/misc.php
I changed the user name causing this to Boofos Babe without the apostrophe, but it still gives me the error. Can anyone please help me with this as my board is messed up now?
Reply With Quote
  #314  
Old 01-10-2003, 01:13 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, I finally got the forum update counters to work by making the last post by someone other than the user with an apostrophe in the name. If they post any last posts in the future, then we are going to run into the problem again. I think it has something to do with adding htmlspecialchars or something like that to the last poster in the hack but I'm not sure where to add that to avoid the db error problem in the future. Can anyone lend a hand on that? Also, I get this error when I click on a last post link from a forum that has only 1 thread and 1 post in it.

Quote:
No thread specified. If you followed a valid link, please notify the webmaster
It seems if there is more than 1 post in 1 thread, then the link clicks through fine. Anyone have any ideas on how to fix this?
Reply With Quote
  #315  
Old 01-10-2003, 04: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

Quote:
Originally posted by TECK
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.
Floren, will the following code do the same thing or do I need to change it to your code above?

Code:
open showthread.php and above:

if ($goto=="nextnewest") {
  $thread = verifyid("thread",$threadid,1,1);


add:

// 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='".addslashes($foruminfo[lastposter])."' AND dateline='$foruminfo[lastpost]'"));
    header("Location: showthread.php?s=$session[sessionhash]&threadid=$lastthread[threadid]");
    exit;
  }
}


In the "forumhome_lastpostby" template:

change:

<a href="showthread.php?s=$session[sessionhash]&goto=lastpost&forumid=$forum[forumid]">$forum[lastthread]</a>


to:

<a href="showthread.php?s=$session[sessionhash]&goto=newthread&forumid=$forum[forumid]" title="Go to first post">$forum[lastthread]</a>
Reply With Quote
  #316  
Old 01-28-2003, 03:19 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is anyone still supporting this hack? I finally got it working ok, but I ran into a problem earlier tonight. I got the

Quote:
No thread specified. If you followed a valid link, please notify the webmaster
error again while clicking on the last title link on one of the forums on the forumhome. When I ran the update counters for the threads and then the forums, the link was clickable again. Does anyone have any idea what would cause this to happen? The thread in question did have some dashes in the title name, if that means anything.
Reply With Quote
  #317  
Old 01-30-2003, 08:24 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One last time, is anyone supporting this hack?
Reply With Quote
  #318  
Old 02-06-2003, 06:35 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I found a bug in this hack, say you disallow guests to view threads in a forum, the guest can still see the title on forumhome, what can I do to make it so they only see the last post they're supposed to see?
Reply With Quote
  #319  
Old 02-11-2003, 05:50 PM
KevinM KevinM is offline
 
Join Date: Dec 2002
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have installed this hack and it partly works. I have checked the installation and all seems to be as per instructions. I also have a gateway (usenet) hack installed which maybe causing a conflict.

My problem is:
The last post date / name etc are fine
The last post title is incorrect - it was correct the first time but won't update.
The link from the last post title works, and takes you to the last post.

Why won't the title update?

You can see the site at http://www.gardenbanter.co.uk

I hope one of you can help.

Ok - I think I've figured it out. As all my threads come from usenet, the gateway script imports them into the db. Therefore after each import, the 'update forums info' needs to be run. In my case this is 6 times every hour. I have written a cron job calling the misc.php file. It seems to be working, but don't know what it will mean to the server load.
Reply With Quote
  #320  
Old 02-17-2003, 11:01 PM
webhost's Avatar
webhost webhost is offline
 
Join Date: Oct 2001
Location: St. Louis
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

have the same problem using 2.2.9 Hack was working then I installed this hack https://vborg.vbsupport.ru/showthrea...threadid=34361 now when someone registers it puts the info for that user in the post but does not update on forumhome page. I can go and run update counters in admin cp and it updates then. Any ideas.?
Reply With Quote
  #321  
Old 02-19-2003, 10:47 AM
maxxxxxx maxxxxxx is offline
 
Join Date: Feb 2003
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

All works great but i want this last post on left side under the forums list like the picture...




thx and cu
maxxxxxx
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 02:14 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.05796 seconds
  • Memory Usage 2,305KB
  • 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
  • (4)bbcode_code
  • (5)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
  • (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