Firefox PHP

Module: Move message(s)

Posted by sdbbs 
All files from this thread

File Name File Size   Posted by Date  
move_message.0.0.1.zip 190.1 KB open | download sdbbs 10/18/2009 Read message
Module: Move message(s)
October 18, 2009 12:12PM
Hi all,

Well, my boss wasn't really pleased with the default facilities for moving messages around in Phorum5, so here is an AJAX based attempt I tried to cook up:



The readme:

Move message v.0.0.1

Adds a "Move message(s)" link (for administrators) - and corresponding AJAX functionality.

A multi-item selection of messages from a source thread can be made, to:
* be moved either as a separate thread in any forum
* Or be moved as child posts of another thread in any forum, at an arbitrary position.

There is a textual preview of the effect of the move of messages in both source and destination thread. (Note that the preview will not necesarrily correspond with the final look of the threads after move, as different sorting could be applied). The colors used for the text preview can be changed in move_message.css. The textual preview currently als displays message ids of each post (as in the database).

If you find the top-down arrangement of Source, then Preview, and then Destination - it was done so that there are increased chances of always having the Preview part in view, regardless if the user is working on thread or destination (in any case, this order should be easily editable in the template).

Note, this plugin is bound to changes being made in individual templates being used for phorum5. No hacks are needed, however, for the main phorum5 engine - the plugin is standalone.

Almost the entire communication of client and server is done in JavaScript, so obviously using this plugin requires JavaScript permissions in your browser. The plugin has been briefly tested with Firefox 3.5 and IE6 on WinXP.


=== Installation: ===

* copy these contents of this folder, in a new folder phorum5/mods/move_message/:
** info.txt,
** move_message.php,
** move_message.css,
** move_message_tools.js,
** settings.php
* Copy move_message_page.php to your phorum5/ folder
* Copy move_message_form.tpl to your phorum5/templates/emerald/ folder (or whatever template you use)
* Apply read_threads.tpl.diff to your read_threads.tpl file in your phorum5/templates/emerald/ folder (or whatever template you use) - this inserts a "move message" link, so you may also want to apply the same patch to other read*.tpl files

... and then enable from admin.php.
Attachments:
open | download - move_message.0.0.1.zip (190.1 KB)
Re: Module: Move message(s)
October 19, 2009 04:21AM
Without looking at the code, this seems a really nice module.
Did I get it right, that its a unified thread split/merge/move facility?

From the description I guess that these two points:
* Copy move_message_page.php to your phorum5/ folder
* Copy move_message_form.tpl to your phorum5/templates/emerald/ folder (or whatever template you use)

can easily avoided with using the addon hook.


Thomas Seifert
Re: Module: Move message(s)
October 19, 2009 04:57AM
Hi Thomas,

Thanks for the response !

Quote
Thomas Seifert
Did I get it right, that its a unified thread split/merge/move facility?

Yes, that is the idea - to be able to move a selection of messages from a thread - to either a new thread in its own right, or as children of existing thread, in any forum, with a single operation...

Quote
Thomas Seifert
From the description I guess that these two points:
* Copy move_message_page.php to your phorum5/ folder
* Copy move_message_form.tpl to your phorum5/templates/emerald/ folder (or whatever template you use)

can easily avoided with using the addon hook.

That sounds good - I was wandering how I could avoid those copies :) Thanks for the tip - I'll take a look at it ...

Cheers !
Re: Module: Move message(s)
April 21, 2010 09:22AM
I have tried to use it but it doesn't work.

I have copied the files in the specific folders, I used IE8 and Then OPERA with Javascript but I am the administrator but I have not got the possibilty to move message, I have not new message or link to do it ?
Re: Module: Move message(s)
September 18, 2010 02:41PM
Hi,
This seems to be a nice concept. But the even after following the guidance exactly (i.e. even adding that extra piece of code in every read* file it didn't work for me. The problem seems to be with the code to display the link i think. May be with some minor correction it might work. Being an excellent idea (and since I too need this functionality in my forum), I would love to get this module working. The following is the code "Sdbbs" (the developer of the module) is asking us to add to every read* file at appropriate position.
{! no IF MOVE_MESSAGE - must put php define into a local var first, to do an IF }
{VAR MOVEMSG MOVE_MESSAGE} 
{IF MOVEMSG}
		<a class="icon icon-comment-delete" href="{MESSAGE->URL->MOVE_MESSAGE}">Move Message(s)</a>
{/IF}
I note that the code to display the link is within an IF. i.e. if the variable given above VAR MOVEMSG is not defined the link is not going to show up. Most possibly this is what happening to me as well. Being a non programmer, I failed to understand the the comment line "IF MOVE_MESSAGE - must put php define into a local var first"; I don't know how to do it or where it should be done.
Can someone please help me to get this issue fixed and get this module working please?
Regards,
Sreenadh
Sorry, only registered users may post in this forum.

Click here to login