is_member_of Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Jake Bunce
    replied
    Originally posted by Blackjack
    Now this works normally in general forums, however when you view a pm is_member_of returns your own info.

    This is all within the scope of the vBulletin software.
    I just tested this on my test forum. It does not return your own info, but rather it returns the info of the PM author.

    I cannot confirm your bug report.

    Leave a comment:


  • Blackjack
    replied
    Jake, here is the process.

    1. Created a custom template, template_info.

    template_info contains:
    Code:
    <if condition="is_member_of($post,6)">Staff,</if>
    <if condition="is_member_of($post,18)">Supporter,</if>
    <if condition="is_member_of($post,25)">Supporter++,</if>
    <if condition="$post[field17] == 'VS'">VS,</if>
    <if condition="$post[field17] == 'TR'">TR,</if>
    <if condition="$post[field17] == 'NC'">NC,</if>
    <if condition="$post[field29] == 'true' && is_numeric($post[field20]) && is_numeric($post[field19])">Played,</if>
    <if condition="$post[field31] == 'true' && $post[field30] != 'no'">TS,</if>
    <if condition="is_member_of($post,30,31)">Donated</if>
    2. Created plugin, postbit_display_start

    Code:
    eval('$psu_info = "' . fetch_template('template_info') . '";');
    3. Edit postbit_legacy include $psu_info.

    Now this works normally in general forums, however when you view a pm is_member_of returns your own info.

    This is all within the scope of the vBulletin software.

    Leave a comment:


  • Hamma
    replied
    Way to pass the buck. It's obivously a bug in the code, is there another variable I can use to determine poster/senders group? I am using all built in vB variables.

    Leave a comment:


  • Hamma
    replied
    I have gone that route also but where this is built in stuff it doesn't make much sense. I have also tried by just manually inserting that code and not using the Variables too.

    Leave a comment:


  • Jake Bunce
    replied
    It is difficult to troubleshoot this problem when the code uses variables that are defined elsewhere, possibly with different scopes. I cannot see any obvious problems without getting in there and systematically troubleshooting specific pieces of code. I recommend you post on www.vbulletin.org if you need help with this custom code.

    Leave a comment:


  • Hamma
    replied
    [removed]
    Last edited by Hamma; Thu 11 Jan '07, 6:49pm.

    Leave a comment:


  • Jake Bunce
    replied
    $post[] contains the information of the post author, not the logged in user. I cannot explain the problem otherwise. Can you post the entire block of code that you are using? Not just the conditional pieces.

    Leave a comment:


  • Hamma
    replied
    When I replace $post with $bbuserinfo it then shows me MY information on everyone's post even outside of PM.

    Inside the PM it shows me my own information when someone sends me a PM as well. Is there a variable somewhere that does not rely on the post information? PM isn't really a post.

    Leave a comment:


  • Hamma
    replied
    You mean the other way around? I am using $post for the template.

    Leave a comment:


  • Jake Bunce
    replied
    It sounds like you are using $bbuserinfo[] when you should be using $post[].

    Leave a comment:


  • Hamma
    started a topic is_member_of Problem

    is_member_of Problem

    So I am using a bunch of conditionals in my postbit_legacy that show titles based on usergroup. As well as a couple icons and menus based on usergroup.

    "is_member_of($post,35)" and "is_member_of($post,32,6,27)" etc (inside <IF statements of course)

    Herein lies the problem. This works excellent in the general forum posts however, if I receive a PM from someone their titles and icons are MY titles and icons. So VB is showing me what my titles are and not the sender. I looked around a bit and I am unsure what the solution would be - anyone encountered this before?

    I would assume (although I have not tried) the same thing would happen in USERINFO if I posted it there.

Related Topics

Collapse

Working...