How users create a object

Author Message

Raphael Passini

Wednesday 21 November 2007 5:15:54 am

Hi,

I need to do a subscription on a event.
I heave a class called "subscription" then i need create object of this class INTO a specified event, but this need do by the user (trought the from or link).

Anyone heave an idea?

PS: Sorry my engish :(

luca maroni

Sunday 25 November 2007 11:11:31 am

Hi,

if I understood well you need to create a button on the template event allowing users to create a new subscription object. If Yes I think you can find the information you need here:

http://ez.no/ezpublish/documentation/customization/tips_tricks/editing_creating_and_removing_content_from_the_user_page

briefly you need to add a code like this into your template:

  <form method="post" action={"/content/action"|ezurl}>
    <input type="hidden" name="NodeID" value="{$node.node_id}" />
    <select type="hidden" name="ClassID" value="_SUBSCRIPTION_CLASS_ID_">
    <input type="submit" name="NewButton" value="subscribe event" />
  </form>

Ciao
Luca

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 18 2025 11:20:41
Script start
Timing: Jan 18 2025 11:20:41
Module start 'layout'
Timing: Jan 18 2025 11:20:41
Module start 'content'
Timing: Jan 18 2025 11:20:42
Module end 'content'
Timing: Jan 18 2025 11:20:42
Script end

Main resources:

Total runtime0.8823 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 589.3438152.6250
Module start 'layout' 0.00570.0028 741.968839.4453
Module start 'content' 0.00850.8724 781.4141459.7500
Module end 'content' 0.88090.0014 1,241.16418.1641
Script end 0.8823  1,249.3281 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3651160.0002
Check MTime0.00140.1546160.0001
Mysql Total
Database connection0.00080.086610.0008
Mysqli_queries0.840195.2117540.0156
Looping result0.00060.0637520.0000
Template Total0.848396.120.4242
Template load0.00190.215220.0009
Template processing0.846495.933020.4232
Template load and register function0.00020.022310.0002
states
state_id_array0.00100.112210.0010
state_identifier_array0.00140.160720.0007
Override
Cache load0.00150.1644160.0001
Sytem overhead
Fetch class attribute can translate value0.00120.131420.0006
Fetch class attribute name0.00120.139120.0006
XML
Image XML parsing0.00020.024020.0001
class_abstraction
Instantiating content class attribute0.00000.001220.0000
General
dbfile0.00070.0741100.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs