[Plugin: Aleph] Needed features? (26 posts)

  1. Detective
    Posted 7 years ago #


    I updated the Aleph plugin to 0.8.1. It now works ok with WordPress 2.7.1.

    I'll start working on new features (specially those listed in the FAQ, but if you need anything, just say it, perhaps I can do it :) (of course regarding Aleph ;) ).

    Thank you.

  2. blgdra
    Posted 7 years ago #

    Could possibly integrate wp comments on profiles to behave as regular comments. Users can moderate their own from their subscriber accts.

    If profiles could behave as pages...integrating post views would be good too.

    Thanks for the new upgrade.

  3. Detective
    Posted 7 years ago #

    Could possibly integrate wp comments on profiles to behave as regular comments. Users can moderate their own from their subscriber accts.

    Sadly, it's incredibly hard to do that, because the comment system is very post-specific and allows anonymous comments. It's better (and much easier) to create a "user comments" plugin that behaves like regular comments.

    It is possible to create such a plugin and it doesn't need to be part of Aleph, it could be made to work in author archives and with other plugins.

    Maybe I'll look into it in the future. Currently BuddyPress handles this very well and soon it will be available for WP single.

    If profiles could behave as pages...integrating post views would be good too.

    Sorry, I'm not sure what do you mean. By post views do you mean showing a list of posts in a profile page? You can already do that, because in profiles you can use all WordPress' template tags. So you can do things like:

    query_posts("author=" . aleph_get_user_ID());
    if (have_posts()) {
    // do something, display posts
    } else {
    // whatever you want to do in case the user is not an author.
  4. blgdra
    Posted 7 years ago #

    sorry I wasn't clear. I was asking about having a page view counter for profile pages that could also be widgetized to show top users in the sidebar.

  5. Detective
    Posted 7 years ago #

    That should be straightforward to do. I don't think it's something that could be useful to most users so it seems to be more reliable to think about it as a separate plugin.

    I could add some hooks and template tags to make it easier to create a plugin like that.

  6. zyrq
    Posted 7 years ago #

    role specific permalink structure perhaps? (=extra rewrite_rules)
    role=editor ->builds this URL: example.com/editors/johndoe
    role=author ->builds this URL: example.com/authors/janedoe

    in aleph terms that would be
    etc. (/people would be reduntant as I see it)

    see my "attempts" and further explanation at

  7. Detective
    Posted 7 years ago #

    Yes, "searching/people" is redundant because in the future I would like to have "searching/something_else" (like flickr).

    If you have few editors/authors/etc that need a custom rewrite rule, then you could just add their specific rewrite rules:

    add_filter('rewrite_rules_array', 'add_user_roles_rules');
    function add_user_roles_rules($rules) {
    $user_nicenames = array('zyrq', 'detective', 'other_user');
    $user_rules = array();
    foreach ($user_nicenames as $user_slug)
    $user_rules['editors' . '/' . $user_slug . '/?$'] = 'index.php?user=' . $user_slug;
    return $user_rules + $rules;

    After adding that code to a plugin and flushing the rules, the url editors/zyrq should be working. The important thing here is that the query string that the rewrite rule has to point needs the user=user_nicename parameter.

    The situation becomes more complex when you change your team of editors frequently, in that case you should provide a function to get the editors (instead of hardcoding the array as in the example) and hook in some action in WordPress when a user role has been changed.

  8. zyrq
    Posted 7 years ago #

    You know what? I tried a million things to get this kind or URL to work.

    I tried your suggestion but with 2 functions and 2 filters in functions.php: one for each role and with each role an array of nicenames.

    I only have 5 editors and 30 authors (users). The setup is a bit of work but it gets the job done.
    Now if I can combine this with cimy_extrafields (as aleph says) --which I'm currently using for my author pages (example.com/author/whoever)-- I have 2 types of user profile pages!
    Thanks Detective!

  9. niska
    Posted 7 years ago #

    Feature request: Let users in a wordpress-installation be friends with each other. One user should be able to add and remove friends. Like a community.

  10. Detective
    Posted 7 years ago #

    @zyrq: I'm glad it worked :) Don't forget to share your URL to see how the plugins works for you.

    Friends was a feature of Aleph some time ago. But i removed it because it wasn't useful for all users (in the sense of the plugin users, no the site users).

    If you need to build a social network perhaps BuddyPress is for you.

    If you just need a simple friends system, the system could be reimplemented again as a complementary plugin for Aleph, but that would be custom development.

  11. zyrq
    Posted 7 years ago #

    Detective, I'm afraid it's still dev on localhost.

    Your integration of cimy-user-extra-fields is impressive!

    $myinfo = aleph_get_user_cimy_field("myinfo");
    $mypic = aleph_get_user_cimy_field("mypic");

    works like a charm.
    One question though: is there a way to get the thumb from the image in aleph like in cimy_get_thumb_path?

    from the cimy-user-extra-fields readme:

    If you want to get the thumbnail url and you have only the image url you can use this function:
    $thumb_url = cimy_get_thumb_path($image_url);

    Nevermind, I called cimy_get_thumb_path directly from my function
    $thumb_url = cimy_get_thumb_path($mypic);
    Thanks for your help.

  12. niska
    Posted 7 years ago #

    @Detective - is there an old version of Aleph that includes Friends that I can look at?

  13. Detective
    Posted 7 years ago #

    There isn't a direct link, but you can browse the SVN repository at http://plugins.trac.wordpress.org/browser/el-aleph?rev=55661

    However, that version doesn't work with the latest WP.

  14. Arlieth Tralare
    Posted 7 years ago #

    Just wondering, is there an easy way to sort the user list alphabetically? Or would that require a messy sorting script?

  15. Detective
    Posted 7 years ago #

    This is not tested, but you could add this to a file named aleph-tweaks.php in your plugins folder (don't forget to activate it).

    Plugin Name: aleph-tweaks
    Plugin Script: aleph-tweaks.php
    Description: Tweaks for Aleph
    Version: 0.1
    License: GPL
    Author: You
    add_filter('users_order_by', 'my_users_order');
    function my_users_order($order_by) {
    global $wpdb;
    return " ORDER BY $wpdb->users.user_login DESC ";

    Please tell me if this works for you :)

  16. Arlieth Tralare
    Posted 7 years ago #

    Odd, it seems to have done some sorting, but since not all of my users have filled out their information, the sorting seems to prioritize incomplete profiles. :X But it's definitely a start! I'll report how it works out once all the profiles have been filled out. Thanks!

    You can see the results here:


  17. Detective
    Posted 7 years ago #

    That's because the code sorts by login. To sort by another field (those not in the table wp_users, like display name) it's harder, but not impossible. It could be something like this:

    add_action('users_queried', 'my_custom_order');
    function my_custom_order() {
    global $aleph_query;
    if (!is_user_view()) return;
    $users &amp;= $aleph_query->users;
    $sort_keys = array();
    foreach ($users as $key => &amp;$user) {
    $sort_keys[$key] = $user->display_name;
    $new_users = array();
    foreach ($sort_keys as $key => $display_name) {
    $new_users[] = $users[$key];
    $users = $new_users;
    $aleph_query->queried_object = $users[0];

    This is not tested, but it's how I would code a quick solution for your problem. (if you use this you can remove the previous code).

  18. Arlieth Tralare
    Posted 7 years ago #

    Hmm. I looked in template-tags.php for any information on adding the E-Mail Address field to a user's profile, but I couldn't find one. What could I insert in profile.php to enable this? Thanks!

    BTW, the website I'm working on has been moved to: http://www.bbnto.com .

  19. Detective
    Posted 7 years ago #

    What about the function aleph_the_user_email ? Try something like this (not tested):

    function display_user_email() {
    <dd><?php aleph_the_user_email(); ?></dd>
    <?php } ?>
    add_action('aleph_user_profile_fields', 'display_user_email');
  20. alialib
    Posted 7 years ago #

    Hello everybody,

    Detective, your magnifying glass and wise brain please! I am trying to configure a search page which displays users based on their CIMY meta data. In the FAQ on the plugin homepage it says:

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

    dd_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 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.

    I've tried everything to make it reference the CIMY Extra Field (which is called "role") but can't work it out. Any ideas? Your help would be massively appreciated; I'm building a radio station website with DJ profiles... it should be cool! But there's also local business profiles, so I'd like to separate them into two user lists using a search query. Any ideas?

    So far I've got:

    function my_aleph_views() {
        aleph_register_user_view('business', 'Business Users', 'user_cimy_field_role2=$role2');

    in my template-tags file. It correctly outputs a search page, and a heading called "Business Users" in the widget, but I can't for the life of me get the third bit working.

    Many thanks indeed,


  21. alialib
    Posted 7 years ago #

    p.s. awesome plugin by the way!!

  22. Detective
    Posted 7 years ago #

    That won't work because the meta_key refers to a key in the usermeta table, and CIMY uses another table for its data.

    However, I think it's possible to do what you need.

    First, register a view with a dummy key, like wp_user_level or something like that. Then, create a plugin wich adds a filter on the SQL query for users. There you can create a JOIN with the CIMY table and look for the value you need.

    It's not perfect, but at least it should work.

    I'm working on a new version of the plugin, more flexible and extensible, and easier to use, but I have other projects with higher priority, so I can't offer a better version yet.

  23. alialib
    Posted 7 years ago #

    Hi Detective,

    OK, that sounds simple enough. However, I'm not great at PHP and MySQL. I've never written a plugin before, and don't really speak the lingo (am learning!). Below is my first attempt. Firstly though, this is what I've now got in my template-tags.php file:

    add_action('init', 'my_aleph_views', 100);
    function my_aleph_views() {
        aleph_register_user_view('Business', 'Business Users', 'wp_user_level=administrator');

    The new plugin looks like this, and doesn't work!

    Plugin Name: CIMYUSERS
    Plugin URI: http://www.aliblackwell.com
    Description: Joins the CIMY and WordPress User Fields
    Version: 0.1
    Author: Ali Blackwell + Detective
    Author URI: http://www.aliblackwell.com
    SELECT *
    FROM wp_user
    JOIN wp_cimy_uef_fields
    ON wp_user.id=wp_cimy_uef_fields.id

    When I activate the plugin it says:

    Parse error: syntax error, unexpected T_STRING in /home/totallyt/public_html/shoreditchradio.co.uk/site/wp-content/plugins/cimyusers.php on line 11

    I've tried different syntax, but I can't get it working. Any ideas? I appreciate you're probably very busy, and you've already been amazing producing this wonderful plugin, but I'd be immensely grateful of your help!

    Many thanks,


  24. monarchmdm
    Posted 7 years ago #

    I am trying to get all the Cimy fields to display on the profile page (all the Cimy extra fields) right now I have one extra field displaying on the profile page. Code is below tks. Your plugin is awesome!

    <?php get_header(); ?>


    This is a example template for Aleph.
    The function aleph_user_profile() outputs a formatted profile. You need to put it between the adequate markup of your template.

    <div id="content" class="narrowcolumn">

    add_action('aleph_user_profile_fields', 'display_user_cimy_field');

    function display_user_cimy_field() {
    $address = aleph_get_user_cimy_field("address");
    if ($address) {
    echo '<dt>Address</dt>';
    echo '<dd>' . $address . '</dd>';
    'before_title' => '<h2 class="center">',
    'after_title' => '</h2>',
    'before_section' => '<div class="entry"><h3>',
    'after_section' => '</h3>',
    'before_avatar' => '<div style="float: right;">',
    'after_avatar' => '</div></div>'


    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

    Secondly, I cant get the user list to show up. I am also using member list, would that interfere?


  25. jakobwa
    Posted 6 years ago #

    Hi Arlieth Tralare,

    I have some questions regarding how you managed to edit your profile page. And how you were able to show the e-mail?

    Please respond to me here or to jakob[dot]wallsten[at]gmail[dot]com

    Take Care,


  26. Arlieth Tralare
    Posted 6 years ago #

    Hi Jakob,

    The email is actually a custom field in CIMY. It worked out because some of the users had a private email and a business email that were separate anyways, but usually they would just input their email twice.

    As for editing the profile page, in truth some very messy cut and paste had to be done. Instead of calling the header/footer/etc for the profile page, I had to cut and paste the header/footer code in the order that they would be called. This gave me some additional flexibility in the end as the top advertisement banner was removed for the profile page. If you pull the source code for the profile page, by and large that is what it looks like in the back end. Hope this helps, but if you have more questions please email me at arlieth[at]gmail[dot]com.

    To Detective: As a feature, I am still waiting for custom member URL slugs! That's probably the last major change I am looking for. A while back I bought some books for you through your Amazon Wish List, I never heard back so I hope they got to you okay!

Topic Closed

This topic has been closed to new replies.

About this Topic