ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

View all comments by a certain member

February 17, 2012 6:19am

Subscribe [3]
  • #1 / Feb 17, 2012 6:19am

    Alex420

    18 posts

    I’m just building a front-end member account page and I would to show all the comments a member has made in a list. Is this something EE can do as so far all I’ve come across is the {total_comments} variable which can be used in between the {exp:member:custom_profile_data}{/exp:member:custom_profile_data} tags. When I look at the comment entries tag it is more geared up to a single entry page so that will not really help either.

    Any thoughts would be greatly appreciated.

    Thanks

  • #2 / Feb 17, 2012 10:09am

    Design by Front

    106 posts

    You should definitely be able to do this with the Comment Entries Tag. Make sure you include the “author_id” parameter which should reference the member’s id (unless you have the member’s ID in the url, in which case the tag should figure out who’s comments to display).

    If it’s still not working for you, try posting up your code so we can have a look and see what the issue might be 😊

  • #3 / Feb 17, 2012 11:22am

    Alex420

    18 posts

    You know what…you’re absolutely right! I think what I was trying to do was output the author_id dynamically like author_id=”{member_id}” which for some reason was stopping it working.

    Just one more question and this may well be something that can’t be done easily. Can I now make all the titles of the comments links that take you to the particular single entry the comment was about? My problem is it could any one of several different channels so I don’t know if there is a way of doing this dynamically in my comment entries loop?

    Thanks so much for your help 😊

  • #4 / Feb 17, 2012 11:41am

    Design by Front

    106 posts

    No worries 😊

    You should indeed be able to do this, it depends on the url you use for your entries though. There are a few variables within in the Comment Entries Tag that should be useful to you, notably:

    entry_id  - the entry id that this comment belongs to
    entry_id_path - basically the same as above accept it tries to build a link for you
    comment_url_title_auto_path - tries to create a link based on your settings in Admin > Channel Managegment
    channel_title - this might be useful if you need to tweak the link depending on the channel that the comment entry belongs to. E.g:

    {if channel_title == "News"}use different link{/if}

     

    An example of using the entry_id variable might be:

    {exp:comment:entries sort="asc" limit="20"}
            <a href="http://{path=news}/{entry_id}/#comment{comment_id}">{comment}</a>
            By {name} on {comment_date format="%Y %m %d"}
    {/exp:comment:entries}

    Hope this helps

  • #5 / Feb 18, 2012 12:36pm

    Dan Decker

    7338 posts

    Hi Burn Card,

    Did the fine suggestions made by Design by Front point you in the right direction?

    Is there anything else I can assist you with?

    Cheers,

  • #6 / Feb 23, 2012 3:45pm

    Alex420

    18 posts

    Hi Dan,

    Sorry I’ve been away for a few days but I wanted to pop back and say thanks to Design by Front for their help with my problem. They were right on the money with their advice which was so helpful.

    Many thanks again.

  • #7 / Feb 24, 2012 4:10pm

    Kyle Cotter

    730 posts

    Hey Burn Card,

    Glad Design by Front was able to help you out here.

    If you have any more questions, feel free to start a new thread.

    Thanks guys!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases