CE Gravatar
ExpressionEngine 2
Back to this add-on's main page
View Other Add-ons From Causing Effect
Issue when plugin is used inside exp:member:custom_profile_data
General (Resolved)
uuitservices
|
Posted: 13 June 2012 07:32 PM |
|
|
|
Aaron,
Thanks again for helping out with that image cache issues we had earlier! I was trying to use this plugin to show member gravatars. Because of the javascript mail encoding that occurs when {email} is used inside of this tag it is not escaping the Javascript that is being inserted into the image. We basically get a URL in the image HTML tag like this
<h2>Authors</h2> <ul> <li><a href="http://thelabatsacstate.com/playground/authors/34" title="Kyle Marks">
<img src="http://www.gravatar.com/avatar/410a53ee63801ef8db0cca43c2be5ad0</script>'}" alt="kmarks">
</a></li> <li><a href="http://thelabatsacstate.com/playground/authors/32" title="Kenji Enos">
<img src="http://www.gravatar.com/avatar/5ed04880ee361876e79ef232d55d6148</script>'}" alt="kenos">
</a></li> <li><a href="http://thelabatsacstate.com/playground/authors/33" title="Joel Felix">
<img src="http://www.gravatar.com/avatar/ff8a9963547c02cb140709f0d6e786e4</script>'}" alt="jfelix">
</a></li> </ul>
Is there any way you can make an update to make this work or should I be looking at a differnet method?
Here is the template code
{exp:member:custom_profile_data member_id="{embed:my_author}"}
<img src="{exp:ce_gravatar:single email='{email}' size='50' default='mm'}" alt="{username}">
{/exp:member:custom_profile_data}
Thanks!
|
|
|
Causing Effect - Aaron Waldon
|
Posted: 14 June 2012 04:08 AM |
# 1
|
|
Developer
|
Hi uuitservices!
I just took a look at the code, and it appears that the {email} variable for that method is now always encoded. Even more troublesome, is that a non-encoded alternative variable is *not* available.
I also cannot write a custom method to decode the JavaScript, because the code produced by the variable has curly braces that break the tag… I think it would be a good idea to contact EE in the forums or otherwise, and request that they make a variable for their module that provides access to the non-encoded email.
Sorry for the inconvenience, but there really is not much I can do here. You could easily add a core module hack, but that would make upgrading EE more cumbersome.
I just looked through Devot:ee, and it looks like this plugin will allow you to retrieve member information, and will not encode the email addresses, so that may be worth looking into as well. :)
|
|
|
uuitservices
|
Posted: 14 June 2012 12:14 PM |
# 2
|
|
|
Aaron,
Not a problem at all. I definitely understand. I really wish EE had an option or variable for plain text emails but I guess we will have to live within our means. I definitely appreciate you taking the time to research that plugin I will look into it. Consider the issue resolved.
Thanks!
|
|
|