Skip to Content Skip to Menu

Link for user's Profile goes to GroupJive, not user's CB profile, from UddeIM

  • gjschaller
  • gjschaller
  • OFFLINE
  • Posts: 169
  • Thanks: 21
  • Karma: 7
9 years 2 weeks ago #273004 by gjschaller
I posted to CB for support, but the problem is ONLY with UddeIM, and not CB or Kunena. Can you assist with this?

www.joomlapolis.com/forum/153-professional-member-support/231703-uddeim-and-cb--gj-profile-link#272973

Geoffrey Schaller
Technical Officer
www.knightrealms.com

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
9 years 2 weeks ago #273009 by krileon
Profile URL appears to be generated incorrectly or using the old task. Below is raw profile URL now.

index.php?option=com_comprofiler&view=userprofile&user=USER_ID

Ideally the below API should be used though.

Code:
$cbUser = CBuser::getInstance( USER_ID_HERE, false ); $avatar = $cbUser->getField( 'avatar', null, 'html', 'none', 'list', 0, true ); $name = $cbUser->getField( 'formatname', null, 'html', 'none', 'list', 0, true );

The above uses fields API to request the avatar and formatted name. Both will be linked to profile by CB directly. The avatar will be thumbnail. Alternatively the below can be used to let CB generate the URL.

Code:
global $_CB_framework; $url = $_CB_framework->userProfileUrl( USER_ID_HERE );


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
9 years 2 weeks ago - 9 years 2 weeks ago #273020 by slabbi
global $_CB_framework;
$url = $_CB_framework->userProfileUrl( (int)$ofanid );

gives

Fatal error: Call to a member function userProfileUrl() on a non-object

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer
Last edit: 9 years 2 weeks ago by slabbi.

Please Log in or Create an account to join the conversation.

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
9 years 2 weeks ago #273021 by slabbi

Please Log in or Create an account to join the conversation.

  • slabbi
  • slabbi
  • OFFLINE
  • Posts: 3709
  • Thanks: 250
  • Karma: 153
9 years 2 weeks ago #273022 by slabbi
And

Fatal error: Class 'CBuser' not found

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
9 years 2 weeks ago #273043 by krileon
Then CB API has not been loaded. You need to load CBs API first before it can be used. This is done with the following.

Code:
global $_PLUGINS; if ( ( ! file_exists( JPATH_SITE . '/libraries/CBLib/CBLib/Core/CBLib.php' ) ) || ( ! file_exists( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' ) ) ) { echo 'CB not installed'; return; } include_once( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' ); cbimport( 'cb.html' ); cbimport( 'language.front' );

For minimal loading remove the 2 imports.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantslabbikrileon
Powered by Kunena Forum