Forums / General / Own Messaging module

Own Messaging module

Author Message

Tim Achnitz

Friday 18 July 2003 2:33:29 am

Hi,
I'm trying to implement a possibility for users on my site to write messages to each other.

Therefore I started writing an own module. Is there any other easier way of doing it?
Of course it's not working correctly at the moment ;-)

Here I've got my module.php:
$Module = array( "name" => "Message" );

$ViewList["list"] = array ( "script" => "list.php",
"params" => array() );

$ViewList["create"] = array( "script" => "create.php",
"params" => array(),
"single_post_action" => array( "PostButton" => "Post" ) );

$ViewList["read"] = array( "script" => "read.php",
"params" => array( "MessageID" ) );

******************************************
create.php:

$http =& eZHTTPTool::instance();
include_once( "kernel/common/template.php" );
$module =& $Params['Module'];

//die ("before if");
if ( $module->isCurrentAction( 'Post' ) )
{
die ("if");

...and so on! But to me it seems, that here is the problem. Doesn't go into the if-case..
I don't know how important it is for finding the error, but I also publish the create.tpl here:

<form name="write" method="POST" action={"/message/create/"|ezurl}>
Neue Nachricht schreiben:<p>
To: <input type="text" name="empfaenger"><br>
Titel: <input type="text" name="titel"><br>
Text: <input type="text" name="body"><br>
<input type="submit" name="PostButton" value="Abschicken" />
</form>

Sorry, I'm not too familiar with eZ, especially things like this. Any help?

Thx,
tim

Jan Borsodi

Friday 18 July 2003 2:54:17 am

I would actually recommend using the collaboration system to do this, that way you get lots of code to reuse.
Currently there's only approval items available in the collaboration system, you can take a look at the code by opening the file
kernel/classes/collaborationhandlers/ezapprove/ezapprovecollaborationhandler.php

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq

Tim Achnitz

Friday 18 July 2003 3:51:07 am

Thanks for your reply. How do I have to use this? Can you give me the right approach?
Sorry I have no idea...