Module

Developer
Supported

Threaded Comments

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Yuri Salimovskiy

     

You must be logged in to post.

Recently upgraded to EE2.5.2, now custom member data won’t show to logged-out visitors

Support Request

Lesli
Lesli

Hello,

I started using this plugin when I was on EE 2.4. I had some minor problems getting the information that I wanted to display, to show up how I wanted it to - but I came here, got advice on a different format to use in a tag, and it showed up.

I’ve recently upgraded to EE 2.5.2 and the same member data now does not display when a site viewer is logged out. I’ve attached two images showing the same comment and its response: once when I’m logged in, once when I’m logged out. I’ve checked this in Opera, Chrome, FF, and IE - same behavior.

Here is the code I am using:

<div class="commenthead">{exp:member:custom_profile_data}
{if avatar}
<img src="{avatar_url}" width="32" height="32" alt="{author}'s avatar">{/if}
{if 
'{group_id}' != '2'}{url_or_email_as_author} 
{if url 
!= ''}<a href="{url}" target="_blank"><img src="http://images.sparklecrackcentral.com/site_images/icon_32x32_site.png" width="32" height="32" alt="Visit {author}'s web site" /></a>{/if}
{if twitter 
!= ''}<a href="https://twitter.com/{twitter}" target="_blank"><img src="http://images.sparklecrackcentral.com/site_images/icon_32x32_twitter.png" width="32" height="32" alt="Follow {author} on Twitter" /></a>{/if}
{if fb_page 
!= ''}<a href="{fb_page}" target="_blank"><img src="http://images.sparklecrackcentral.com/site_images/icon_32x32_facebook.png" width="32" height="32" alt="Follow {author} on Facebook" /></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
Yuri Salimovskiy
# 1
Developer
Yuri Salimovskiy

Hello Lesli,

in your code I see only {exp:member:custom_profile_data} tag and no {exp:threaded_comments:display} tag

Are you sure the problem is related to Threaded Comments?

What is the full code that you use?

Lesli
# 2
Lesli

Hi Yuri,

Yes, it’s definitely in the Threaded Comments tag. I don’t know if it stopped working because of an EE change, or because the plugin was parsing tags in a way other than what they consider proper and so during a routine upgrade the plugin’s output and behavior was messed with.

Here’s the full code:

{if allow_comments}<div class="commentnote"><h4>&nbsp;</h4>{if logged_out}You must be <a href="{path='glitzerati/login'}">logged in</ato comment or reply. | <a href="{path='glitzerati/forgot_password'}">Reset Password</a> | <a href="{path='glitzerati/register'}">Register</a><br />
{exp:social_login:form return="comments/social-login"}
{providers}
<input name="provider" type="radio" value="{provider_name}" id="{provider_name}_button">
<
label for="{provider_name}_button"><img src="{provider_icon}" title="Log in using {provider_title}" /></label>
<
br />
{/providers}
<input type="submit" value="go" />
{/exp:social_login:form}{if:else}<a href="[removed]void(0)" class="reply btn-comment" rel="0">Comment</a>{/if}</div>{/if}

</div>{/exp:channel:entries}
{exp
:channel:entries channel="spc-about" limit="1" rdf="off" show_future_entries="no" status="open|Featured" require_entry="yes" track_views="one"}
<div class="breadcrumbs"><a href="/">Home</a> > {title}</div><h1>{title}</h1>
<
p>Posted on <time>{entry_date format='%l, %F %d, %Y'}</timeat <time>{entry_date format='%h:%i %A'}</time> &#8226; {view_count_one} views</p>

{exp:allow_eecode}<div class="imagethumb"><a href="{about_thumbnail_lg}" rel="shadowbox" title="{title}"><img src="{about_thumbnail}" alt="{title}" /></a></div>
{about_body}
{about_extended}{
/exp:allow_eecode}{/exp:channel:entries}

<br clear="all" />

<
a id="comments"></a>{exp:threaded_comments:display}
<ul id="comment-outer">
<
p>{comments}</p>{thread_start}
<ul>{/thread_start}
<li>
<
div class="commenthead" style="margin: auto 3px">{exp:member:custom_profile_data}{if avatar}<img src="{avatar_url}" width="32" height="32" alt="{author}'s avatar">{/if}{if '{group_id}' != '2'}{url_or_email_as_author} {if url != ''}<a href="{url}" target="_blank"><img src="http://images.sparklecrackcentral.com/site_images/icon_32x32_site.png" width="32" height="32" alt="Visit {author}'s web site" /></a>{/if}{if twitter != ''}<a href="https://twitter.com/{twitter}" target="_blank"><img src="http://images.sparklecrackcentral.com/site_images/icon_32x32_twitter.png" width="32" height="32" alt="Follow {author} on Twitter" /></a>{/if}{if fb_page != ''}<a href="{fb_page}" target="_blank"><img src="http://images.sparklecrackcentral.com/site_images/icon_32x32_facebook.png" width="32" height="32" alt="Follow {author} on Facebook" /></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>
<
p>{comment}</p>
<
div class="commentfoot">{if logged_in}<a href="[removed]void(0)" class="reply btn-reply" rel="{comment_id}">Reply</a> <a href="[removed]void(0)" class="quote reply btn-quote" rel="{comment_id}">Quote</a>{/if}</div>
</
li>
{thread_end}</ul>{/thread_end}{/comments}
</ul>{/exp:threaded_comments:display}
{exp
:threaded_comments:form}{if error}<div class="error">{error_text}</div>{if:else}
<textarea name="comment" id="comment-comment" cols="22" rows="5" style="width: 98%"></textarea><br />
<
label for="notify_me"><input type="checkbox" id="notify_me" name="notify_me" value="yes" {notify_me} /> Notify me of follow-up comments</label><br />
<
button type="submit" name="submit" value="submit" id="comment-submit" >Submit</button>{/if}
{
/exp:threaded_comments:form} 

This was working in EE 2.4, and now not in EE 2.5.2. I have a thread opened with them as well - just in case it is an EE-based problem rather than a plugin issue. I don’t know where the problem comes in, all I know is what behavior I’ve observed.

Yuri Salimovskiy
# 3
Developer
Yuri Salimovskiy

Hello Lesli,

I’ve inspected your code and it appears you’re using {exp:member:custom_profile_data} without passing member_id parameter. This way, it will display logged in user’s data.
You probably wanted to use {exp:member:custom_profile_data member_id=”{member_id}”}

Lesli
# 4
Lesli

Hi Yuri,

When I do that, nothing really changes.

I have changed the code slightly - so now the only thing in between the custom_member_data is the two bits of custom-profile-data that I added. The rest of the stuff is now showing up if a user is not logged in, and the Twitter and Facebook links are only showing up if the user *is* logged in.

Code I’m using now:

{exp:threaded_comments:display}
<ul id="comment-outer">
<
p>{comments}</p>{thread_start}
<ul>{/thread_start}
<li>
<
div class="commenthead" style="margin: auto 3px">
{if avatar}<img src="{avatar_url}" width="32" height="32" alt="{author}'s avatar">{/if}
{if {group_id} 
!= '2'}
{url_or_email_as_author} 
{if url 
!= ''}<a href="{url}" target="_blank"><img src="http://images.sparklecrackcentral.com/site_images/icon_32x32_site.png" width="32" height="32" alt="Visit {author}'s web site" /></a>{/if}
{exp
:member:custom_profile_data member_id="{member_id}"}
{if twitter 
!= ''}<a href="https://twitter.com/{twitter}" target="_blank"><img src="http://images.sparklecrackcentral.com/site_images/icon_32x32_twitter.png" width="32" height="32" alt="Follow {author} on Twitter" /></a>{/if}
{if fb_page 
!= ""}<a href="{fb_page}" target="_blank"><img src="http://images.sparklecrackcentral.com/site_images/icon_32x32_facebook.png" width="32" height="32" alt="Follow {author} on Facebook" /></a>{/if}
{
/exp:member:custom_profile_data}
{
/if}
{if {group_id} 
== '2'}{username} (Member has been banned){/if} :: {comment_date format="%Y-%m-%d"}</div>
<
p>{comment}</p>
<
div class="commentfoot">{if logged_in}<a href="[removed]void(0)" class="reply btn-reply" rel="{comment_id}">Reply</a> <a href="[removed]void(0)" class="quote reply btn-quote" rel="{comment_id}">Quote</a>{/if}</div>
</
li>
{thread_end}</ul>{/thread_end}{/comments}
</ul>{/exp:threaded_comments:display} 

Sadly, the group_id check is no longer functioning at all.

Yuri Salimovskiy
# 5
Developer
Yuri Salimovskiy

Regarding group_id check, try adding quotes, e.g. {if ‘{group_id}’ == ‘2’}

Regarding Twitter and Facebook, try including {screen_name} inside of {exp:member:custom_profile_data} call to make sure the data for correct profile are output.

Lesli
# 6
Lesli

Adding the quotes did no good. The banned member’s author_as_url still shows up, along with the site linked in the profile. The message “this member has been banned” does not display.

The correct Twitter and Facebook are now displaying…for logged-in members only. They are not displaying to logged-out site visitors.

Here is the test page with threaded comments by me, and a now-banned member (a test member). My Twitter and Facebook links are currently not displaying to me when I log out of the site. They should always be displaying. The test member’s name and site link are displayed. The site link should not display, and the message “This member has been banned” should display.

http://www.sparklecrackcentral.com/such/obsessive/addictions/aromaleigh_v1s_gothic_lolita_eye_collection

Yuri Salimovskiy
# 7
Developer
Yuri Salimovskiy

Can you give me access to your Control Panel so I can play with your template code a bit? My email is support@intoeetive.com

loemrntdherid1
# 8
loemrntdherid1