Buck Anderson - DNN Professor Member Login
February 04, 2012

ForumsDNN Professor Forums

DotNetNuke Forums | Xmod Forums | Internet Marketing Forums | DNN Professor Product Forums

Product Support and Product Forums Registration


Subject: Ratings/Review
Prev Next
You are not authorized to post a reply.

Author Messages
jakeman35User is Offline

DNN Newbie
DNN Newbie
Posts:7
Send This Member a Private Message

05/14/2010 4:56 AM  

Is it possible to limit the ability to submit a review only to registered users?  Thank you

Buck AndersonUser is Offline

DNN Master
DNN Master
Posts:657

Send This Member a Private Message

05/14/2010 10:50 AM  

Hi Jake,

The information on the AllowComments attribute of the XMod Comments control is not very clear as to what values can be added. The default is allowcomments="all".

You may want to check with Kelly Ford, developer of Xmod, as to additional values that this control allows.

You could wrap the two instances of the xmod:comments, on the detail template, with xmod:select template controls based on a comparetype attribute of role.

Example: (Note: arrows have been replaced with brackets for viewing on this post)

[xmod:select mode="standard"]
[case value="[xmod:field name="ShowComments" usevalue="true"/]" operator="[]" expression="no" ignorecase="true" comparetype="text"]
[br /]
[xmod:select]
  [case operator="=" expression="Registered Users" comparetype="role"] 
 
[div style="width: 550px; text-align: left;"]
  [xmod:comments commentsdisplay="5" allowcomments="all" numbercomments="5" commentsfrequency="minute" sortorder="NewestFirst" requireapproval="true"]

    [itemtemplate]
      [span][div style="background-color: white; margin-top:15px; margin-left:15px; margin-right:15px; text-align: left;" class="UserComment"] [strong]{username}'s Rating: {ratingvalue}[/strong] - {postdate}[/div][/span]
      [span][div style="background-color: white; margin-left:15px; margin-right:15px; text-align: left;"]{comment} [br /][br /][/div][/span]
    [/itemtemplate]

    [alternatingitemtemplate]
      [span][div style="background-color: whitesmoke; margin-top:15px; margin-left:15px; margin-right:15px; text-align: left;" class="UserComment"] [strong]{username}'s Rating: {ratingvalue}[/strong] - {postdate} [/div][/span]
      [span][div style="background-color: whitesmoke; margin-left:15px; margin-right:15px; text-align: left;"]{comment} [br /][br /][/div][/span]
    [/alternatingitemtemplate]

    [header]
      [div class="dnnpHead"][image style="vertical-align: middle;" src="/Portals/0/xmod/packages/BusinessDirectory/reviews-icon.jpg"/][xmod:if name="Company"][xmod:field name="Company" /] Reviews[/div]
    [/header]

    [editor style="width:500px; margin:10px;" height="100px" label="Your Review:" username="Your Name:"/]
    [submitbutton display="ImageButton" imageurl="/Portals/0/xmod/packages/BusinessDirectory/dnnp_submit_your_review.png" text="Submit Your Review" /]
    [pager enabled="true" nexttext="Next" prevtext="Previous" display="button" /]
  [/xmod:comments]
[/div] 
  [/case]
[/xmod:select]

[/case]
[else][/else]
[/xmod:select]

References:

XMod Online Help

XMod Comment Control

XMod Select Tag

 

 


Buck Anderson - DNN Professor

DNNprofessor.com


http://twitter.com/DNNprofessor


DotNetNuke - XMod Training Coach and XMod MVP


You are not authorized to post a reply.



ActiveForums 3.7

Copyright 2004 - 2012 by Jive Media Group LLC. All Rights Reserved.  | Terms of Use | Privacy Statement | Email White Listing | Site Map