Home › Forums › Calendar Products › Community Events › Masking Email address field
- This topic has 10 replies, 3 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
December 5, 2012 at 10:22 pm #29026
Tran
ParticipantHello, when someone posts an event, it has an optional Email field. If you enter in your email, it will publish it as part of the event. I need a way to either mask it or encrypt it like on Craigslist you know how it changes it to 5545y285h8tr0@craigslist when you try to reply? Is there a way to mask or encrypt or any way around this for privacy/spam issues, I don’t want to publicly publish anyone’s email address. Thank you
December 6, 2012 at 7:08 am #29045Casey
ParticipantTran,
Thanks for reaching out! You can remove the Organizer email address by editing the Single Event Template.In order to do this, you’ll first need to perform a Template Override (https://theeventscalendar.com/what-are-template-overrides-and-how-do-i-do-them/). Once you’ve done that, find the ‘single.php’ file in your new Events folder and edit line 48 (this code: https://gist.github.com/4225116) to mask or encrypt the email as you wish.
Here’s a great PHP function that will encrypt the email using Javascript like you’re wanting to do: http://www.maurits.vdschee.nl/php_hide_email/
Let me know if that helps to solve your issue. Thanks!
December 8, 2012 at 9:28 am #29164Tran
ParticipantHi Casey,
Thank you for getting back to me. I’m new to WordPress and still need further help. Can you please help me with a couple of questions?1. How do I do the Template Override. I read that link but still unclear.
2. Where do I add the function? I.e. I would need to know where in the single.php the encryption function should be inserted
3. How that function is called by editing line 48December 10, 2012 at 7:35 am #29186Casey
ParticipantTran,
The instructions of how to do a template override are in the second paragraph:“If you would like to alter the stylesheet or any of the templates, simply create a new folder labeled “events” in your theme directory and copy over any of the files from within the plugin’s views folder (wp-content/plugins/the-events-calendar/views/).”
You can add that function I referenced in your functions.php file in your theme directory, then you should be able to do something like this on line 48: https://gist.github.com/4225116
Let me know if that helps clear things up. Thanks!
December 17, 2012 at 7:20 am #29610Casey
ParticipantTran,
Just checking back in. Were you able to get this resolved? Just let me know and I’ll close out this thread. Thanks!December 18, 2012 at 10:51 pm #29756Tran
ParticipantHi Casey,
Sorry. I still haven’t figured it out. The second answers you gave were very similar to your first response. I just started learning WordPress at the end of November this year and have no prior knowledge of web design. Can I give you my log in to my WordPress website page and you can do it for me? I can pay you extra for the little tweak. Or can you send me the screen shots on where to go/what to type in?
Thank you so much in advance.December 19, 2012 at 9:22 am #29776Casey
ParticipantTran,
If you give me FTP access to your site, I’d be happy to get this working for you. Thanks!December 19, 2012 at 9:24 am #29777Casey
ParticipantTran,
Please send the FTP credentials to pro (at) tri.be and I’ll see what I can do. Thanks!December 19, 2012 at 10:43 am #29779Tran
ParticipantThank you so much Casey. I just sent it. Cheers
December 20, 2012 at 10:47 am #29854Casey
ParticipantTran,
This is completed. Take a look at this test event here: http://www.minglebuds.com/event/test-event/You’ll notice that you can still see the email address, but if you view the page source, you’ll see this code where the email address displays:
https://gist.github.com/4347622
This prevents spam-bots from being able to view the email address. It’s important to note that users who do not have JavaScript enabled will not be able to view email addresses either.
Hope that helps! Let me know if you have further questions, or if this solves your issue. Thanks!
July 7, 2015 at 6:26 am #978350Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Masking Email address field’ is closed to new replies.
