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.

username vs author_id

October 27, 2010 11:02am

Subscribe [3]
  • #1 / Oct 27, 2010 11:02am

    StayInTouch

    16 posts

    I am working on a members area where I am creating an admin area where an admin can view all of the members and manage every entry that the member has created. I want the admin to be able to manage the member’s entries as if they were logged in as the member, but without having to log in as each individual member. So they have a page that lists every member and then a link to all the entries for each member. So here is my question…

    Is there a problem with using the Username instead of the Author_ID in the weblog entries tag?

    I’m finding that if I use the author_id in the weblog on the receiving page, it isn’t grabbing that member’s id and displaying their entries. It just gives me a blank area where the entries should be. I’ve turned on template debugging and I see that it says something like author_id=“2” but that authors entries don’t show up.

    Here is the link code I was trying to use in the <a> tag:

    "{path="admin/manage_member_clients"}{member_id}"

    Here is the weblog entries tag I was trying to use on the receiving page:

    {exp:weblog:entries weblog="manage_clients" author_id="{segment_3}" status="Active|Open|Inactive" limit="25" disable="categories|category_fields|trackbacks"}


    However, if I use username in the weblog, it is pulling in only that member’s entries like its suppose to.

    Here is the link code I’m using in the a tag:

    "{path="admin/manage_member_clients"}{username}"

    Here is the weblog entries tag I’m currently using on the receiving page:

    {exp:weblog:entries weblog="manage_clients" username="{segment_3}" status="Active|Open|Inactive" limit="25" disable="categories|category_fields|trackbacks"}

    Will using the username give consistent results when we start adding 300 - 400 members to this site? Or will it cause problems that I don’t forsee?

    Thank you,

    Daniel Boswell

  • #2 / Oct 28, 2010 2:30am

    John Henry Donovan

    12339 posts

    Daniel,

    What version and build of EE are you using?
    Are you running any extensions?

    Can you try the dynamic=“off” parameter in combination with the author_id= parameter

    {exp:weblog:entries weblog="manage_clients" author_id="{segment_3}" status="Active|Open|Inactive" limit="25" disable="categories|category_fields|trackbacks" dynamic="off"}
  • #3 / Oct 28, 2010 11:37am

    StayInTouch

    16 posts

    John,

    I’m using EE 1.6.9. I am using the User, jQuery For CP, and FieldFrame 1.4.2 extensions.

    I’ve tried your suggestion and it did work. A new problem arises though. When I actually edit the entry, it ends up making me the author and it shows up on my list of test entries and disappears from the members list. I think I just need to pass the author_id to the edit SAEF form and that would fix the problem. Does that seem right to you?

  • #4 / Oct 29, 2010 1:04am

    John Henry Donovan

    12339 posts

    StayInTouch,

    Unfortunately we don’t support the editing of entries via the SAEF just the creation but it sounds like you are on the right track.

    I can move this thread over to the CodeShare Corner where you may receive further community help or if you wish I can close this thread and you can create a new one over there?

  • #5 / Oct 29, 2010 2:33pm

    StayInTouch

    16 posts

    John,

    I found an extension called Filter By Author that is for the CP. I’m just going to train the admin on using the CP to manage the members. The interface isn’t as nice, but I can set them up custom tabs so they can easily access the different information they need.

    Eventually I may go back to pursue my own front-end version to manage the clients.

    I appreciate your promptness and feedback on this issue. You can close this one out.

    Thank you,

    Daniel Boswell

  • #6 / Oct 30, 2010 3:29pm

    Greg Salt

    3988 posts

    Hi Daniel,

    Glad that you got this working as you wish. Please post back if you have further questions or problems.

    Cheers

    Greg

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

ExpressionEngine News!

#eecms, #events, #releases