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.
I believe that in 2.2.6, the file to update forum post counts and lastposters was changed, so that the "title" is not part of the SELECT statement that is called in order to get the lastposts info. Because of this, $lasttitle is set to blank because according to the code, it tries to set itself using the "title" variable.
As a quick fix, you can simply have the SELECT statement call the title column again. So if you have this hack installed, your code should look like this:
in admin/functions.php:
PHP Code:
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'];
$lasttitle=$lastposts['title'];
Just replace it with:
PHP Code:
if ($lastposts['lastpost']>$lastpost) {
$lastposts=$DB_site->query_first("
SELECT lastpost,lastposter,title
FROM thread
WHERE forumid = $forumid AND lastpost = '$lastposts[lastpost]'");
$lastpost=$lastposts['lastpost'];
$lastposter=$lastposts['lastposter'];
$lasttitle=$lastposts['title'];
...and you should have no problems with moving/deleting with PPN's Last Title hack.
Now, I don't know if the "title" was taken out of the code for some reason to fix a bug, but if it was, perhaps a better fix that preserves the bugfix might be more useful. But this one's a quick fix.
Originally posted by Boofo Do you need to chnage it to this for 2.2.5 too or just 2.2.6?
Probably just for 2.2.6. If you're working ok with the hack and you have 2.2.5 you should probably just leave it be. But if you're having problems when you move or delete posts, then you should probably try to apply the change.
Would it mess anything up to just go ahead and add it to avoid any problmes that could arise? I mean, if it won't hurt anything then it might be a good idea to go ahead and update it.
Quote:
Originally posted by Frank-kun
Probably just for 2.2.6. If you're working ok with the hack and you have 2.2.5 you should probably just leave it be. But if you're having problems when you move or delete posts, then you should probably try to apply the change.
The default length of the last title is 28 right now. Either make it a smaller number or add space.gif to your forumhome_forumbit_level1_nopost like this:
[QUOTE]Originally posted by PPN ok open showthread.php and above
PHP Code:
if ($goto=="nextnewest") {
$thread = verifyid("thread",$threadid,1,1);
add
PHP 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;
}
}