Link to Ultimate Member Profiles
Quote from glazerjoni on July 16, 2018, 7:50 amThis code works great! But obviously now I have lost the information that was being displayed in Asgaros Forum profile like ‘# of topics started’ etc. Is there a way to incorporate Asgaros Profile data into UM profile page?
This code works great! But obviously now I have lost the information that was being displayed in Asgaros Forum profile like ‘# of topics started’ etc. Is there a way to incorporate Asgaros Profile data into UM profile page?
Quote from glazerjoni on July 18, 2018, 4:09 amAny help on this?
Any help on this?
Quote from Asgaros on July 18, 2018, 11:32 amHello @glazerjoni
Was it working before? Did it happen after the last update?
Hello @glazerjoni
Was it working before? Did it happen after the last update?
Quote from collab on July 19, 2018, 12:27 am@Asgaros
No, it wasn’t working before the update. Using UM Profiles means losing forum-related information.
@glazerjoni
I’ve also wondered about integrating forum activity information with UM, but am not well versed in PHP so I haven’t figured out how to do it just yet.
Here’s a possible framework (modified from UM support docs) which adds a separate profile tab for ‘Forum Activity’.
/***UM Custom tab for Forum Activity***/ add_filter('um_profile_tabs', 'add_custom_profile_tab', 1000 ); function add_custom_profile_tab( $tabs ) { $tabs['forumactivity'] = array( 'name' => 'Forum Activity', 'icon' => 'um-faicon-comments', ); return $tabs; } add_action('um_profile_content_forumactivity_default', 'um_profile_content_forumactivity_default'); function um_profile_content_forumactivity_default( $args ) { echo ''; }That’s the easy part. Accessing the relevant data is another matter. If I come up with a nice solution I’ll let you know.
No, it wasn’t working before the update. Using UM Profiles means losing forum-related information.
I’ve also wondered about integrating forum activity information with UM, but am not well versed in PHP so I haven’t figured out how to do it just yet.
Here’s a possible framework (modified from UM support docs) which adds a separate profile tab for ‘Forum Activity’.
/***UM Custom tab for Forum Activity***/ add_filter('um_profile_tabs', 'add_custom_profile_tab', 1000 ); function add_custom_profile_tab( $tabs ) { $tabs['forumactivity'] = array( 'name' => 'Forum Activity', 'icon' => 'um-faicon-comments', ); return $tabs; } add_action('um_profile_content_forumactivity_default', 'um_profile_content_forumactivity_default'); function um_profile_content_forumactivity_default( $args ) { echo ''; }
That’s the easy part. Accessing the relevant data is another matter. If I come up with a nice solution I’ll let you know.
Quote from glazerjoni on July 19, 2018, 6:42 am@Collab is right. The information that is displayed in the Profile page in Asgaros is not the same as the one in UM (Obviously). However, I was inquiring if its possible to include that info in the UM profile.
@Collab – Interesting code snippet. Let me try it and report back soon. Thanks!
@Collab is right. The information that is displayed in the Profile page in Asgaros is not the same as the one in UM (Obviously). However, I was inquiring if its possible to include that info in the UM profile.
@Collab – Interesting code snippet. Let me try it and report back soon. Thanks!
Quote from childledj on July 19, 2018, 9:52 amQuote from collab on July 19, 2018, 12:27 am
- /***UM Custom tab for Forum Activity***/
- add_filter(‘um_profile_tabs’, ‘add_custom_profile_tab’, 1000 );
- function add_custom_profile_tab( $tabs ) {
- $tabs[‘forumactivity’] = array(
- ‘name’ => ‘Forum Activity’,
- ‘icon’ => ‘um-faicon-comments’,
- );
- return $tabs;
- }
- add_action(‘um_profile_content_forumactivity_default’, ‘um_profile_content_forumactivity_default’);
- function um_profile_content_forumactivity_default( $args ) {
- echo ”;
- }
/***UM Custom tab for Forum Activity***/ add_filter('um_profile_tabs', 'add_custom_profile_tab', 1000 ); function add_custom_profile_tab( $tabs ) { $tabs['forumactivity'] = array( 'name' => 'Forum Activity', 'icon' => 'um-faicon-comments', ); return $tabs; } add_action('um_profile_content_forumactivity_default', 'um_profile_content_forumactivity_default'); function um_profile_content_forumactivity_default( $args ) { echo ''; }That’s the easy part. Accessing the relevant data is another matter. If I come up with a nice solution I’ll let you know.
I’ve tried to insert this code in functions.php in my theme’s folder and nothing changed 🙁
Quote from collab on July 19, 2018, 12:27 am
- /***UM Custom tab for Forum Activity***/
- add_filter(‘um_profile_tabs’, ‘add_custom_profile_tab’, 1000 );
- function add_custom_profile_tab( $tabs ) {
- $tabs[‘forumactivity’] = array(
- ‘name’ => ‘Forum Activity’,
- ‘icon’ => ‘um-faicon-comments’,
- );
- return $tabs;
- }
- add_action(‘um_profile_content_forumactivity_default’, ‘um_profile_content_forumactivity_default’);
- function um_profile_content_forumactivity_default( $args ) {
- echo ”;
- }
/***UM Custom tab for Forum Activity***/ add_filter('um_profile_tabs', 'add_custom_profile_tab', 1000 ); function add_custom_profile_tab( $tabs ) { $tabs['forumactivity'] = array( 'name' => 'Forum Activity', 'icon' => 'um-faicon-comments', ); return $tabs; } add_action('um_profile_content_forumactivity_default', 'um_profile_content_forumactivity_default'); function um_profile_content_forumactivity_default( $args ) { echo ''; }That’s the easy part. Accessing the relevant data is another matter. If I come up with a nice solution I’ll let you know.
I’ve tried to insert this code in functions.php in my theme’s folder and nothing changed 🙁
Quote from collab on July 19, 2018, 7:32 pmQuote from childledj on July 19, 2018, 9:52 amI’ve tried to insert this code in functions.php in my theme’s folder and nothing changed
In WP Admin > Ultimate Member > Settings > Appearance > Profile Menu, there should be an option for the newly created ‘Forum Activity’ tab. Try disabling/re-enabling this, then save changes.
Quote from childledj on July 19, 2018, 9:52 amI’ve tried to insert this code in functions.php in my theme’s folder and nothing changed
In WP Admin > Ultimate Member > Settings > Appearance > Profile Menu, there should be an option for the newly created ‘Forum Activity’ tab. Try disabling/re-enabling this, then save changes.
Quote from collab on July 19, 2018, 7:36 pmHere’s a bit of extra code that will at least link to the user’s forum profile and post history. Can surely be refined further with styles, etc.
/***UM Custom tab for Forum Activity***/ add_filter('um_profile_tabs', 'add_custom_profile_tab', 1000 ); function add_custom_profile_tab( $tabs ) { $tabs['forumactivity'] = array( 'name' => 'Forum Activity', 'icon' => 'um-faicon-comments', ); return $tabs; } add_action('um_profile_content_forumactivity_default', 'um_profile_content_forumactivity_default'); function um_profile_content_forumactivity_default( $args ) { $um_user_name = um_user('user_login'); echo '<a href="' . home_url( '/forum/history/'.$um_user_name) . '">Post History</a><br>'; echo '<a href="' . home_url( '/forum/profile/'.$um_user_name) . '">Forum Profile</a>'; }
Here’s a bit of extra code that will at least link to the user’s forum profile and post history. Can surely be refined further with styles, etc.
/***UM Custom tab for Forum Activity***/ add_filter('um_profile_tabs', 'add_custom_profile_tab', 1000 ); function add_custom_profile_tab( $tabs ) { $tabs['forumactivity'] = array( 'name' => 'Forum Activity', 'icon' => 'um-faicon-comments', ); return $tabs; } add_action('um_profile_content_forumactivity_default', 'um_profile_content_forumactivity_default'); function um_profile_content_forumactivity_default( $args ) { $um_user_name = um_user('user_login'); echo '<a href="' . home_url( '/forum/history/'.$um_user_name) . '">Post History</a><br>'; echo '<a href="' . home_url( '/forum/profile/'.$um_user_name) . '">Forum Profile</a>'; }
Quote from childledj on July 19, 2018, 8:04 pmThank you! Now it works fine!
One more question:
On the bottom of forum profile page is the link “Edit profile” it links to “wp-admin/profile.php”
Ном can I change it to “/user/?profiletab=main&um_action=edit” ???
Thank you! Now it works fine!
One more question:
On the bottom of forum profile page is the link “Edit profile” it links to “wp-admin/profile.php”
Ном can I change it to “/user/?profiletab=main&um_action=edit” ???
Quote from glazerjoni on July 19, 2018, 10:14 pmSweet @Collab! That worked. I do see Post History and Forum Profile showup as links although when I click on them, they go to 404. Will play around to see how to fix that and lead to actual values, rather than 404. And you are right, needs CSS 🙂
Sweet @Collab! That worked. I do see Post History and Forum Profile showup as links although when I click on them, they go to 404. Will play around to see how to fix that and lead to actual values, rather than 404. And you are right, needs CSS 🙂