Jump to content

[Solved]Product comments module - how to make the textarea stay / sticky there?


Guest Steven_king

Recommended Posts

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

23467_mF00GmBKMVCaKgfrRLAl_t

Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...