Inform the user his comment is waiting for approval

Author Message

Patrice Fortin

Monday 24 September 2007 11:08:25 am

Hi people,

I created a site in which anonymous users can post comments on articles, but I want them to be approved before being published.

I created a workflow using ezapprove which allow a group of user to approve the comment before it is published (in the collaboration page).

The little tiny problem is that the anonymous user who post a comment is not notified that is comment is waiting for approval. So he is redirected to the article page and doesn't see his comment. What he does then? he post it again, and then thinks "comment posting doesn't work, this site is crap". (I guess he thinks that)

The best for me would be to redirect to the article on which I use a custom template starting with something like

{section show=$waiting_approval}
<div class="message-feedback">
<h2> {'Your comment is waiting for approval before being published.'|i18n( 'some/thing' )}</h2>
</div>
{/section}

But how can I set this $waiting_approval variable ??

Or maybe I can just add another event in the workflow before the ezapproval which shows a page to the user saying the comment is waiting for approval, and then let the workflow continue ??

What you think is the better way ? Or is there a easier way ?

Thanks
Patrice

Greg McAvoy-Jensen

Tuesday 27 November 2007 8:14:13 am

One very simple method is simply to change the "submit" button text to "Submit for Approval and Posting"; or just include a note above the submit button about the approval process.

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog

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

Main resources:

Total runtime1.0222 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.0052 588.1563152.6563
Module start 'layout' 0.00520.0034 740.812539.4922
Module start 'content' 0.00871.0121 780.3047529.1328
Module end 'content' 1.02070.0015 1,309.43758.1250
Script end 1.0222  1,317.5625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.3518160.0002
Check MTime0.00150.1481160.0001
Mysql Total
Database connection0.00060.056410.0006
Mysqli_queries0.969894.8764540.0180
Looping result0.00050.0504520.0000
Template Total0.991897.020.4959
Template load0.00210.202320.0010
Template processing0.989896.825020.4949
Template load and register function0.00020.020410.0002
states
state_id_array0.00160.160910.0016
state_identifier_array0.00090.087920.0004
Override
Cache load0.00170.1694170.0001
Sytem overhead
Fetch class attribute can translate value0.00100.100520.0005
Fetch class attribute name0.00240.237130.0008
XML
Image XML parsing0.00080.079320.0004
class_abstraction
Instantiating content class attribute0.00000.001230.0000
General
dbfile0.00080.0767180.0000
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
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.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: 11
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs