Search
Other Email Protector questions
Forum

Use an email address from custom field inside a button on a template override breaks the button

Kelsey Brookes's Avatar Kelsey Brookes
Hi there,

I'd wanted to set up a series of buttons "phone", "website", "email" for a directory built with custom fields.

The button structure looks like this:

<a href="mailto:<?php echo $customfield; ?>" class="btn">email</a>

However the EmailCloaker is injecting the obfuscation javascript into the href of the a tag and breaking the HTML.

Is there some way I can prevent this from happening?

Regards,

Kelsey
Peter van Westen's Avatar Peter van Westen ADMIN
Are you talking about the Joomla EmailCloaker or the Regular Labs Email Protector?

Do you have this online so I can take a look?
Please post a rating at the Joomla! Extensions Directory
Thomas Thrane's Avatar Thomas Thrane
Hope it's allright if ask here, since I have a similar question about extra fields in K2
I have this structure:

<a href="mailto:<?php echo $extrafields[28];?>"><?php echo $extrafields[28];?></a>

Where $extrafields[28] holds the email-adress, but the the HTML breaks this way.

You can have a look at sawo.thr.nu/da/om-sawo/ledige-job/vaerkstedschef-stovring at the bottom

Kind regards
Thomas
Peter van Westen's Avatar Peter van Westen ADMIN
Same question:
Are you talking about the Joomla EmailCloaker or the Regular Labs Email Protector?
Please post a rating at the Joomla! Extensions Directory
Thomas Thrane's Avatar Thomas Thrane
Sorry, Regular Labs Email Protector
Peter van Westen's Avatar Peter van Westen ADMIN
The url you gave gives a 404 page. So I cannot check...
Please post a rating at the Joomla! Extensions Directory
Thomas Thrane's Avatar Thomas Thrane
Sorry, had to change some things - correct url:
sawo.thr.nu/da/om-sawo/ledige-job/smed-r...s-til-sawo-humlebaek
Peter van Westen's Avatar Peter van Westen ADMIN
Looks like K2 is doing weird stuff with generating the output of those extrafields. And pushes them through the system plugins individually.
That means Email Protector only gets the string with the email address passed to it, out of context.

So this is more of a K2 issue.
Please post a rating at the Joomla! Extensions Directory
Thomas Thrane's Avatar Thomas Thrane
Ok thanks ... 🙁
Peter van Westen's Avatar Peter van Westen ADMIN
Can you give me (s)ftp access?
Maybe I can do something to prevent Email Protector from executing on those individual values till after it is placed in the html...

You can use the 'Hidden text' button in the forum editor to hide the confidential information.
Please post a rating at the Joomla! Extensions Directory
Thomas Thrane's Avatar Thomas Thrane
Sure!

Confidential information:
(hidden)

Site sawo.dk
If you need to look at the over ride:

templates/t3_bs3_blank/html/com_k2/Job/item.php
Peter van Westen's Avatar Peter van Westen ADMIN
Please try the latest development version from:
www.regularlabs.com/development-releases
Please post a rating at the Joomla! Extensions Directory
Thomas Thrane's Avatar Thomas Thrane
Perfect, works!

Thank you so much, Peter!
Thomas Thrane's Avatar Thomas Thrane
Bit to quick...
I get the same old issue here:

sawo.thr.nu/da/om-sawo/ledige-job
Thomas Thrane's Avatar Thomas Thrane
Hi Peter

Any chance you can solve the issue on sawo.thr.nu/da/om-sawo/ledige-job 🙂
Peter van Westen's Avatar Peter van Westen ADMIN
Please try the latest development version from:
www.regularlabs.com/development-releases
Please post a rating at the Joomla! Extensions Directory
Thomas Thrane's Avatar Thomas Thrane
Great, Peter!
Works like it should now, thanks a lot!
Thomas Thrane's Avatar Thomas Thrane
Hi Peter

Looks like this issue has reappeared after a K2 update, any chance you can fix this?

www.sawo.dk/da/om-sawo/ledige-job/smed-r...ygger-sawo-humlebaek
www.sawo.dk/da/om-sawo/ledige-job

The FTP access should still work 🙂

Kind regards
Thomas
Peter van Westen's Avatar Peter van Westen ADMIN
I'm not sure I appreciate and want to keep having to work around issues K2 caused when it changes things which are already non-Joomla standard ways of doing things.
Seems to me this is something K2 should solve. Your K2 update caused the issue. K2 has made itself incompatible.

You might be able to solve issues by changing the ordering of the plugins in question.
See: regularlabs.com/guides/242-plugin-order-is-important
Please post a rating at the Joomla! Extensions Directory
Thomas Thrane's Avatar Thomas Thrane
I understand, thank you Peter ...!
You can only post on this forum if you log in