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.
if ($lastposts['lastpost']) {
if ($lastposts['lastpost']>$lastpost or $lastposts['lastpost']<$currentlastpost) {
$lastposts=$DB_site->query_first("SELECT lastpost,lastposter FROM thread WHERE lastpost='$lastposts[lastpost]'");
$lastpost=$lastposts['lastpost'];
$lastposter=$lastposts['lastposter'];
}
}
change to
if ($lastposts['lastpost']) {
if ($lastposts['lastpost']>$lastpost or $lastposts['lastpost']<$currentlastpost) {
$lastposts=$DB_site->query_first("SELECT lastpost,lastposter,title FROM thread WHERE lastpost='$lastposts[lastpost]'");
$lastpost=$lastposts['lastpost'];
$lastposter=$lastposts['lastposter'];
$lasttitle=$lastposts['title'];
}
}
your looking for the above one if you still can't find it your looking for
$lastposts=$DB_site->query_first("SELECT lastpost,lastposter FROM thread WHERE lastpost='$lastposts[lastpost]'");
$lastpost=$lastposts['lastpost'];
$lastposter=$lastposts['lastposter'];
I cannot find the above, the nearest I can find is the below:
$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 lastpost='$lastposts[lastpost]'");
$lastpost=$lastposts['lastpost'];
$lastposter=$lastposts['lastposter'];
}
if ($lastposts['lastpost']>$lastpost) {
$lastposts=$DB_site->query_first("SELECT lastpost,lastposter FROM thread WHERE lastpost='$lastposts[lastpost]'");
$lastpost=$lastposts['lastpost'];
$lastposter=$lastposts['lastposter'];
}
to
PHP Code:
if ($lastposts['lastpost']>$lastpost) {
$lastposts=$DB_site->query_first("SELECT lastpost,lastposter,title FROM thread WHERE lastpost='$lastposts[lastpost]'");
$lastpost=$lastposts['lastpost'];
$lastposter=$lastposts['lastposter'];
$lasttitle=$lastposts['title'];
}
Its still has not updated the posts that have already been made. Its working if a member posts a current message but it does not update at all with any old posts.
I have change what you stated above and still no joy?
$DB_site->query("UPDATE forum SET replycount='$numberposts',threadcount='$numberthreads',lastpost='$lastpost',lastposter='".addslashes(htmlspecialchars($lastposter))."' WHERE forumid='$forumid'");
the new function file has the query changed to this
PHP Code:
$DB_site->query("UPDATE forum SET replycount='$numberposts',threadcount='$numberthreads' $lastpostquery WHERE forumid='$forumid'");
you can see the $lastpostquery is added to the query
dxb >
i took that into account and its mentioned within the readme for how to do it to 2.2.x and 2.0.x because of the difference.
Lubi >
does EditPlus have syntax highlighting for PHP? if so then it should show where it went wrong, if not PHPed from http://soysal.com does and is useful for spotting errors.
I honestly don't know what would cause an error like that, you were only updating 3 lines within newreply.php
Well I dunno either I do have the sytax colors but the code isn't wrong I think the software must be doing something when I save the file. I've never had this problem with Textpad but I like Editplus 2 way better... I dunno but I can't install any hacks until I get this squared away