The MU forums have moved to WordPress.org

I Want to List all Members in MU (2 posts)

  1. sully2
    Member
    Posted 16 years ago #

    read through all the forums on this...and nothing helped for this error.

    I placed the plug-in list-all in the multiplugin folder that is the plugin... http://wpmudevorg.wordpress.com/project/List-All

    I have created a static page with the help of Andrea (thanks) The theme is disabled for other users so I could keep it a static page.

    I have two other accounts setup of course for test accounts.

    I pasted the code into the static page, which is the index.php file in the theme that is disabled for others users.
    <?php list_all_wpmu_blogs('100', 'name', '<p>', '</p>', 'updated'); ?>

    And all it shows is my Admin account, how come it does not show the other two accounts or users...

    http://upstateelite.com/wpmu/
    you will see at the bottom another test for listing all the blogs, only the admin is showing up.

  2. bschwarting
    Member
    Posted 16 years ago #

    <?php

    //MEMBER DIRECTORY BY BSCHWARTING
    //COPY & PASTE THIS ENTIRE CODE INTO A TEMPLATE
    //YOU WILL NEED TO EDIT 2 ITEMS BELOW
    //#1 LINE 15 - CHANGE "yourdomain.com" to your web site
    //#2 LINE 22 - CHANGE "Your site" to your site name
    //LINE #1 STARTS WITH "$membercounter = 0;"

    $membercounter = 0;
    $sql1 = "SELECT wp_users.user_login, wp_users.display_name, wp_signups.title from wp_users left join wp_signups on wp_users.user_login = wp_signups.user_login order by wp_users.user_login";
    $result = mysql_query($sql1) or die ("Error in query: $sql1. ".mysql_error());
    if (mysql_num_rows($result) > 0) {
    echo "<table width=450>";
    echo "<tr>";
    echo "<td width=150><b>Username</td>";
    echo "<td width=150><b>Nickname</td>";
    echo "<td width=150><b>Blog Title</td>";
    echo "</tr>";
    echo "</table>";
    while(list($user_login,$display_name,$blog_title) = mysql_fetch_row($result)) {
    echo "<table width=450 cellpadding=0 cellspacing=0 border=0>";
    echo "<tr>";
    echo "<td width=150>&nbsp $user_login</td>";
    echo "<td width=150>&nbsp $display_name</td>";
    echo "<td width=150>&nbsp $blog_title</td>";
    echo "</tr>";
    $membercounter = $membercounter +1;
    }
    echo "</table>";
    echo "<br> Your site currently has <b><font color=red>$membercounter</font></b> members";
    echo "<br>";

    }
    else {
    // no
    // print status message
    echo "<br>No users found.<br>";

    }

    ?>

About this Topic

  • Started 16 years ago by sully2
  • Latest reply from bschwarting