Community Support Forums — WordPress® ( Users Helping Users ) — 2011-08-11T20:18:03-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=14413 2011-08-11T20:18:03-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14413&p=30549#p30549 <![CDATA[Re: Display list of paid members on WP page]]>
svnyster wrote:
The problem I'm running into is that the moderators of the gaming server have to promote/demote the users manually, and I don't want every moderator to have admin access to WP just to see user ranks.

....
The page would be hidden to everyone except moderators, and the moderators will use it to see who has made a donation.


This page could most likely be taken out from the menu bar of your theme ( http://codex.wordpress.org/Template_Tag ... _from_List ) and instead be listed on your Moderator's Login Welcome Page.

Then, as an extra precaution, you could set conditionals to only display the list to Moderators (I'll assume you gave them s2member level 4.)

Code:
[s2If current_user_can('access_s2member_level4')]
//put the list here
[/s2If]
[s2If !current_user_can('access_s2member_level4')]
You do not have permission to access this page
[/s2If]



That being said, what I'm looking to do is have a WP page that will display a list of paid members on a certain level.


For a page with only level 1 users, you could use something like this:

Code:
    $level1users = get_users('role=s2member_level1');
    foreach ($level1users as $user) {
        echo '<li>' . $user->display_name . '</li>';
    }

Then, just change the variable, and role= to level 2, etc. on the other pages.

For the demotion/promotion of users, this post may be of help viewtopic.php?f=4&t=14397


Another display that I would like to show (if possible) is a list of members whose paid subscription has recently expired.


This post may be helpful viewtopic.php?f=4&t=10385

If you have any questions, please reply back and I'll help if I can.

Statistics: Posted by Bruce C — August 11th, 2011, 8:18 pm


]]>
2011-08-11T15:41:01-05:00 http://www.primothemes.com/forums/viewtopic.php?t=14413&p=30538#p30538 <![CDATA[Display list of paid members on WP page]]>
I am hosting a site that has access to a gaming server. I'm using s2member to accept donations for cost of the site and server, and in return, we give members access to special features on the gaming server. s2Member works great for this purpose because the user list in the admin panel of WordPress will show the member levels and automatically demote when their time has expired.

The problem I'm running into is that the moderators of the gaming server have to promote/demote the users manually, and I don't want every moderator to have admin access to WP just to see user ranks.

That being said, what I'm looking to do is have a WP page that will display a list of paid members on a certain level. The page would be hidden to everyone except moderators, and the moderators will use it to see who has made a donation. I do have a custom field from s2Member that I would like to display on this page, along with their username and when their subscription will expire.

Another display that I would like to show (if possible) is a list of members whose paid subscription has recently expired. With the moderators having to manually demote members on the gaming server, a list of recently expired subscriptions would be great for them to see who needs to be demoted.

As I said, I'm very new to php and really any form of API scripting, so any guidance would be extremely helpful! I'll keep an eye on the forums and try to help out with issues people may have that I am more knowledgeable on.

Statistics: Posted by svnyster — August 11th, 2011, 3:41 pm


]]>