Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Did not mean to spam the forum. Please delete this post.

    Please delete this post.

    This is what I’m trying to do also! Most of the answers to get started are on this post here:

    http://wordpress.org/support/topic/295786?replies=5

    You want the 2nd method, displaying a gallery outside the Alkivia plugin. Note that this only displays the gallery for whatever user ID you pass to it. It’s meant to show you only the photos from that one user. You would need to construct a loop that pulls user ID numbers from the main user metadata if you wanted to list more.

    I tried to extrapolate the code from userlist-default.php to create one, but the problem I have is in accessing the user metadata. Inside userlist-default.php you can get the user ID from $users[‘ID’], but the code breaks down if it’s outside the plugin. At least that’s my guess. I can’t figure out how to access the user metadata variables outside the plugin; it’s as if they’re not in scope.

    Anyway take a look at the code idea I came up with. Maybe you can get it to work! This will dump ALL the images uploaded by ALL users inside an unordered list. But since I can’t access $users currently all I get are the <ul></ul>
    tags in the browser’s View Source page.
    —-

    <ul>
    <?php foreach ($users as $user ) : $userdata = get_userdata($user['ID']); ?>
    
    <li>
    <?php if ( function_exists('aoc_gallery_content')) {
    
    		if ( false === ( $gallery = aoc_gallery_content($user['ID']) ) ) {
                echo 'No gallery for this user';
            } else {
                echo $gallery;
            }
        }
    
    ?>
    </li>
    <?php endforeach; ?>
    </ul>

    Just so you know, the code DOES work if you use it inside the plugin. For example, I replaced the for-each loop inside userlist-default.php with my above code and got a perfect long page with everyone’s pictures in an unordered list.

    So, Txanny, how can we get to the user metadata or $users outside the plugin? That would solve everything!

    -Dave@WBI

    hi, I figured it would be best to move the discussion here. Still having a minor problem with implementing the code. I looked through the files that make up the Alkivia plugin; also through forum posts to see if I could find the information I need. Sorry if I’m asking a question you’ve already answered.

    Here’s the problem:

    I’m attempting to use your 2nd code example, to call up the image gallery from another page outside of the plugin. How can I access the user metadata outside the plugin? I think the necessary variables are not in the proper scope and I would need to require a library file from the Alkivia plugin. Is that right? Thanks for your time!

    I believe I’ve isolated a problem implementing the new user templates. I know that all the information displayed in the table is being pulled from the array $users. However, invoking an “echo print_r($users)” inside the file “userlist-default.php” supplies only partial data. I see the following keys inside $users:

    user_login
    user_pass
    user_nicename
    user_email
    user_url
    user_registered
    user_activation_key
    user_status
    display_name
    ID

    However, based on the code I see in the file “user-edit.php” there should be at least three more: user_jabber, user_yim and user_aim

    I have been unable to find out how to call those extra values from the $users array. Can you describe how this array is populated? Thanks for your time,

    -Dave @ WBI

    Excellent I am looking for these exact features, will their be a way to add extra field such as phone numbers and address?

    When should we expect release 0.8?

    Thanks again your plugin has been great!

Viewing 6 replies - 1 through 6 (of 6 total)