• Resolved igorpav89

    (@igorpav89)


    Hey all. First of all, let me say that i have no coding experience what so ever. But i would really need your help.
    The thing is that i am usig Users Ultra plugin. But, on forum, you can not click on user profile, that would link to the profile on User Ultra Lite plugin.

    Did anybody do this so far, and how can it be done, as this is actually the only forum that i like, and it is simple for users to use, but really missing that feature where in posts on forum you can actually click on user that posted something, and end up with its profile, which is actually, as I sad, a plugin called Users Ultra Lite.

    Yhank you so much in advance.

    https://www.ads-software.com/plugins/asgaros-forum/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi
    You only need to know the link to your profile

    add_action('asgarosforum_after_post_author', 'my_function', 10, 1);
    
    function my_function($author_id) {
    links to profile
    }

    Example:
    https://www.ads-software.com/support/topic/useful-to-those-who-use-the-plugin-wp-recall?replies=4

    I love this plugin.
    Please how can i call the user asgaros post count to buddy press member loop.

    <?php if (get_usernumposts( bp_get_member_user_id() ) >= 0) echo ” | Post: ” . get_usernumposts( bp_get_member_user_id() ); ?>

    usernumposts was used for blog post.

    Plugin Author Asgaros

    (@asgaros)

    Hello @godwinnwalozie

    you could do a database-query on the posts-table with something like this:

    SELECT COUNT(id) FROM wp_forum_posts WHERE author_id = 123;

    @asgaros – personally, instead of or in addition to adding a custom profile link/button below the avatar, etc. using that hook for the author panel it might be cool to:

    • Add an option in settings for a profile link URL that will activate when the avatar itself (or username)
    • Allow a macro like %id% to be embeded in the URL to expand to the author ID in the front end

    ??

    p.s. There are programmatic alternatives but this seems like a useful feature for everyone, my .02 — but you get the idea of basically what I mean.

    Plugin Author Asgaros

    (@asgaros)

    Hello @jgoldbloom

    I am not actually sure if I understand you correctly but basically you can already wrap a link around the username with the following filter:
    asgarosforum_filter_post_username

    For example:

    function filter_username($username) {
    	return '<a href="#">'.$username.'</a>';
    }
    add_filter('asgarosforum_filter_post_username', 'filter_username');
    • This reply was modified 7 years, 10 months ago by Asgaros.

    Yes, that’s the “programmatic alternative” I noted in my original comment. I’m asking to make it a new feature in the admin setup which I should have clarified. Using the simple macro option to embed author ID in the link for that feature is easy to parse in your code and would fully support other plugins where a profile link almost has the one common element, the ID, fyi.

    The reason I suggested the feature request is because linking the avatar and/or author name should be available to non-developers and such a feature is very useful, common and sensible, I think.

    Forgot to ask, does asgarosforum_filter_post_username allow author_id to be passed not just username? Or in my function what code can I use to get that?

    Plugin Author Asgaros

    (@asgaros)

    @jgoldbloom

    Forgot to add that there is a second parameter for that filter which contains the author_id as well. ??

    @asgaros – way cool, thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Link to user profiles on forum (Users Ultra)’ is closed to new replies.