Viewing 1 replies (of 1 total)
  • You can use the filter ‘ucom_profile_extradata’ to show anything you want after the main user profile. This filter already has two functions added with priority 5 and 6. that provide the latest user posts and latest user comments. (Sorry filters are not yet documented)

    So, If you want to show more info on the profile page, just add it like this in a plugin or theme:

    function my_extradata( $output, $userID ) {
        $output .= 'Any HTML code you want to show';
    }
    add_filter('ucom_profile_extradata', 'my_extradata', 10, 2);

    If you want to ensure your data shows after Last Posts and Last Comments, then set priority to 25 or higher. If you want to show before last posts and comments, set priority to any value lower than 5. (This values are for compatibility with current RC and the stable version).

    Just consider that this filters takes 2 parameters, the output being prepared and the userID (To use if you have to search database information). So the call to add_filter have to include the last parameter as 2. You have to return valid HTML, as the plugin just displays all values returned, and add the data to the output, as it carries from filter to filter.

    You have to take into consideration that I changed the priorities for last posts and last comments to 20 and 21 in the development version. This is to locate the latest posts and latest comments as the last output.

    Hope this helps!

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: User Community] Extended Profiles?’ is closed to new replies.