Forums / Developer / Create custom comments/review

Create custom comments/review

Author Message

Eric Goldman

Thursday 13 May 2010 8:19:34 pm

Hello all,

I have been experimenting with Ez for the past week, and overall, I really like how the system is coded underneath - it really seems it just a matter of figuring out what goes where.

One of the main things I want to with EZ is create custom content types and have related content. What I want to do is have a special type of article, which is a db entry that will have specific information about a product, I then want to create a specific review attached to each of these types. 

The review should be just like comments at the bottom of an article, but with some more fields and allow ratings based on various criteria (not just one set of stars). It would also be good if there was the ability to tally up these multi-factor scored and present and overall review, but maintain the individual components of each reviews score. 

I tried to find some documentation, but it was not very clear or easy to follow and I have difficulty telling which articles are current and applicable for 4.3, a lot of the documentation is very old. I think I more or less just want to clone the comments for the most part but I guess also create a clone of article that has a "enable review" instead of "enable comment" checkbox.

Can someone point me in the right direction with current documentation, or tell me which files I need to look at to work on the cloning? Is it also possible to have anonymous users submit these reviews? 

Doug Brethower

Friday 14 May 2010 6:07:39 am

Welcome!

Yes the quality of the code is what intrigues. And the pace of innovation is scorching.

The documentation has difficulty keeping up. eZ is not the only innovator with this problem. Coders are working too fast for writers to keep up ;~}

If I understand correctly, a new class is a pointer in the right direction.

Admin login then Setup->Classes->Content and copy the article or documentation class, add remove fields as you wish.

When saved, the new class I think is immediately available, if not clear caches and it should be ready to use.

More on creating new classes..

http://webportalmaster.com/index.php/eng/eZ/HowTo/Create-a-Kindergarten-class-in-eZ-Publish

http://www.youtube.com/watch?v=o5eR98nGqTg --full screen it

Cheers!

Doug Brethower
Apple Certified Technical Consultant, Southwest, MO USA
http://share.ez.no/directory/companies/lakedata.net

Eric Goldman

Saturday 15 May 2010 2:28:16 pm

Thanks for the start . I had figured out how to create the classes with the wizard, my big issue was getting all the php and form files to come out correctly, I figure I just missed something in a tutorial.

The big issue which does not seem to be covered well at all was getting users to be able to submit from the frontend without being "authors" on the site and tying the reviews to other classes. I had read one tutorial but it was confusing between information collector and not - he said he was doing one thing, but then he later changed his mind, would tell you to edit files without referring to the needed file names, etc.

eZ debug

Timing: Jan 17 2025 22:49:07
Script start
Timing: Jan 17 2025 22:49:07
Module start 'content'
Timing: Jan 17 2025 22:49:08
Module end 'content'
Timing: Jan 17 2025 22:49:08
Script end

Main resources:

Total runtime1.0142 sec
Peak memory usage4,096.0000 KB
Database Queries194

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 588.8281180.8359
Module start 'content' 0.00680.9047 769.6641546.2109
Module end 'content' 0.91150.1026 1,315.8750336.9063
Script end 1.0141  1,652.7813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.4039210.0002
Check MTime0.00150.1485210.0001
Mysql Total
Database connection0.00110.108210.0011
Mysqli_queries0.951393.80121940.0049
Looping result0.00160.15471920.0000
Template Total0.985297.120.4926
Template load0.00230.229720.0012
Template processing0.982896.909020.4914
Template load and register function0.00020.018910.0002
states
state_id_array0.00100.103210.0010
state_identifier_array0.00110.108720.0006
Override
Cache load0.00190.1909240.0001
Sytem overhead
Fetch class attribute can translate value0.00100.101730.0003
Fetch class attribute name0.00080.080040.0002
XML
Image XML parsing0.00100.096030.0003
class_abstraction
Instantiating content class attribute0.00000.000840.0000
General
dbfile0.00230.2277280.0001
String conversion0.00000.000430.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
3content/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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs