bbPress Profile Info on UserPro Profile – UserPro Forums https://forum.userproplugin.com/forums/topic/bbpress-profile-info-on-userpro-profile/feed/ Sat, 04 May 2024 21:50:27 +0000 https://bbpress.org/?v=2.6.2 en-US https://forum.userproplugin.com/forums/topic/bbpress-profile-info-on-userpro-profile/#post-40191 <![CDATA[bbPress Profile Info on UserPro Profile]]> https://forum.userproplugin.com/forums/topic/bbpress-profile-info-on-userpro-profile/#post-40191 Fri, 06 Jun 2014 06:01:35 +0000 Lucas Atkins Hi,

I figured it would be a much more seamless user experience if the bbPress profile information could appear on the UserPro profile from view.php file.

I tried the following:

<?php bbp_get_template_part( ‘user’, ‘topics-created’ ); ?>
<?php bbp_get_template_part( ‘user’, ‘replies-created’ ); ?>
<?php bbp_get_template_part( ‘user’, ‘favorites’ ); ?>
<?php bbp_get_template_part( ‘user’, ‘subscriptions’ ); ?>
<?php bbp_get_template_part( ‘user’, ‘user-edit’ ); ?>

These are the calls from the bbPress user profile php file. It displays on the UserPro profile, but says it cannot find user.

So, instead I tried the following:

<?php bbp_get_template_part( ‘$user_id’, ‘topics-created’ ); ?>
<?php bbp_get_template_part( ‘$user_id’, ‘replies-created’ ); ?>
<?php bbp_get_template_part( ‘$user_id’, ‘favorites’ ); ?>
<?php bbp_get_template_part( ‘$user_id’, ‘subscriptions’ ); ?>
<?php bbp_get_template_part( ‘$user_id’, ‘user-edit’ ); ?>

The $user_id seemed like the call UserPro was using. This also did not work.

Any suggestions how what call I could use to properly sync the user account and display the bbPress info on the user’s UserPro profile page?

Thanks!!

]]>
https://forum.userproplugin.com/forums/topic/bbpress-profile-info-on-userpro-profile/#post-40212 <![CDATA[Reply To: bbPress Profile Info on UserPro Profile]]> https://forum.userproplugin.com/forums/topic/bbpress-profile-info-on-userpro-profile/#post-40212 Fri, 06 Jun 2014 10:33:48 +0000 Lucas Atkins Would I need to define a global bbpress call?

Other option would be to embed the UserPro profile into the original bbPress profile page. What is the UserPro php call for current user?

The shortcode for profile=view shows your own profile, but I need it to be able to inherit what user to actually show automatically without me having to manually put in ID

]]>
https://forum.userproplugin.com/forums/topic/bbpress-profile-info-on-userpro-profile/#post-40219 <![CDATA[Reply To: bbPress Profile Info on UserPro Profile]]> https://forum.userproplugin.com/forums/topic/bbpress-profile-info-on-userpro-profile/#post-40219 Fri, 06 Jun 2014 10:37:50 +0000 admin Try $user_id without quotes. $user_id is defined in templates/view templates/edit etc.

]]>
https://forum.userproplugin.com/forums/topic/bbpress-profile-info-on-userpro-profile/#post-40269 <![CDATA[Reply To: bbPress Profile Info on UserPro Profile]]> https://forum.userproplugin.com/forums/topic/bbpress-profile-info-on-userpro-profile/#post-40269 Fri, 06 Jun 2014 10:51:37 +0000 Lucas Atkins So, it should look like:

<?php bbp_get_template_part( $user_id, ‘topics-created’ ); ?>

?

Thanks 🙂

]]>
https://forum.userproplugin.com/forums/topic/bbpress-profile-info-on-userpro-profile/#post-40270 <![CDATA[Reply To: bbPress Profile Info on UserPro Profile]]> https://forum.userproplugin.com/forums/topic/bbpress-profile-info-on-userpro-profile/#post-40270 Fri, 06 Jun 2014 11:00:46 +0000 admin Yes, please try that.

]]>
https://forum.userproplugin.com/forums/topic/bbpress-profile-info-on-userpro-profile/#post-40330 <![CDATA[Reply To: bbPress Profile Info on UserPro Profile]]> https://forum.userproplugin.com/forums/topic/bbpress-profile-info-on-userpro-profile/#post-40330 Fri, 06 Jun 2014 12:12:31 +0000 Lucas Atkins Unfortunately, it did not work. Any other suggestions?

Thanks!

]]>
https://forum.userproplugin.com/forums/topic/bbpress-profile-info-on-userpro-profile/#post-40333 <![CDATA[Reply To: bbPress Profile Info on UserPro Profile]]> https://forum.userproplugin.com/forums/topic/bbpress-profile-info-on-userpro-profile/#post-40333 Fri, 06 Jun 2014 12:14:27 +0000 admin Are you using the code inside templates/view.php?

]]>
https://forum.userproplugin.com/forums/topic/bbpress-profile-info-on-userpro-profile/#post-40353 <![CDATA[Reply To: bbPress Profile Info on UserPro Profile]]> https://forum.userproplugin.com/forums/topic/bbpress-profile-info-on-userpro-profile/#post-40353 Fri, 06 Jun 2014 14:50:18 +0000 Lucas Atkins Yes, I am using the code in that file.

]]>
https://forum.userproplugin.com/forums/topic/bbpress-profile-info-on-userpro-profile/#post-41790 <![CDATA[Reply To: bbPress Profile Info on UserPro Profile]]> https://forum.userproplugin.com/forums/topic/bbpress-profile-info-on-userpro-profile/#post-41790 Sun, 17 Aug 2014 22:26:47 +0000 schizmit Hi there! I am not sure if you found a solution to this or not. I also was looking to get the profile info from BBPress to show up on the UserPro profile page. The solution that worked for me is as follows!

<?php
echo ‘<br>Role: ‘.bbp_get_user_display_role(bbp_get_reply_author_id());
echo ‘<br>Replies: ‘.bbp_get_user_reply_count_raw(bbp_get_reply_author_id());
echo ‘<br>Topics: ‘. bbp_get_user_topic_count_raw(bbp_get_reply_author_id());
?>

Hope that lends a hand! 🙂

]]>
https://forum.userproplugin.com/forums/topic/bbpress-profile-info-on-userpro-profile/#post-41866 <![CDATA[Reply To: bbPress Profile Info on UserPro Profile]]> https://forum.userproplugin.com/forums/topic/bbpress-profile-info-on-userpro-profile/#post-41866 Thu, 21 Aug 2014 21:58:39 +0000 schizmit Hello again!
I’ve been working on this a bit more, while the above option I posted earlier will let you list the info, it doesnt actually work as a link to anything, it only displays the stats. I wanted to take this a step further and actually have links to post and whatnot.

I had initially made a child template for the UserPro Plugin, I was stuck for a bit, the file I needed to edit is called view.php. You would find this file in UserPro/templates/view.php. I am not sure why but for whatever reason if I edit this file in a child theme, the changes I make do not display, which is likely why Lucas (who started this topic) isnt seeing any results with the recommendation from Ahmed to use:

<?php bbp_get_template_part( $user_id, ‘topics-created’ ); ?>

The ” $user_id ” is the correct call for the user, however these changes only seem to become active if you directly edit the view.php file in the original UserPro plugin, instead of the child theme. I am not sure why I can’t get it to excute via child theme, so any insight on that would be helpful, as I dont want it to overwrite changes after an update.

Anyway, after determining that it does in fact work, this is what I have added to the bottom of the view.php file.

<div id=”bbp-user-topics-started” class=”myforumtest”>

<div class=”bbp-user-section”> <h2 class=”entry-title”><?php _e( ‘Forum Topics Started’, ‘bbpress’ ); ?></h2>

<?php if ( bbp_get_user_topics_started( $user_id, ‘topics-created’) ) : ?>

<?php bbp_get_template_part( ‘pagination’, ‘topics’ ); ?>

<?php bbp_get_template_part( ‘loop’, ‘topics’ ); ?>

<?php else : ?>

<p><?php bbp_is_user_home() ? _e( ‘You have not created any topics.’, ‘bbpress’ ) : _e( ‘This user has not created any topics.’, ‘bbpress’ ); ?></p>

<?php endif; ?>

</div>
</div><!– #bbp-user-topics-started –>

<div id=”bbp-user-replies-created” class=”myforumtest”>

<div class=”bbp-user-section”> <h2 class=”entry-title”><?php _e( ‘Forum Replies Created’, ‘bbpress’ ); ?></h2>

<?php if ( bbp_get_user_replies_created( $user_id, ‘replies-created’) ) : ?>

<?php bbp_get_template_part( ‘pagination’, ‘replies’ ); ?>

<?php bbp_get_template_part( ‘loop’, ‘replies’ ); ?>

<?php else : ?>

<p><?php bbp_is_user_home() ? _e( ‘You have not replied to any topics.’, ‘bbpress’ ) : _e( ‘This user has not replied to any topics.’, ‘bbpress’ ); ?></p>

<?php endif; ?>

</div>
</div><!– #bbp-user-replies-created –>

<div id=”bbp-user-favorites” class=”myforumtest”>

<div class=”bbp-user-section”> <h2 class=”entry-title”><?php _e( ‘Favorite Forum Topics’, ‘bbpress’ ); ?></h2>

<?php if ( bbp_get_user_favorites( $user_id, ‘favorites’) ) : ?>

<?php bbp_get_template_part( ‘pagination’, ‘topics’ ); ?>

<?php bbp_get_template_part( ‘loop’, ‘topics’ ); ?>

<?php else : ?>

<p><?php bbp_is_user_home() ? _e( ‘You currently have no favorite topics.’, ‘bbpress’ ) : _e( ‘This user has no favorite topics.’, ‘bbpress’ ); ?></p>

<?php endif; ?>

</div>
</div><!– #bbp-user-favorites –>

<div id=”bbp-user-subscriptions” class=”myforumtest”>

<div class=”bbp-user-section”> <h2 class=”entry-title”><?php _e( ‘Subscribed Forums’, ‘bbpress’ ); ?></h2>

<?php if ( bbp_get_user_forum_subscriptions( $user_id, ‘subscriptions’) ) : ?>

<?php bbp_get_template_part( ‘pagination’, ‘topics’ ); ?>

<?php bbp_get_template_part( ‘loop’, ‘forums’ ); ?>

<?php else : ?>

<p><?php bbp_is_user_home() ? _e( ‘You are not currently subscribed to any forums.’, ‘bbpress’ ) : _e( ‘This user is not currently subscribed to any forums.’, ‘bbpress’ ); ?></p>

<?php endif; ?>

</div>
</div><!– #bbp-user-subscriptions –>

<div id=”bbp-user-subscriptions” class=”myforumtest”>

<div class=”bbp-user-section” ><h2 class=”entry-title”><?php _e( ‘Subscribed Topics’, ‘bbpress’ ); ?></h2>

<?php if ( bbp_get_user_topic_subscriptions( $user_id, ‘subscriptions’) ) : ?>

<?php bbp_get_template_part( ‘pagination’, ‘topics’ ); ?>

<?php bbp_get_template_part( ‘loop’, ‘topics’ ); ?>

<?php else : ?>

<p><?php bbp_is_user_home() ? _e( ‘You are not currently subscribed to any topics.’, ‘bbpress’ ) : _e( ‘This user is not currently subscribed to any topics.’, ‘bbpress’ ); ?></p>

<?php endif; ?>

</div>
</div><!– #bbp-user-topic-subscriptions –>

Adding this to the view.php file, allows the user specific forums post for each individual user, so we can now see recent post, recent replies, subscriptions and favorites, and then link to the appropriate post. If anyone could shed any light as to why I can’t do this via a child theme I would be most happy! ^_^

]]>