Community Support Forums — WordPress® ( Users Helping Users ) — 2011-10-19T15:03:27-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=167 2011-10-19T15:03:27-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=48334#p48334 <![CDATA[Re: Membership Directory]]>
Thank you for your time and consideration!

Chris

Statistics: Posted by Cgoguen — October 19th, 2011, 3:03 pm


]]>
2011-09-26T02:19:47-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=39191#p39191 <![CDATA[Re: Membership Directory]]>
Jason Caldwell wrote:
There are several options here available to sort with:
http://codex.wordpress.org/Function_Reference/get_users


Another user asked me how he could sort the users by an s2Member custom registration field, but I didn't know. Is it possible in some way? I know they are in a serialized array, which would make it harder.

Statistics: Posted by Cristián Lávaque — September 26th, 2011, 2:19 am


]]>
2011-09-15T09:45:54-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=37241#p37241 <![CDATA[Re: Membership Directory]]> Statistics: Posted by antseo — September 15th, 2011, 9:45 am


]]>
2011-09-14T10:41:27-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=37209#p37209 <![CDATA[Re: Membership Directory]]> http://codex.wordpress.org/Function_Reference/get_users

Also see get_avatar(): http://codex.wordpress.org/Function_Ref ... get_avatar

Statistics: Posted by Jason Caldwell — September 14th, 2011, 10:41 am


]]>
2011-09-14T10:28:55-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=37206#p37206 <![CDATA[Re: Membership Directory]]>
<?php
foreach (get_users ("role=s2member_level1") as $user)
{
$user = new WP_User ($user->ID);
echo "\n" . "<strong>Name:</strong> " . get_user_field ("display_name", $user->ID) . "\n" . "<strong>Age:</strong> " . get_user_field ("age", $user->ID) . "\n" . "<strong>About Me:</strong> " . get_user_field ("about_me", $user->ID) . "\n";
//echo .= "\t" . '<li>'. get_user_field ("display_name", $user->ID) .'</li>' . "\n";
}
?>

I just to figure out how to pull back their avatar image now. Also, if I wanted to do a sort order so that the display name is sorted in ascending order, how would I adjust the code above to do that?

Statistics: Posted by antseo — September 14th, 2011, 10:28 am


]]>
2011-09-14T09:53:41-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=37200#p37200 <![CDATA[Re: Membership Directory]]>
<?php
foreach (get_users () as $user)
{
$user = new WP_User ($user->ID);
echo get_user_field ("age", $user->ID);
print_r(get_s2member_custom_fields($user->ID));
print_r($user);
}
?>

How then can I parse it out so that I'm only pulling back a first name, age (s2member custom field), and their photo?

Statistics: Posted by antseo — September 14th, 2011, 9:53 am


]]>
2011-09-14T08:19:11-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=37197#p37197 <![CDATA[Re: Membership Directory]]>
Change this:
Code:
$user = new WP_User($user);

To this please:
Code:
$user = new WP_User($user->ID);

I updated the code samples above in this regard. My mistake, sorry.

Statistics: Posted by Jason Caldwell — September 14th, 2011, 8:19 am


]]>
2011-09-14T07:21:35-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=37191#p37191 <![CDATA[Re: Membership Directory]]>
So the issue is that for some reason I can't pull back all users who have a s2member_level1 role using that script above even though I have about 10 that do. I confirmed that in the table in phpmyadmin also.

I can pull back an individual user with this:

<?php if(is_user_logged_in()){ ?>
user logged in
<?php } else { ?>
user not logged in
<?php } ?>

just not all users. Any ideas?

Statistics: Posted by antseo — September 14th, 2011, 7:21 am


]]>
2011-09-14T00:49:55-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=35952#p35952 <![CDATA[Re: Membership Directory]]> If you're trying this inside a Post or a Page, you'll need this plugin:
http://wordpress.org/extend/plugins/php ... on-plugin/

Statistics: Posted by Jason Caldwell — September 14th, 2011, 12:49 am


]]>
2011-09-13T22:20:22-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=35932#p35932 <![CDATA[Re: Membership Directory]]>
So, I plugged this into the page but nothing shows up:

Code:
<?php
    
foreach (get_users () as $user)
        {
            
$user = new WP_User ($user);
            echo 
get_user_field ("age"$user->ID);
            
print_r(get_s2member_custom_fields($user->ID));
            
print_r($user);
        }
    
?>


What am I doing wrong?

Statistics: Posted by antseo — September 13th, 2011, 10:20 pm


]]>
2011-09-13T21:16:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=35927#p35927 <![CDATA[Re: Membership Directory]]> Thanks for your reply.

Well, each Custom Registration Field that you create is associated with a unique ID that you give it when you create it. That's what you'll need to make the following code sample work for you.

Code:
<?php
foreach 
(get_users () as $user)
    {
        $user = new WP_User ($user->ID);
        echo get_user_field ("my_field_id", $user->ID);
        // print_r(get_s2member_custom_fields($user->ID)); // Requires s2Member v110912+.
        // print_r($user); // for a list of properties available for display.
    }
?>

See also, docs on get_user_field()
viewtopic.php?f=40&t=12453&src_doc_v=110912#src_doc_get_user_field%28%29

Also, available in s2Member v110912+, we have: get_s2member_custom_fields()
viewtopic.php?f=40&t=12453&src_doc_v=110912#src_doc_get_s2member_custom_fields%28%29

Statistics: Posted by Jason Caldwell — September 13th, 2011, 9:16 pm


]]>
2011-09-13T20:38:59-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=35925#p35925 <![CDATA[Re: Membership Directory]]>
Age
Tell us something interested about yourself

Using the code above, how would I list out those two custom fields along with first name and their photo?

Statistics: Posted by antseo — September 13th, 2011, 8:38 pm


]]>
2011-09-13T20:31:10-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=35924#p35924 <![CDATA[Re: Membership Directory]]> Thanks for the follow-up.

Sorry, we are still working toward this, but nothing in the latest release to address this specific issue with UI panels and such. However, you can certainly use this function to achieve what you need. Please see: http://codex.wordpress.org/Function_Reference/get_users

Code sample using `get_users()`.
Code:
<?php
foreach(get_users("role=s2member_level1") as $user)
    {
        $user = new WP_User($user->ID);
        // print_r($user); for a list of properties available for display.
    }
?>

Or, for all Users, not just those at Level #1.
Code:
<?php
foreach(get_users() as $user)
    {
        $user = new WP_User($user->ID);
        // print_r($user); for a list of properties available for display.
    }
?>

Or, for only Free Subscribers.
Code:
<?php
foreach(get_users("role=subscriber") as $user)
    {
        $user = new WP_User($user->ID);
        // print_r($user); for a list of properties available for display.
    }
?>

Statistics: Posted by Jason Caldwell — September 13th, 2011, 8:31 pm


]]>
2011-09-13T19:10:35-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=35913#p35913 <![CDATA[Re: Membership Directory]]> Statistics: Posted by antseo — September 13th, 2011, 7:10 pm


]]>
2011-02-14T21:28:08-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=6724#p6724 <![CDATA[Re: Membership Directory]]>
I recently installed S2member with an eye towards getting the pro version, particularly for the member list import/export, as I hope to use s2 to manage the member levels as well as the data for a member directory which gets printed twice a year. The member levels and custom fields are perfect for what I need and back at the end of August you said...
Jason Caldwell wrote:
Nope, sorry. This is NOT in s2Member, or s2Member Pro yet.
In the mean time, you might take a look at this:
http://wordpress.org/extend/plugins/members-list/


The primary question is, with the recent additions, does S2member Pro now have an easy way to display and search the member database? I mean, the layout is wrong but the "users" {users.php} display is actually pretty close.

Short of that, before I found this thread, I found the "Members List" plugin which comes extremely close to what I need for the on-line directory. My problem is that even though the plugin seems aware of the s2member_custom_fields, I am not knowledgeable enough to configure the "Members List" plugin to properly pull the custom field data out of the s2member array, even with the help of the PHP/API stuff.

If this functionality is not yet in s2, any assistance with the proper syntax would be great.

Thanks, DP

Statistics: Posted by man-O-media — February 14th, 2011, 9:28 pm


]]>
2010-11-10T17:16:30-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=4599#p4599 <![CDATA[Membership Directory]]>
A membership directory that is only visible to level 2 members but includes all levels members

A section where logged in members can update their profiles that are visible in the directory which includes extra fields such as expertise, contact details etc

Would this be available soon?

Statistics: Posted by sharac — November 10th, 2010, 5:16 pm


]]>
2010-09-21T11:03:43-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=3374#p3374 <![CDATA[Re: Membership Directory]]> Would you have an ETA as to when this feature would be in the Pro version?

Not sure if any of these are already planned (or for that matter already currently available in existing version) but these are what I am looking forward to:

1) Allows for a simple checkbox setting interface to choose which custom registration fields are to be listed in columns in the member list.
2) Columns can be sorted (eg. ASC/DESC etc.)
3) Search member function by all fields (including custom registration fields) or certain fields only (set in admin panel)
4) Member profile page 'backend' (where member can update their info and set which fields they would like to list as public/private
5) Frontend member profile page

Looking forward to a purchase once this becomes available in Pro.
Thanks much!

Statistics: Posted by Guest — September 21st, 2010, 11:03 am


]]>
2010-09-14T17:32:57-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=3268#p3268 <![CDATA[Re: Membership Directory]]>
You did say "yet," though right? Does that mean it's something we should expect soon?

Also, let me know what youre thoughts are on dropdown menus/radio buttons/check boxes in the registration form per our other thread. Def want to be a beta tester as we have a huge client chomping at the bit.

Thanks!

Statistics: Posted by sbsantiago — September 14th, 2010, 5:32 pm


]]>
2010-08-31T23:27:29-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=2809#p2809 <![CDATA[Re: Membership Directory]]>
Nope, sorry. This is NOT in s2Member, or s2Member Pro yet.
In the mean time, you might take a look at this:
http://wordpress.org/extend/plugins/members-list/

Statistics: Posted by Jason Caldwell — August 31st, 2010, 11:27 pm


]]>
2010-08-31T21:47:03-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=2807#p2807 <![CDATA[Re: Membership Directory]]>
Is this listing feature already implemented into the Pro version or is this still in progress?

Thanks.

Shane

Statistics: Posted by sbsantiago — August 31st, 2010, 9:47 pm


]]>
2010-06-23T20:20:36-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=1135#p1135 <![CDATA[Re: Membership Directory]]> Until then, give BuddyPress a shot. Should do the trick. Although you need a BuddyPress compatible theme; which I'm not wild about.

Statistics: Posted by Jason Caldwell — June 23rd, 2010, 8:20 pm


]]>
2010-06-02T03:41:56-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=672#p672 <![CDATA[Re: Membership Directory]]> However, for the time being, you might want to use the BuddyPress plugin:
http://buddypress.org/

Statistics: Posted by Elizabeth — June 2nd, 2010, 3:41 am


]]>
2010-06-01T08:10:28-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=666#p666 <![CDATA[Re: Membership Directory]]>
Thanks,

Joe

Statistics: Posted by Guest — June 1st, 2010, 8:10 am


]]>
2010-05-28T20:21:48-05:00 http://www.primothemes.com/forums/viewtopic.php?t=167&p=637#p637 <![CDATA[Membership Directory]]>
I wonder if there is a feature in s2Member to create a page listing all the members. A membership directory page which is accessible by members.

I have a plug in which does this through normal wordpress member registrations, but the s2Member levels don't come up as an option, only subscriber, author, contributer etc.

Is there a feature in s2Member that does this that I am missing?

Thanks,

Meegan
PS - thanks so much for your plugin, it has been immensely helpful. Once I start generating member income, I will certainly pass some your way.

Statistics: Posted by meeganjones — May 28th, 2010, 8:21 pm


]]>