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 installed this hack on my public forum finally (after an upgrade to 2.3.0) and so far I've had no errors at all, same with my localhost test forum. I wish there was a way to disable lastpost for a forum that only registered members can see, but thats my only gripe. I'd really like to get that icon addon though, so I'll install that tomorrow on my test board and see how it goes.
For my private forum, I have that set that only admins/mods can view it, so it doesnt appear to anyone else, so no problems there.
i've had it working on 2.26/7/8&9 but its not straight forward on 2.3 because
Code:
$lastposts=$DB_site->query_first("SELECT MAX(lastpost) AS lastpost FROM thread WHERE forumid=$forumid AND visible=1 AND open<>10");
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'];
}
$lastpostquery=",lastpost='$lastpost',lastposter='".addslashes($lastposter)."'";
isnt in v2.3 /functions/admin/functions.php. How did you get your v2.3.0 working? TIA
This code was taken straight out of the 2.3.0 functions.php
PHP Code:
$lastposts=$DB_site->query_first("SELECT MAX(lastpost) AS lastpost FROM thread WHERE forumid=$forumid AND visible=1 AND open<>10");
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'];
}
I'm using 2.2.9, but I took that straight out of the functions.php for 2.3.0. I little tip...if you can't find a block of code, try looking for a single line of code and check it out for the rest of it. Sometimes the formatting is different which will throw things off.
"if you can't find a block of code, try looking for a single line of code and check it out for the rest of it. Sometimes the formatting is different which will throw things off."
Yep, thats exactly what I do. Ultraedit's search isnt great, so I just search for the first line, but if its a line that appears a bunch of times in a file, I move to the next and narrow it down, then compare the block of code.
It sucks, wish I could find blocks of code in Ultraedit though.
Try EditPlus2. You can find whole blocks of code with it, no matter how big. The one line search is why I ditched Ultra-Edit and switched to EditPlus2. Far better editor.
Hmm yeah I've been looking into it. UE does have alot of stuff I like, but I might consider switching.
Does the Icon addon work? I get alot of lines that dont appear in 2.3.0 code so Im guessing its a no go now. Bummer, an Icon addition would be nice with this hack.