Hello all,
I am trying to display a commenter’s Twitter URL, Facebook URL, and site URL, and avatar above every comment they make.
I also want to display a different message for banned members.
I got this code to work…but now, in 2.5.2, I’m noticing that it displays one way when I’m logged in, and doesn’t display any of that information when I’m logged out. Is this expected behavior for EE? (If so, I need to change my code. If not, I need to speak with the plugin developer.)
Here’s the code I’m using:
<div class="commenthead">{exp:member:custom_profile_data}
{if avatar}{avatar_url}{/if}
{if '{group_id}' != '2'}{url_or_email_as_author}
{if url != ''}<a href="http://{url}" target="_blank" rel="noopener">http://images.sparklecrackcentral.com/site_images/icon_32x32_site.png</a>{/if}
{if twitter != ''}<a href="https://twitter.com/{twitter}" target="_blank" rel="noopener">http://images.sparklecrackcentral.com/site_images/icon_32x32_twitter.png</a>{/if}
{if fb_page != ''}<a href="http://{fb_page}" target="_blank" rel="noopener">http://images.sparklecrackcentral.com/site_images/icon_32x32_facebook.png</a>{/if}
{/if}
{if '{group_id}' == '2'}{username} (Member has been banned){/if} ::
{comment_date format="%Y-%m-%d"}{/exp:member:custom_profile_data}
</div>Here are two screenshots: the first, the comment heading as it displays when I’m logged in. The second, as the same comment heading displays when I’m logged out. I want the comment masthead to display whether a user is logged in or logged out.
I *think* that this worked just as I expected it to, in EE 2.4. I didn’t check again after upgrading to EE 2.5.2. I am using the latest version of the Threaded Comments plugin (2.3.9).
Based on the code above, and the screenshots, is the current behavior expected for the code that I used, or is something going wrong?