Page 1 of 1

Members List for use on Multisite

PostPosted: July 15th, 2011, 11:07 am
by dskallman
Hi,

It was recommended to me a while back to you the Member List plugin to create a member directory: http://wordpress.org/extend/plugins/members-list/. This works great for single site, but is not compatible with multisite. It essentially brings through all members from all sites, not the single site. I was wondering if anyone could customize this to s2member making it multisite compatible and allowing for use of the custom profile fields to use in the directory layout and profile? If so, how much would it be to do something like this?

Thanks,

Dana

Re: Members List for use on Multisite

PostPosted: July 16th, 2011, 12:04 am
by Cristián Lávaque
It'd probably be a good idea to ask the developer of that plugin to make it work in multisite.

I don't know when s2Member will have its own members list.

Re: Members List for use on Multisite

PostPosted: July 16th, 2011, 8:37 am
by dskallman
I did ask him first and he said there were no plans for it now.

Re: Members List for use on Multisite

PostPosted: July 16th, 2011, 6:04 pm
by Cristián Lávaque
Ah, got ya. I emailed Jason about this, I'll let you know when I hear back from him on this. :)

Re: Members List for use on Multisite

PostPosted: July 17th, 2011, 10:48 am
by dskallman
Cool, thanks!

We would definitely contribute as much as we could to make this happen.

Re: Members List for use on Multisite

PostPosted: July 26th, 2011, 10:48 am
by Nathan Briggs
A site I've just taken over looking after uses this page template to output a member list. Could do with filtering options and/or being in a wee plugin, but it works for now.
Code: Select all
<?php 
// Template Name: Members List
get_header(); ?>
    <style type='text/css'>
    .author { height: 140px; width: 500px; }
    .author .userAvatar { float: left; width: 82px; padding-right: 10px; }
    .author .avatar, .author .photo { border: 1px solid #ccc; }
    .author .memberInfo { float: left; width: 300px; }
    .author h3 { margin: 0px 0px 5px 0px; line-height: 1em; }
    .author h3 a { text-decoration: none; }
    .author .connect {  }
    .author .connect li { background-image: none; }
    .author .clearboth { clear: both; }
    </style>

<div id="content_box">
    <div id="left_box">
        <div id="content" class="page">
            <div id="content_inner">

<h1>Site Members</h1>
<div class="format_text">
    <p><a href="<?php bloginfo('wpurl'); ?>/wp-admin/profile.php">Edit your profile.</a></p>
    <?php
    $user_ids 
$wpdb->get_col("SELECT DISTINCT ID FROM $wpdb->users ORDER BY display_name");
    if(
$user_ids):
    foreach(
$user_ids as $user_id):
        
$cur_member get_userdata($user_id);
        
?>
        <div class="author" id="author-<?php echo $cur_member->user_nicename?>"> <?php // replaced user_login; ?>
            <div class="userAvatar">
                <a href="<?php bloginfo('url'); ?>/author/<?php echo $cur_member->user_nicename?>"> <?php // replaced user_login; ?>
                    <?php echo get_avatar(($cur_member->ID), '80'$hybrid_settings['default_avatar']); ?></a>
            
            <p> <?php/* echo $userlevels["levels"]["active"];*/ ?></p> 
            
            </div>
            <div class="memberInfo">
                <h3><a href="<?php bloginfo('url'); ?>/author/<?php echo $cur_member->user_nicename?>"><?php echo $cur_member->display_name?></a></h3>
                <?php if($cur_member->birthday || $cur_member->user_url || $cur_member->twitter || $cur_member->facebook || $cur_member->flickr): ?>
                    <ul class='connect'>
                        <li>Birthday: <?php echo $cur_member->birthday?></li>
                        <?php if($cur_member->user_url): ?>
                        <li>Website: <a href='<?php echo $cur_member->user_url?>'>Link</a></li>
                        <?php endif; ?>
                        <?php if($cur_member->twitter): ?>
                        <li>Twitter: <a href='http://twitter.com/<?php echo $cur_member->twitter?>'><?php echo $cur_member->twitter?></a></li>
                        <?php endif; ?>
                        <?php if($cur_member->facebook): ?>
                        <li>Facebook: <a href='http://www.facebook.com/<?php echo $cur_member->facebook?>'><?php echo $cur_member->facebook?></a></li>
                        <?php endif; ?>
                        <?php if($cur_member->flickr): ?>
                        <li>Flickr: <a href='http://www.flickr.com/photos/<?php echo $cur_member->flickr?>/'><?php echo $cur_member->flickr?></a></li>
                        <?php endif; ?>
                    </ul>
                <?php endif; ?>
            </div>
        </div>
        <br class="clearboth" />
        <?php
        
endforeach; 
        endif; 
?>
    <p><a href="<?php bloginfo('wpurl'); ?>/wp-admin/profile.php">Edit your profile.</a></p>
</div>
            </div>
        </div>
        <?php include (TEMPLATEPATH '/left_bar.php'); ?>
    </div>
    <?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>

Re: Members List for use on Multisite

PostPosted: July 26th, 2011, 11:06 am
by dskallman
Awesome, thanks for sharing. I'll check it out!

Re: Members List for use on Multisite

PostPosted: July 26th, 2011, 11:59 am
by nashvillegeek
Hi,

I had some issues with Members List as well. You might try editing the Members List script to use the *_user_option method instead of the *_user_meta. The *_user_option adds the current site's db prefix to the field, which limits the result set to the current site.

I used some hooks and a custom registration field to give the user the option to be added to the Members List. This gives them the option to be included/excluded, but also adds/removes the user to the Member List in question.

Here is a link to a post that might be helpful:
http://www.primothemes.com/forums/viewtopic.php?f=4&t=10414