Hi forum,
I’ve added a site address custom field (not a required field) to my comments form, which if entered turns the comment user name into a clickable URL to their site. It’s working, but at the moment the username is always a link, even if the commenter has not entered a URL. So what I want to do is to check if the field is empty first, and if yes then the username is not clickable (not a link), if no then the username stays as a link.
So I’m guessing what I need is some sort of conditional statement in the chunk.comment.inc.html, just before my <a href="http://[+comment.custom.webadd+]">.......
Here’s the code as it is now:
<div class="jot-user">
<a href="http://[+comment.custom.webadd+]">
[+comment.createdby:isnt=`0`:then=`<b>`+][+comment.createdby:userinfo=`username`:ifempty=`[+comment.custom.name:ifempty=`[+jot.guestname+]`:esc+]`+][+comment.createdby:isnt=`0`:then=`</b>`+]
</a>
<br />
</div>
If anyone can help me with this it would be greatly appreciated!
Preddz