I am trying to add an email address field to the standard usercomments snippet. I created a chunk called ’guestbookdisplaytpl’ and a chunk called ’guestbookformtpl’. Here is the code:
guestbookdisplaytpl:
[+UID:[+uid+]+]<div[+postclass+]>
<div[+numberclass+]>
[+postnumber+]
</div>
<div[+titleclass+]>
<strong>[+subject+]</strong><span>[+user+], [+email+]; [+createdon+]</span> <!-- Added Email reference -->
</div>
<div class="content">
[+comment+]
</div>
</div>
guestbookformtpl:
<form method="post" action="[~[*id*]~]">
<input name="[+tagname+]" type="hidden" value="on" />
Email Address:
<input name="email" type="text" size="30" />
<!-- Added Email Field -->
Subject:
<input name="subject" type="text" size="40" value="" />
Comment:
<textarea name="comment" cols="50" rows="8"></textarea>
<input name="send" type="submit" value="Submit" />
</form>
The code I am using to call this is:
[[UserComments? &makefolder=’1’ &formtpl=’guestbookformtpl’ &displaytpl=’guestbookdisplaytpl’ ]]
For some reason, the usercomments snippet will not accept the &displaytpl and the &formtpl arguments. The form on my page does not show the email address field.
What is wrong here?
-Joshua
PM me to find out how you can get a FREE ipad 2!
I’m having the exact same problem. The output is not reflecting even the change I made in the display template to the class of the comment:
Here’s what I have:
display template:
[+UID:[+uid+]+]<div[+postclass+]>
<div[+numberclass+]>
[+postnumber+]
</div>
<div[+titleclass+]>
<strong>[+subject+]</strong><span>[+user+] [+createdon+]</span>
</div>
<div class="commentbody">
[+comment+]
</div>
</div>
Call of comments snippet:
[!UserComments? &canpost=`RegisteredUsers` &displaytpl=`CommentsDisplay` &postcss=`commentpost` &titlecss=`commenttitle` &numbecss=`commentnumber`!]
Even the change of the class where the comment is displayed isn’t reflecting in the output! PLEASE somebody let me know what’s wrong here- I’ve poured over the documentation that has been referenced many times, and I still cannot get this to output so I can style the comments!