In the Forums: Show Email Address in Comments
In the forums, “Frychiko” asked if it’s possible to display a user’s email address with their comment.
I was wondering if it is possible to display an email address for each comment displayed under an weblog post.
I run weekly giveaways and it is quite annoying having to find emails by SQL queries in the admin section of the control panel. Last time I checked the documentation there was no option to display the email address.
Mark Bowen came up with a simple query using the Query Module to fetch the email address of the commenter.
My suggestion would be to wrap that email address in a conditional that only displays it for Super Admins and not the entire world (including spammers).
Share on Twitter
Mark Bowen — 11:29 on 05.12.2009
Hi Ryan,
Yep definitely an idea that although I purposely left out any additions just so that it would be easy to see what is going on with the query and everything else. I also only placed in the variables for the email and url instead of all the html required too. At first I wrote the whole lot out but looking at it all myself it started to get quite heavy so thought it best to leave it at the bare minimum of code just so that what I had done could be seen.
Agree with you though that the e-mail could be hidden and would probably be a good idea. I wasn’t sure from the OP whether or not this is what they wanted though.
Best wishes,
Mark