Dear FireBoard users,
In order to further develope the need of Joomla for a robust forum, FireBoard component has been moved to its own new home and new name. You can find more information regarding the Kunena, the successor of FireBoard, at kunena.com. The current forum here will stay for some time more for referencing needs. You can find the FireBoard files under joomlacode.org and other files
Upgrading to Kunena is highly recommended!

Kunena! - To Speak!

A revolution is coming... Kunena - Swahili for: To Speak! THE Next generation of native Joomla based Forum ultra component. Forget what you know about Joomla based forums...
Amazingly Simple Lean and Clean Easier Customization
Kunena is about to redefine the world of Joomla! with the most simplistic ultra component out there. For ultimate performance based on state of the art development techniques, Kunena! is about to bring you... With an integrated plugin system that will allow you to extend Kunena beyond your wildest imaginations...
TOPIC: Double post automerge
#22181
Double post automerge 10 Years ago  
This is my modification to automerge double post. The 2nd and next messages are separated by posting date.

Example:
[code:1]
i really like him too ..his so cute and unhappy!!!!!!!!

2007-09-09 18:41:57
vampires are so romantic!!!!!!!!!

2007-09-09 18:42:29
vampires are so romantic!!!!!!!!!
[/code:1]

Code highlight
[code:1]
// roel: double post checker
$database->setQuery(\"SELECT `id`, `name`, `userid`, `time` AS timestamp FROM #__fb_messages WHERE `thread`=$thread ORDER BY time DESC LIMIT 1\"«»);
$lastpost = $database->loadObjectList();
if($lastpost[0]->userid == $my->id) {
$mesid = $lastpost[0]->id;
$time = date(\'Y-m-d H:i:«»s\');
$message = $database->Quote($message);
$database->setQuery(\"UPDATE #__fb_messages_text SET message=concat(message, \'\\n\\n$time\\n\',$message) WHERE mesid=\'$mesid\'\"«»);
$database->query();
} else {
// usual post message
}

[/code:1]
#22181
Double post automerge 10 Years ago  
This is my modification to automerge double post. The 2nd and next messages are separated by posting date.

Example:
[code:1]
i really like him too ..his so cute and unhappy!!!!!!!!

2007-09-09 18:41:57
vampires are so romantic!!!!!!!!!

2007-09-09 18:42:29
vampires are so romantic!!!!!!!!!
[/code:1]

Code highlight
[code:1]
// roel: double post checker
$database->setQuery(\"SELECT `id`, `name`, `userid`, `time` AS timestamp FROM #__fb_messages WHERE `thread`=$thread ORDER BY time DESC LIMIT 1\"«»);
$lastpost = $database->loadObjectList();
if($lastpost[0]->userid == $my->id) {
$mesid = $lastpost[0]->id;
$time = date(\'Y-m-d H:i:«»s\');
$message = $database->Quote($message);
$database->setQuery(\"UPDATE #__fb_messages_text SET message=concat(message, \'\\n\\n$time\\n\',$message) WHERE mesid=\'$mesid\'\"«»);
$database->query();
} else {
// usual post message
}

[/code:1]
#23836
Re:Double post automerge 10 Years ago  
babiasu.. where does this code go and what does it replace (line number etc?)

cheers

leigh :D
#23909
Re:Double post automerge 10 Years ago  
Sorry, I forgot :D

file: post.php
line 176, after
[code:1]
if (!$is_moderator)
{
$database->setQuery(\"SELECT review FROM #__fb_categories WHERE id=$catid\"«»);
$holdPost = $database->loadResult();
}
[/code:1]

Please be careful of putting closing bracket [i]}[/i] because the [i]else[/i] part of the code is enclosing quite large amount of code.
#46324
Re:Double post automerge 9 Years, 6 Months ago  
So does this work?
#46325
Re:Double post automerge 9 Years, 6 Months ago  
I don\'t know. Have you tried it?
Page: 1