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...

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 30 2025 21:38:05
Script start
Timing: Jan 30 2025 21:38:05
Module start 'layout'
Timing: Jan 30 2025 21:38:05
Module start 'content'
Timing: Jan 30 2025 21:38:06
Module end 'content'
Timing: Jan 30 2025 21:38:06
Script end

Main resources:

Total runtime1.0730 sec
Peak memory usage8,192.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 588.0078151.1953
Module start 'layout' 0.00610.0049 739.2031220.6719
Module start 'content' 0.01101.0610 959.87504,458.3594
Module end 'content' 1.07200.0010 5,418.234411.8750
Script end 1.0730  5,430.1094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.3513160.0002
Check MTime0.00130.1220160.0001
Mysql Total
Database connection0.00080.078710.0008
Mysqli_queries0.974690.8287570.0171
Looping result0.00070.0677550.0000
Template Total1.015194.620.5076
Template load0.00200.191020.0010
Template processing1.013194.411820.5065
Template load and register function0.00120.112110.0012
states
state_id_array0.00120.112110.0012
state_identifier_array0.00220.204720.0011
Override
Cache load0.00180.1679450.0000
Sytem overhead
Fetch class attribute can translate value0.00230.210220.0011
Fetch class attribute name0.00330.311640.0008
XML
Image XML parsing0.00140.130020.0007
class_abstraction
Instantiating content class attribute0.00000.001540.0000
General
dbfile0.00120.1144170.0001
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
14content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
14content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 34
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs