|
Re:Split | Merge | Move topics 8 Months ago
|
|
|
dogsbody wrote:
Fair enough, thanks for clarifying.
As far as I am concerned I am only interested in supporting this if it was something that would get rolled up into Fireboard. If another developer were doing this I feel it would then have to be done twice to integrate fully. The Fireboard (and previous Joomlaboard / Simpleboard) developers have done a fantastic job creating this product and totally for free giving huge amounts of their free time and energy, it's the least we can do to help them out with code that can be put straight back into Fireboard. This is what open source is all about as far as I am concerned.
This is just my 0.02 GBP, just clarifying my views.
I don't understand your logic I understand the devs put a lot of time in, I fully apreciate this,Iv given the devs an oppotunity to take this over with no response, this code will be open source anyone once developed will be able to use it in fireboard, i thought that was the point.
This feature is for people who want Split | Merge | Move topics and need, im saying hopefully the fireboard will put the code into the offical version helping everyone so they don't have to hack the code themselves, this in actual fact would help the dev team as there is even less work for them to do, as this a must for any forum in my eyes, I'm only making an effort to try get a feature implemented which no one is aware wil be released sooner or later or at all.
The bottom line is Im only trying but whats the point....
|
|
|
Logged
|
|
|
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Split | Merge | Move topics 8 Months ago
|
|
I not knocking you, your absolutely right, this is open source so the code is available and if you want to add a feature then you go for it 
|
|
|
Logged
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Split | Merge | Move topics 8 Months ago
|
|
|
patronising?
Don't worry i'll just sit around and wait like everyone else
|
|
|
Logged
|
|
|
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Split | Merge | Move topics 8 Months ago
|
|
Not at all! Sorry, I was just trying to explain
Go for it! 
|
|
|
Logged
|
|
|
The administrator has disabled public write access.
|
|
|
Merge threads implemented 7 Months, 4 Weeks ago
|
|
OK, let's revive this thread a little. Can anyone tell me if the latest 1.0.4 stable version of Fireboard supports any of these advanced moderation functions so I won't feel like I'm wasting my time?
In any case, I've started implementing them from the easiest one: merge threads. Tested on 1.0.1 but it should work on later versions because it's basically a mod of the existing "move" function.
This integration into the front end will allow moderators to access the merge function in the same way as they now use "move." Here's the How-To:
1. In english.php, paste:
| Code: |
DEFINE('_GEN_MERGE', 'Merge');
DEFINE('_POST_MERGE_TOPIC', 'Merge this thread with');
DEFINE('_POST_MERGE_GHOST', 'Leave ghost copy of thread');
DEFINE('_POST_SUCCESS_MERGE', 'Thread merged successfully.');
|
2. In view.php, after the lines:
| Code: |
{
$msg_edit .= _GEN_EDIT;
$showedEdit = 1;
}
$msg_edit .= "";
|
paste:
| Code: |
$msg_merge = "id . '&catid=' . $catid . '&name=' . $fmessage->name) . "\">";
if ($fbIcons['merge']) {
$msg_merge .= '";
}
else {
$msg_merge .= _GEN_MERGE;
}
$msg_merge.= "";
|
3. In message.php, after the lines:
| Code: |
if ($msg_move) {
echo " " . $msg_move;
}
|
paste:
| Code: |
if ($msg_merge) {
echo " " . $msg_merge;
}
|
Occurs twice.
4. And last but most important--the actual function(s)! In post.php, after the lines:
| Code: |
setQuery("SELECT id,subject FROM #__fb_messages WHERE parent = '0' AND catid=$catid AND id != $id"«»);
//$database->setQuery("SELECT a.*, b.name AS category" . "\nFROM #__fb_categories AS a" . "\nLEFT JOIN #__fb_categories AS b ON b.id = a.parent" . "\nWHERE a.parent != '0'" . "\nORDER BY parent, ordering"«»);
$threadlist = $database->loadObjectList();
// get topic subject:
$database->setQuery("select subject from #__fb_messages where id=$id"«»);
$topicSubject = $database->loadResult();
?>
:
:
$thread->subject ";
}
?>
setQuery("SELECT `subject`, `catid`, `time` AS timestamp FROM #__fb_messages WHERE `id`='$id'"«»);
$oldRecord = $database->loadObjectList();
$newSubject = _MOVED_TOPIC . " " . $oldRecord[0]->subject;
$database->setQuery("SELECT MAX(time) AS timestamp FROM #__fb_messages WHERE `thread`='$id'"«»);
$lastTimestamp = $database->loadResult();
if ($lastTimestamp == ""«») {
$lastTimestamp = $oldRecord[0]->timestamp;
}
//perform the actual merge
//see if you can move the first post to the target thread
$database->setQuery("UPDATE #__fb_messages SET `thread`='$targetid' WHERE `id`='$id'"«»);
if ($database->query())
{ //succeeded; attach first message to first post in target thread
$database->setQuery("UPDATE #__fb_messages set `parent`='$targetid' WHERE `id`='$id'"«»);
if ($database->query())
{
//Move the rest of the messages
$database->setQuery("UPDATE #__fb_messages set `thread`='$targetid' WHERE `thread`='$id'"«»);
$database->query();
// insert 'moved topic' notification in old forum if needed
if ($bool_leaveGhost)
{
$database->setQuery("INSERT INTO #__fb_messages (`parent`, `subject`, `time`, `catid`, `moved`) VALUES ('0','$newSubject','" . $lastTimestamp . "','" . $oldRecord[0]->catid . "','1')"«»);
if ($database->query())
{
//determine the new location for link composition
$newId = $targetid;
$newURL = "catid=" . $catid . "&id=" . $id;
$database->setQuery("INSERT INTO #__fb_messages_text (`mesid`, `message`) VALUES ('$newId', '$newURL')"«»);
if (!$database->query()) {
$database->stderr(true);
}
//and update the thread id on the 'moved' post for the right ordering when viewing the forum..
// $database->setQuery("UPDATE #__fb_messages SET `thread`='$newId' WHERE `id`='$newId'"«»);
/*
if (!$database->query()) {
$database->stderr(true);
}
*/
}
else
echo '' . _POST_GHOST_FAILED . '';
}
//move succeeded
echo '' . _POST_SUCCESS_MERGE . '';
echo '' . _POST_SUCCESS_VIEW . '';
echo '' . _POST_SUCCESS_FORUM . '';
echo '';
?>
setTimeout("location=''", 3500);
}
}
|
5. Enjoy!
|
|
|
Logged
|
|
Gossper - One Forum to Rule Them All
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Merge threads implemented 7 Months, 4 Weeks ago
|
|
Of course, the parser ate up my code, so here's the mod again in a file attachment.
|
|
|
Logged
|
|
Gossper - One Forum to Rule Them All
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Split | Merge | Move topics 7 Months, 4 Weeks ago
|
|
|
No current way in .4 to split, merge, copy, or move individual replies to threads (only the entire thread gets moved).
|
|
|
Logged
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Split | Merge | Move topics 7 Months, 4 Weeks ago
|
|
|
Excellent. So I'm not wasting my time here.
I wonder how many people would be interested in adding "prepend" and "append" options to the merge function? Right now, the thread tree gets attached to the first post (merge) of the target thread but it can easily be reversed (prepend), or the first post of the old thread can be attached to the last post of the target thread (append).
|
|
|
Logged
|
|
Gossper - One Forum to Rule Them All
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Split | Merge | Move topics 7 Months, 4 Weeks ago
|
|
|
Thanks so much gomjabbar Im going to test this asap!
I wonder how many people would be interested in adding "prepend" and "append" options to the merge function? Right now, the thread tree gets attached to the first post (merge) of the target thread but it can easily be reversed (prepend), or the first post of the old thread can be attached to the last post of the target thread (append).
I would be!
|
|
|
Logged
|
|
|
Last Edit: 2008/01/10 22:26 By blakey87.
|
|
|
|
|
|
The administrator has disabled public write access.
|
|
|
Re:Split | Merge | Move topics 7 Months, 4 Weeks ago
|
|
|
My thought is to pack as many features into things as possible. As long as they can be turned off and on per prefernce of the user.
|
|
|
Logged
|
|
|
The administrator has disabled public write access.
|
|
|