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
  #302  
Old 11-25-2002, 10:48 PM
CtrlAltDel CtrlAltDel is offline
 
Join Date: Feb 2002
Location: Ohio
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its the newreply code i think
as the newpost code works fine
Reply With Quote
  #303  
Old 11-25-2002, 11:09 PM
CtrlAltDel CtrlAltDel is offline
 
Join Date: Feb 2002
Location: Ohio
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm seemed to have fixed it
musta missed a line
Reply With Quote
  #304  
Old 11-26-2002, 12:28 AM
Sue's Avatar
Sue Sue is offline
 
Join Date: Nov 2001
Location: Springfield, MA
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
+-----------------------------------------------+
| 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) {
+--------------------------------------------------------------------------+

I don't have the " if ($visible) {" anywhere underneath any of the "updateforumcount($threadinfo[forumid]);" in the file...

Reply With Quote
  #305  
Old 11-27-2002, 10:05 PM
M.C. M.C. is offline
 
Join Date: Jan 2002
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sorry, may be you already talk about, but... how to add lastthread icon for that hack on forumhome?

thanx
Reply With Quote
  #306  
Old 12-04-2002, 01:57 AM
Mr. X's Avatar
Mr. X Mr. X is offline
 
Join Date: Oct 2001
Location: Iowa
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^check back a few pages.

I read quickly through each page, but didnt see what I was looking for, at least not quite.

I have a forum where almost every thread has a cuss word in the title. The forum can only be read and posted in for registered users, logged out/unreg users still see the forum in question listed on the index, but when they enter, they wont be able to see any threads.

This hack works great on 2.2.9, have it working on my test installation on my workstation, however I'd really like to know if its possible, to disable the last post for this one forum I have? I know I can change permissions to make it invisible to unregistered users, but I dont want to do that, since the forum still needs to appear in the index. Thanks!
Reply With Quote
  #307  
Old 12-04-2002, 03:23 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has anyone figured out how to update the title on forumhome when the thread's title is edited?
Reply With Quote
  #308  
Old 12-04-2002, 03:25 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

...Hmm...ok I just looked in the instructions once again and found this:

lastthread

That's the row that's created in a table in the DB....

My guess is...upon editing a thread, the change is entered somewhere, but the code isn't calling it?
Reply With Quote
  #309  
Old 12-04-2002, 09:01 PM
M.C. M.C. is offline
 
Join Date: Jan 2002
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

N9ne, use "Update Counters" in your AdminCP

Mr. X, please, can you give me link to message, couse i have not time to search.... please!
Reply With Quote
  #310  
Old 12-05-2002, 03:03 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

M.C.: I could use update counters, but that would mean everytime someone edits a thread's title, I would have to update counters...not practical.
Reply With Quote
  #311  
Old 12-07-2002, 11:40 AM
Highlander Highlander is offline
 
Join Date: Apr 2002
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi there.. i just got a little error on my site: http://www.spieleplanet.org/forum

look on the main boards "Spieleplanet Communizty .. there it shows 2x times the last threads.. but only in this forums.. on all others its okay.. please give me an idea!?

thx
Reply With Quote
  #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
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:15 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.06206 seconds
  • Memory Usage 2,360KB
  • Queries Executed 30 (?)
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
  • (5)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
  • (16)post_thanks_box
  • (16)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (16)post_thanks_postbit_info
  • (15)postbit
  • (16)postbit_onlinestatus
  • (16)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