Display social bar of logged user – UserPro Forums https://forum.userproplugin.com/forums/topic/display-social-bar-of-logged-user/feed/ Tue, 07 May 2024 00:12:38 +0000 https://bbpress.org/?v=2.6.2 en-US https://forum.userproplugin.com/forums/topic/display-social-bar-of-logged-user/#post-19123 <![CDATA[Display social bar of logged user]]> https://forum.userproplugin.com/forums/topic/display-social-bar-of-logged-user/#post-19123 Mon, 27 Jan 2014 15:27:07 +0000 Adriano Maia Hi!
When i’m editing the view.php i can use: echo $userpro->show_social_bar( $args, $user_id, ‘userpro-icons’ );

But when i’m another page, how can i display the social bar of a logged user?

]]>
https://forum.userproplugin.com/forums/topic/display-social-bar-of-logged-user/#post-19279 <![CDATA[Reply To: Display social bar of logged user]]> https://forum.userproplugin.com/forums/topic/display-social-bar-of-logged-user/#post-19279 Tue, 28 Jan 2014 22:52:02 +0000 admin To use/show the social icons outside view.php you can use the integratable version (with easy API method)

here is an example: echo $this->show_social_bar_clean( ‘user_id’ );

That’s it! This is an example already used in bbPress forum integration, you can integrate the social icons bar anywhere you want via the UserPro API function above. If you want to use a wrapper (custom div wrapping) do it like this:

echo $userpro->show_social_bar_clean( $user_id, ‘userpro-icons’ );

Thanks, hope that helps!

]]>
https://forum.userproplugin.com/forums/topic/display-social-bar-of-logged-user/#post-19341 <![CDATA[Reply To: Display social bar of logged user]]> https://forum.userproplugin.com/forums/topic/display-social-bar-of-logged-user/#post-19341 Wed, 29 Jan 2014 11:26:17 +0000 Adriano Maia Thanks!!! 🙂

]]>
https://forum.userproplugin.com/forums/topic/display-social-bar-of-logged-user/#post-19363 <![CDATA[Reply To: Display social bar of logged user]]> https://forum.userproplugin.com/forums/topic/display-social-bar-of-logged-user/#post-19363 Wed, 29 Jan 2014 12:48:08 +0000 admin You’re welcome.

]]>
https://forum.userproplugin.com/forums/topic/display-social-bar-of-logged-user/#post-20472 <![CDATA[Reply To: Display social bar of logged user]]> https://forum.userproplugin.com/forums/topic/display-social-bar-of-logged-user/#post-20472 Sat, 08 Feb 2014 14:45:40 +0000 pbg2013 Hi. I added this code to my bbpress loop-single-reply.php but the social icons are not showing up?

<?php
/* Integrating UserPro */
global $userpro;
$link = preg_replace(“/(?<=href=(\”|’))[^\”‘]+(?=(\”|’))/”, $userpro->permalink( bbp_get_reply_author_id() ),
bbp_get_reply_author_link( array( ‘sep’ => ‘<br />’, ‘show_role’ => false ) ) );
echo $link . userpro_show_badges( bbp_get_reply_author_id() );
echo $userpro->show_social_bar_clean( $user_id, ‘userpro-icons’ );
?>

What am I doing wrong? It only shows the verified badge and flag. I copied the files from your integration thread. My forum is not looking like yours 🙁

]]>
https://forum.userproplugin.com/forums/topic/display-social-bar-of-logged-user/#post-20493 <![CDATA[Reply To: Display social bar of logged user]]> https://forum.userproplugin.com/forums/topic/display-social-bar-of-logged-user/#post-20493 Sat, 08 Feb 2014 21:48:34 +0000 admin $user_id should be bbp_get_reply_author_id() remember user_id is dynamic, so you need to adapt it depending on how your user ID is stored (bbpress, buddypress, etc..)

]]>
https://forum.userproplugin.com/forums/topic/display-social-bar-of-logged-user/#post-20504 <![CDATA[Reply To: Display social bar of logged user]]> https://forum.userproplugin.com/forums/topic/display-social-bar-of-logged-user/#post-20504 Sun, 09 Feb 2014 01:18:26 +0000 pbg2013 Great! Thanks!

echo $userpro->show_social_bar_clean( bbp_get_reply_author_id(), ‘userpro-icons’ );

This works.

]]>
https://forum.userproplugin.com/forums/topic/display-social-bar-of-logged-user/#post-20529 <![CDATA[Reply To: Display social bar of logged user]]> https://forum.userproplugin.com/forums/topic/display-social-bar-of-logged-user/#post-20529 Sun, 09 Feb 2014 11:08:44 +0000 admin You’re welcome!

]]>