Comment without pages intermediary

Author Message

Romain Bremaud

Monday 25 October 2010 8:10:44 am

Hello everybody.

I have a little problem. On my web site I have a section current events. I would like to authorize people to post comments. I found a solution but I'm not satisfied.

I use the following code on my current_event.tpl:

{if fetch( 'content', 'access', hash( 'access', 'create',  

 'contentobject', $node,  

'contentclass_id', 'comment' ) )}  

<form method="post" action={"content/action"|ezurl}>  

<input type="hidden" value="comment" />  

<input type="hidden" value="{$node.object.main_node.node_id}" />  

<input type="hidden" value="{ezini( 'RegionalSettings', 'ContentObjectLocale', 'site.ini')}" />  

<input class="button new_comment" name="NewButton" value="{'New comment'|i18n( 'design/ezwebin/full/article' )}" />  

  </form>  

{/if}

I would like to post my new comment directly on the current events page without pass by a intermediate page.

Somebody have an idea?

Thanks

Romain Bremaud
Les clefs du net

Ivo Lukac

Monday 25 October 2010 8:39:47 am

Did you try ezcomments extensions?

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Heath

Monday 25 October 2010 9:09:33 am

You may also do this simply with the ezjscore extension and some custom javascript to submit comments via javascript instead.

Cheers,

Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

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 16:22:21
Script start
Timing: Jan 18 2025 16:22:21
Module start 'layout'
Timing: Jan 18 2025 16:22:21
Module start 'content'
Timing: Jan 18 2025 16:22:22
Module end 'content'
Timing: Jan 18 2025 16:22:22
Script end

Main resources:

Total runtime0.9994 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0078 589.3516152.6250
Module start 'layout' 0.00780.0045 741.976639.4688
Module start 'content' 0.01230.9856 781.4453578.4922
Module end 'content' 0.99790.0015 1,359.937511.6250
Script end 0.9993  1,371.5625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3236160.0002
Check MTime0.00140.1421160.0001
Mysql Total
Database connection0.00140.137610.0014
Mysqli_queries0.944094.4560590.0160
Looping result0.00070.0666570.0000
Template Total0.965096.620.4825
Template load0.00210.210220.0011
Template processing0.962996.350820.4815
Template load and register function0.00020.024810.0002
states
state_id_array0.00130.125710.0013
state_identifier_array0.00150.145220.0007
Override
Cache load0.00170.1734180.0001
Sytem overhead
Fetch class attribute can translate value0.00070.074630.0002
Fetch class attribute name0.00240.237750.0005
XML
Image XML parsing0.00130.125530.0004
class_abstraction
Instantiating content class attribute0.00000.001050.0000
General
dbfile0.00450.4534240.0002
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
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/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: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs