-
AuthorPosts
-
March 9, 2011 at 3:37 pm #161228
I would like to know whether it would be possible to add some custom fields to the comment form.
I need to add a radio group or a list, from which the user would have to choose one option before he can post his comment.
I would also like (but it’s less important) to add a checkbox where the user could subscribe to the newsletter.
Would that be possible?
nghiatd Friendnghiatd
- Join date:
- October 2009
- Posts:
- 324
- Downloads:
- 0
- Uploads:
- 8
- Thanks:
- 7
- Thanked:
- 39 times in 37 posts
March 10, 2011 at 4:00 am #380644Hello,
If you want to add a radio group or a list,
lease open file addnew.php in your jacomment theme (Default in link com_jacommentthemesdefaulthtmlcommentsaddnew.php), then you could find the code:
<!-- BEGIN - TERM AND CONDITION -->
<?php if($isEnableTerms) { ?>
<li class="clearfix">
<div id="jac-terms" style="clear: both" class="checkbox">
<label class="jac-terms-confirm choice" for="chkTermsAddnew">
<input type="checkbox" name="chkTermsAddnew" id="chkTermsAddnew" tabindex="7"/> <?php echo JText::_("I have read, and agree to abide by the");?> <a onclick="showWebsiteRules('<?php echo JText::_("Website rules");?>')" href="#" class="jac-link-website-rules" title="<?php echo "Website rules";?>"><?php echo JText::_("Website rules.");?></a>
<div id="err_TermsAddnew" style="color: red;"></div>
</label>
</div>
</li>
<?php } ?>
<!-- END - TERM AND CONDITION -->
And add your code after it.@user could subscribe to the newsletter
Please find the function [PHP]function addNewComment(){[/PHP] in file componentscom_jacommentcontrollerscomments.php to add your code to subscribe to the newsletter.Best Regards.
March 28, 2011 at 2:44 pm #383669Thank you very much
July 4, 2011 at 2:34 pm #399813<em>@nghiatd 226751 wrote:</em><blockquote>Hello,
If you want to add a radio group or a list,
lease open file addnew.php in your jacomment theme (Default in link com_jacommentthemesdefaulthtmlcommentsaddnew.php), then you could find the code:
<!-- BEGIN - TERM AND CONDITION -->
<?php if($isEnableTerms) { ?>
<li class="clearfix">
<div id="jac-terms" style="clear: both" class="checkbox">
<label class="jac-terms-confirm choice" for="chkTermsAddnew">
<input type="checkbox" name="chkTermsAddnew" id="chkTermsAddnew" tabindex="7"/> <?php echo JText::_("I have read, and agree to abide by the");?> <a onclick="showWebsiteRules('<?php echo JText::_("Website rules");?>')" href="#" class="jac-link-website-rules" title="<?php echo "Website rules";?>"><?php echo JText::_("Website rules.");?></a>
<div id="err_TermsAddnew" style="color: red;"></div>
</label>
</div>
</li>
<?php } ?>
<!-- END - TERM AND CONDITION -->
And add your code after it.@user could subscribe to the newsletter
Please find the function [PHP]function addNewComment(){[/PHP] in file componentscom_jacommentcontrollerscomments.php to add your code to subscribe to the newsletter.Best Regards.</blockquote>
Nice pice of script, much required ! 🙂
-
AuthorPosts
This topic contains 4 replies, has 3 voices, and was last updated by peterjones1234 13 years, 4 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum