Guest Posted May 13, 2010 Share Posted May 13, 2010 Hi,Is it possible to let the Product comments textarea showing there both without login or login and only login member can comment?Any idea plz? >{if $logged == true} <input style="margin:auto;" class="button_large" type="button" id="addCommentButton" value="{l s='Add a comment' mod='productcomments'}"></p> <form action="{$action_url}" method="post" class="std" id="sendComment" style="display:none;"> X {l s='Add a comment' mod='productcomments'} {if $criterions|@count > 0} </pre> <table border="0" cellspacing="0" cellpadding="0"> <input type="hidden" name="id_product_comment_criterion_{$smarty.section.i.iteration}" value="{$criterions[i].id_product_comment_criterion|intval}" /> {$criterions[i].name|escape:'html':'UTF-8'} <input class="star" type="radio" name="{$smarty.section.i.iteration}_grade" id="{$smarty.section.i.iteration}_grade" value="1" /> <input class="star" type="radio" name="{$smarty.section.i.iteration}_grade" value="2" /> <input class="star" type="radio" name="{$smarty.section.i.iteration}_grade" value="3" checked="checked" /> <input class="star" type="radio" name="{$smarty.section.i.iteration}_grade" value="4" /> <input class="star" type="radio" name="{$smarty.section.i.iteration}_grade" value="5" /> </table> <br> {/if}<br><p><textarea cols="50" rows="5" name="content" id="content"></textarea></p> <br><p> <input class="button" name="submitMessage" value="{l s='Send' mod='productcomments'}" type="submit" /> </p> <br><br></form><br>{else}<br><p>{l s='Only registered users can post a new comment.' mod='productcomments'}</p> <br Link to comment Share on other sites More sharing options...
Guest Posted May 13, 2010 Share Posted May 13, 2010 Can anyone helps with this? Link to comment Share on other sites More sharing options...
rocky Posted May 14, 2010 Share Posted May 14, 2010 You'll need to {* comment out *} the following code on lines 3-17 of modules/productcomments/productcomments.tpl: [removed] $(function(){literal}[spam-filter]/literal} $('input[@type=radio].star').rating(); {literal[spam-filter]{/literal}); $(function(){literal}[spam-filter]/literal} $('.auto-submit-star').rating({literal}[spam-filter]/literal} callback: function(value, link){literal}[spam-filter]/literal} {literal[spam-filter]{/literal} {literal[spam-filter]{/literal}); {literal[spam-filter]{/literal}); //close comment form function closeCommentForm(){ldelim} $('#sendComment').slideUp('fast'); $('input#addCommentButton').fadeIn('slow'); {rdelim} [removed] and the following on line 67: <input style="margin:auto;" class="button_large" type="button" id="addCommentButton" value="{l s='Add a comment' mod='productcomments'}"></p> and the following on line 70: X then change line 68 from: <form action="{$action_url}" method="post" class="std" id="sendComment" style="display:none;"> to: <form action="{$action_url}" method="post" class="std" id="sendComment"{* style="display:none;"*}> Link to comment Share on other sites More sharing options...
Guest Posted May 14, 2010 Share Posted May 14, 2010 Dear ROCKY,It is ok now !Million thanks for your great contribution! Link to comment Share on other sites More sharing options...
rocky Posted May 14, 2010 Share Posted May 14, 2010 Glad I could help. Please edit your first post and add [sOLVED] to the front of the title. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now