WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Aleph

Aleph implements profiles, paginated and customizable user lists.

How to make my own users/profile templates?

Copy the files users.php and profile.php to your template directory. Edit those files, adding the HTML markup needed so they match your template.

Next, you need to tweak the parameters to the aleph_* functions used in those templates. I think they are pretty self-explanatory. Here is an example taken from my customized version of users.php:

aleph_users_list(
    array(
        'before_list' => '<div class="format_text">',
        'after_list' => '</div>',
        'before_list_meta' => '<div class="headline_area">',
        'after_list_meta' => '</div>',
        'before_found_users' => '<p class="headline_meta">',
        'after_found_users' => '</p>',
        'before_title' => '<h1>',
        'after_title' => '</h1>',
        'show_avatars' => false,
        'show_navigation' => false,
        'list_attributes' => 'id="user-list" style="padding-left: 0; margin-left: 0; list-style-type: none;"',
        'before_avatar' => '<div class="wp-caption alignright">',
        'after_avatar' => '</div>'
    )
);

users_nav_links('<div class="prev_next">', '</div>');

You can see that i removed the navigation from the aleph_users_list and then called it directly. This allows me to add even more extra markup in case it is needed :)

In a profile the parameters are similar:

aleph_user_profile(
    array(
        'before_profile_data' => '<div class="format_text">',
        'after_profile_data' => '</div>',
        'before_meta' => '<div class="headline_area">',
        'after_meta' => '</div>',
        'before_found_users' => '<p class="headline_meta">',
        'after_found_users' => '</p>',
        'before_title' => '<h1>',
        'after_title' => '</h1>',
        'before_avatar' => '<div style="width: 100px;" class="wp-caption alignright"">',
        'after_avatar' => '</div>',
        'avatar_size' => 96
    )
);

Please check the files inside the lib folder to see the full list of parameters and available functions.

How to extend the information shown in my users/profile templates?

You can use special hooks defined by Aleph. Those hooks are:

  1. In User Lists: aleph_user_list_before_user, aleph_user_list_user_fields_before_details, aleph_user_list_user_fields_after_details, aleph_user_list_after_user.
  2. In Profiles: aleph_before_user_profile, aleph_user_profile_fields, aleph_after_user_profile.

For example, you can output the list of "something" owned by some user:

add_action('aleph_after_user_profile', 'display_user_something');

function display_user_something($args) {
    $user_id = aleph_get_user_ID();
    if (!$user_id)
        return;

    extract($args);
    $things = get_something_of_user($user_id);
    if (!$things)
        return;

    echo $before_section . 'User Things' . $after_section;
    echo '<ul id="user-things">';
    foreach ($things as $thing)
        printf('<li>%s</li>', $thing);
    echo '</ul>';
}

Put this code in a plugin or in the functions.php file of your template.

How to create user lists from other plugins and/or my theme functions.php?

After the plugin is loaded, you can add new lists/views using a special function called aleph_register_view:

add_action('init', 'my_aleph_views', 100);

function my_aleph_views() {
    aleph_register_user_view('view_slug', 'My User List', 'user_key=some_meta_key');
}

The first parameter is the slug of the view, i.e., you can reach the view through http://example.com/searching/people/view_slug.

The second parameter is the name of the view, displayed in the document title, the list header and the user lists widget.

The third parameter is the "user query", in this case, we are querying for users that have a custom user_meta of key some_meta_key.

Which features are planned for next releases?

Currently, there are no planned "new" features, just improve what has already been done. Of course I would like to make the plugin easier to use, so I guess feedback is really needed.

However, there are some unresolved things:

  • Configurable slugs.
  • Support the key/value user views.
  • Allow registration of user views from the Dashboard using meta keys and key/value pairs.
  • More friendly template options.

But I need more features T___T

Well, in that case, Aleph is not (anymore) for you. I recommend BuddyPress, which will soon be available for single WP.

Does Aleph works with WordPress MU ?

Yes! In fact, i use it on a MU installation. Care must be taken in where you install the plugin... it needs some tweaking, but it works. The "user things" code shown earlier comes from a plugin that lists user blogs.

How to use Cimy User Extra Fields with Aleph?

If you have a field named "Gender":

add_action('aleph_user_profile_fields', 'display_user_cimy_field');

function display_user_cimy_field() {
    $gender = aleph_get_user_cimy_field("Gender");
    if ($gender) {  
        echo '<dt>Gender</dt>';
        echo '<dd>' . $gender . '</dd>';
    }
}

You don't need the user ID, because the function aleph_get_user_cimy_field works on the "current" user.

Aleph stopped working! It did work before ...

If this happened to you, you probably did one of the following actions:

  1. Activated a plugin that automatically flushed the rewrite rules.
  2. Changed the language of your blog.
  3. Registered a custom view inside a plugin.

Updating the permalink structure manually in your dashboard usually solves the problem.

Requires: 2.7.1 or higher
Compatible up to: 2.7.1
Last Updated: 2009-4-16
Downloads: 6,508

Ratings

3 stars
3.9 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

0,1,0
0,1,0
100,1,1
100,1,1
100,1,1