WordPress.org

Ready to get started?Download WordPress

Forums

amr users
Add a link to user details (6 posts)

  1. carblanco
    Member
    Posted 3 years ago #

    Hi,

    I'm using this plugin to extract s2member custom fields and works great.
    Actually I'm listing the field company_name and I'd like that such field would be a link to a details page (with address, phone, etc.).
    Is it possible?
    How?

    Thanks.

    http://wordpress.org/extend/plugins/amr-users/

  2. anmari
    Member
    Plugin Author

    Posted 3 years ago #

    Hi carblanco,

    Current version no,
    But have quickly whipped up a pluggable possibility and it's looking sweet, so will see if I can put a small update up with an example

  3. anmari
    Member
    Plugin Author

    Posted 3 years ago #

    Ha! that was a bit of fun - but really I should be asleep...

    anyway see version 2.3.11 - see the pluggables file - copy one of the functions and drop it into your plugin file or your theme's functions.php

    Don't edit the plugin file unless you are prepared to recreate the code when there is an update.

    example: here "nice name" is given a link to the users url.

    - so depending how your details page is set - some kind of user profile template maybe ? - generate a link to it and there you are.

    if (!function_exists('ausers_format_user_nicename')) {
    function ausers_format_user_nicename($v, $u) {
    if (!empty($u->user_url))
    return ('user_url.'">'.$v.'');
    else return ($v);
    }
    }

  4. carblanco
    Member
    Posted 3 years ago #

    Thanks anmari but I really don't understand.
    So you say I have to copy (If I want that the nicename links to the users profile)

    if (!function_exists('ausers_format_user_nicename')) {
    function ausers_format_user_nicename($v, $u) {
    if (!empty($u->user_url))
    return ('user_url.'">'.$v.'');
    else return ($v);
    }
    }

    into my theme funtions.php, right? Then it doen't work for me.

  5. anmari
    Member
    Plugin Author

    Posted 2 years ago #

    Note: in latest version of plugin one can choose link types (profile, mailto, author template as per theme etc) in the setup of the report.

    If you have other unusual requirements, then you may need to resort to writingyour own formatting function similar to the above.

  6. carblanco
    Member
    Posted 2 years ago #

    Yes, and it works very well ;-)
    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic