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.

Forum member group under Avatar

January 12, 2009 5:47pm

Subscribe [8]
  • #1 / Jan 12, 2009 5:47pm

    Ben Johnson

    29 posts

    Hi. I ran into a bit of a problem. I’m trying to get each user’s member group to sit under their avatar each thread. I figured I’d just add the line {member_group}, but {member_group} works the same way as it does in regular EE templates, rather than the way it works in the theme_member class.

    Is there any way for me to get the {member_group} to function in $theme_threads->thread_rows() the same way it does in the theme_member class?

    Thanks for the help!

    Ben.

  • #2 / Jan 12, 2009 6:13pm

    Ingmar

    29245 posts

    When you try {member_group} in your template, what do you get? I think you actually might have to run your forums through EE’s main template parser, too. Also, what version and build of EE are you on?

  • #3 / Jan 12, 2009 6:24pm

    Ben Johnson

    29 posts

    I’m already running it through the main template parser I believe. When I use it in $theme_threads, I get a “1” which I assume is it doing the behavior it’s supposed to in the standard EE templates (it’s showing MY member group).

    Thanks for the prompt assistance.

  • #4 / Jan 12, 2009 11:04pm

    Sue Crocker

    26054 posts

    Ben, did you receive enough information to resolve this issue?

  • #5 / Jan 13, 2009 12:40am

    Ben Johnson

    29 posts

    Nope, as of right now I still can’t figure out a way to get it to behave like it’s under the theme_member class.

    I’m on 1.6.6 - Build:  20081212

    Thanks.

  • #6 / Jan 13, 2009 3:46pm

    Lisa Wess

    20502 posts

    Ben, you’d probably be best to use some PHP to get this accomplished; you could also post a feature request for a proper variable for this.

    In any case, I’m going to move this up to How To as it is not available out of the box.

  • #7 / Jan 14, 2009 11:28am

    Ben Johnson

    29 posts

    So, that wasn’t so hard.

    I made a plugin that grabs the member group from the individual’s name. In combination with the {author} tag, it works perfectly in the forum.

    In case anyone else runs into this: PI.Get_Member_Group

    Thanks so much for the help!

    Ben.

  • #8 / Feb 18, 2009 6:47pm

    reedy

    19 posts

    So, that wasn’t so hard.

    I made a plugin that grabs the member group from the individual’s name. In combination with the {author} tag, it works perfectly in the forum.

    In case anyone else runs into this: PI.Get_Member_Group

    Thanks so much for the help!

    Ben.

    Hi Ben

    This looks just what I am after. How do I install it, though? I added it to the plugins folder and it’s now appearing in the plugin manager.

    So when I go to the Thread Rows template, what do I replace {rank_title} with? I have tried {exp:get_member_group} but no joy. In your example you include a member name - but of course, I can’t write one member name as the code to appear under the name of every member.

    Am I meant to call the plugin somewhere in the template? Confused!

    Any help would be appreciated 😊

  • #9 / Feb 19, 2009 7:42pm

    Ben Johnson

    29 posts

    First, in order for this to work you need to be loading the forum through EE templates as described here.

    In the “Thread Rows” template, I changed:

    
    
    

    to:

    
    
    

    If the plugin is installed, it should properly use the {author} tag to grab the name and display it.

    Does this work for you?

    Ben. 😉

  • #10 / Jan 07, 2010 1:08pm

    JohnChristianJr

    103 posts

    Hey, Ben!

    Thanks for the great plugin -it would do exactly what I’m looking for.  I believe it’s not compatible with 2.0… is there anyway that you can update this, or tell me how to?

    I rebuilt my forums so it looks a little different, but I changed this:

    <div id="forum-post-left-group">{rank_title}</div>

    to this:

    <div id="forum-post-left-group">{exp:get_member_group name="{author}"}</div>

    ...which is how I believe it’s supposed to be formatted.  Oh, I am running the forums through the regular templates, too.

    Here is the error message I get:

    Fatal error: Call to a member function fetch_param() on a non-object in /www/eh11744/public_html/world/expressionengine/third_party/get_member_group/pi.get_member_group.php on line 24

    Thank you!
    -John

  • #11 / Jan 14, 2010 7:36pm

    Ben Johnson

    29 posts

    Unfortunately this isn’t 2.0 compatible yet. I’m planning on doing it, but I don’t have a production 2.0 site that needs it, so it just hasn’t entered the schedule. You should be able to do the something similar with the query module but I’d have to take a close look at the 2.0 database structure to figure it out. I’ll try to take a look at it this weekend.

  • #12 / Feb 07, 2013 1:10pm

    abstractpenguin

    1 posts

    Unfortunately this isn’t 2.0 compatible yet.

    Have you had a chance to make a 2.0 version?

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

ExpressionEngine News!

#eecms, #events, #releases