Version: 1.00, by Xenon
Developer Last Online: Oct 2023
Version: 2.2.x
Rating:
Released: 06-21-2002
Last Update: Never
Installs: 92
No support by the author.
This is why i really want a Mini-Hack section here, please Chen
What this hack does:
When a User posts to a thread where he already has the lastpost, no new post will be added. The lastpost of him will be edited and the new text is put after his first message.
This would not be done, if he has an attachment in his new post or the old post is older than 1 hour (you can change this timespan yourself )
Known bugs: None
Hope someone can use it, i do
Believe this hack includes just 1!! codehack.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Heh, still did'nt work, well this is how it looks in the php file, can you see if its messed up there
PHP Code:
$lastpost = $DB_site->query_first("SELECT * FROM post WHERE threadid = '$threadid' ORDER BY postid DESC");
if($lastpost[userid]!=$bbuserinfo[userid] || (time()-$lastpost[dateline])>3600 || ($attachmentid and !$foruminfo[moderateattach])){
$DB_site->query("INSERT INTO post
age)."','$allowsmilie','$signature','$ipaddress','$iconid','$visible')");
} else {
$editedbysql="";
if ($showeditedby and $lastpost[dateline]<(time()-($noeditedbytime*60))) {
$editedbysql=",edituserid='$bbuserinfo[userid]',editdate='".time()."'";
}
unindexpost($lastpost[postid],$lastpost[title],$lastpost[pagetext]);
$DB_site->query("UPDATE post SET dateline='".time()."',pagetext='".addslashes($lastpost[pagetext]."\n\n".$message)."' WHERE
postid=".$lastpost[postid]);
indexpost($lastpost[postid],0);
$DB_site->query("UPDATE thread SET lastpost='".time()."' WHERE threadid='$threadid'");
if ($visible) {
$goto="showthread.php?s=$session[sessionhash]&postid=".$lastpost[postid]."#post".$lastpost[postid];
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
}
eval("standardredirect(\"".gettemplate("redirect_postthanks")."\",\"$goto\");");
exit;
}
mystislav: edit your post, you are not allowed to post full vb-files here!!!
second: than the problem isn't my hack. you have to have made some mistakes some time ago, the function unindexpost() is defined in functions.php on every vb. If you don't have it, you have messed up your functions.php
Is there any way to add color to the DOUBLE POST FEATURE part of this line?
PHP Code:
$DB_site->query("UPDATE post SET dateline='".time()."',pagetext='".addslashes($lastpost[pagetext]."\n\nDOUBLE POSTING FEATURE\n\n".$message)."' WHERE postid=".$lastpost[postid]);
indexpost($lastpost[postid],0);
@Boofo: You can use every vb-code in the textpassage between post1 and post2, so if you have enabled the color-bbcode on your board you should be able to do that:
PHP Code:
$DB_site->query("UPDATE post SET dateline='".time()."',pagetext='".addslashes($lastpost[pagetext]."\n\n[b][color=red]DOUBLE POSTING FEATURE[/color][/b]\n\n".$message)."' WHERE postid=".$lastpost[postid]);
I had to replay to this message in order to see how you had the code (it was parsed here. The disable tags hack is great for this sort of thing!)
I was using [disable]<font color=\"yellow\"> and </font>[/disable]. That's where I messed up. Thanks for the fix.
[disable]$DB_site->query("UPDATE post SET dateline='".time()."',pagetext='".addslashes($last post[pagetext]."\n\nDOUBLE POSTING FEATURE\n\n".$message)."' WHERE postid=".$lastpost[postid]);[/disable]
Quote:
Originally posted by Xenon
PHP Code:
$DB_site->query("UPDATE post SET dateline='".time()."',pagetext='".addslashes($lastpost[pagetext]."\n\n[b][color=red]DOUBLE POSTING FEATURE[/color]<b>
@Boofo: You can use every vb-code in the textpassage between post1 and post2, so if you have enabled the color-bbcode on your board you should be able to do that:
</b>\n\n".$message)."' WHERE postid=".$lastpost[postid]);
ups, damn i forgot code is parsed in [php]-tags too
yes, Having the Subejct is also possible:
PHP Code:
[disable]$DB_site->query("UPDATE post SET dateline='".time()."',pagetext='".addslashes($lastpost[pagetext]."\n\n[b][color=red]DOUBLE POSTING FEATURE[/color][/b] - ".$title."\n\n".$message)."' WHERE postid=".$lastpost[postid]);[/disable]