Version: , by Scott MacVicar
Developer Last Online: Mar 2016
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.
Bingo on the syntax error. I don't remember the exact query. It was when I ran the Update Thread Counters in the Admin CP that I got it. Also, like I said above. Every so often, when I click on the link to the last post title, it gives me an errorid (no thread identified error) and if I open Edit thread for that thread and click save without doing anything else, it fixes it.
Scott, I've got an update to my problem here. This is the error I just got when I clicked on the link on the forum home to a new thread.
Quote:
No thread specified. If you followed a valid link, please notify the Webmaster
When I went in to the thread, there was only the first post in it (the new thread post). I did a test message (so there are 2 posts now in the thread) and when I went back to the forumhome and clicked on the link again, this time it worked and took me to the first post. I then erased the second message (the test message) and now there is only the original post left in it. When I clicked on the link in the forumhome, it works fine again. It must have something to do with there only being one post in the thread or something. I'm just guessing here. Any ideas on this one?
Do you think you can do a small update to fix this and the apostrophe problems before the updated version for 2.2.7 comes out? I'm still using 2.2.5 and will be at least until version 3 comes out.
Scott, here is the db error I just got after clicking on the last post in one of the forums on the forumhome. Is there a way to fix it?
Quote:
Database error in vBulletin 2.2.5:
Invalid SQL: SELECT threadid FROM post WHERE username='Boofo's Babe' AND dateline='1030675088'
mysql error: You have an error in your SQL syntax near 's Babe' AND dateline='1030675088'' at line 1
Originally posted by Boofo Scott, here is the db error I just got after clicking on the last post in one of the forums on the forumhome. Is there a way to fix it?
I don't know what query this is as I don't have the hack installed, but you need to addslashes to the username:
PHP Code:
username='".addslashes($username)."'
$username is the part of the query that has the username it in, not sure what it is for this hack
Is this with another hack Boofo because i dont have a link to goto=newthread in my showthread.php, though the addslashes it what is missing from the query.
I think I fixed it but I'm not sure if I did it right.
Here's the code I started out with:
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;
}
}
And heres' what I changed it to:
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='".addslashes($foruminfo[lastposter])."' AND dateline='$foruminfo[lastpost]'"));
header("Location: showthread.php?s=$session[sessionhash]&threadid=$lastthread[threadid]");
exit;
}
}
Also, I'm getting this error sometimes when I click on a last post on forumhome link. For some reason, when that happens, it isn't passing the threadid to the &threadid line. Any idea what could be causing that?
Quote:
No thread specified. If you followed a valid link, please notify the Webmaster
I compared the file from 2.2.6 to 2.2.7, and the code i mentioned is not in 2.2.7. I am thinking of going ahead with it anyhow, i really cannot live without the last post not showing up on the front forum page.....