aMember + Wordpress + bbPress-> Show User Role Based On Amember Subscription...

Discussion in 'aMember Pro v.4' started by xtrememarketer, Mar 8, 2013.

  1. xtrememarketer

    xtrememarketer New Member

    Joined:
    Nov 9, 2011
    Messages:
    20
    Hi,

    I made a mistake thinking i could use this code to show a user's role in my bbpress forums based on Amember subscription:

    <?php if(am4Pluginsmanager::getAPI()->haveSubscriptions(array(1,2,3))) : ?>

    user role

    <?php elseif(am4Pluginsmanager::getAPI()->haveSubscriptions(array(11,12,13))) : ?>

    user role

    <?php else : ?>

    user role

    <?php endif ?>

    I even paid a designer to make custom graphics for each role and when i tried to show them on the site i realized that the code above shows the role based on the subscription of the person who is watching the forum, not the forum poster.

    Here's the code that currently shows user roles (plus member points and ranks - i use a plugin for that) on bbpress for each user:

    <!--Role-->
    <?php bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => true ) ); ?>
    <!--Role-->
    <!--Ranking -->
    <div class="bbp-ranking">
    <span class="bbp-rank"><?php echo cp_module_ranks_getRank(bbp_get_reply_author_id()); ?></span><br />
    <span style="font-size: 11px; font-style:italic"><?php echo 'Points: '.cp_getPoints(bbp_get_reply_author_id()); ?></span>
    </div>
    <!--Ranking -->

    Can anyone help me show a different code depending on the forum user's amember subscription (not the one who is reading the forum)???

    I would really appreciate any help...

    Thank you.
  2. xtrememarketer

    xtrememarketer New Member

    Joined:
    Nov 9, 2011
    Messages:
    20
    i think the correct code involves this part: bbp_get_reply_author_id()

    This code returns the points for every bbpress member:

    <?php echo 'Points: '.cp_getPoints(bbp_get_reply_author_id()); ?>

    How can i make it return certain content/images based on the amember subscription of each member?
  3. xtrememarketer

    xtrememarketer New Member

    Joined:
    Nov 9, 2011
    Messages:
    20
    maybe CSS would help?
  4. xtrememarketer

    xtrememarketer New Member

    Joined:
    Nov 9, 2011
    Messages:
    20
    Nevermind. I found a solution already...

Share This Page