Keyword

CB K2 Integration.

  • Anthony
  • Anthony's Avatar Topic Author
  • Offline
  • New Member
More
10 years 9 months ago #122987 by Anthony
CB K2 Integration. was created by Anthony
Okay so I'm aware community Builder has been integrated to a degree with K2 as far as using the members name, avatar and linking to the profile page.

I'm wanting to also pull a custom "description" field from community builder and replace the member description that appears on the items page. What i'd like to know is what files (that call on the community builder field data in place if k2 info) will i need to adjust to do this?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 9 months ago #122988 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: CB K2 Integration.
Hello Anthony,

I cannot help you with the CB code but I can assist you with K2.
The user details appear in two places. Inside the item.php and inside the user page(blog) which is user.php

To locate these files please read the following tutorial: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

in item.php the author description should look like:
<?php if($this->item->params->get('itemAuthorDescription') && !empty($this->item->author->profile->description)): ?>
      <p><?php echo $this->item->author->profile->description; ?></p>
      <?php endif; ?>

and in user.php
<?php if ($this->params->get('userDescription') && trim($this->user->profile->description)): ?>
			<div class="userDescription"><?php echo $this->user->profile->description; ?></div>
			<?php endif; ?>

Similar code to the above exists in the mod_k2_users module as well.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Anthony
  • Anthony's Avatar Topic Author
  • Offline
  • New Member
More
10 years 9 months ago #122989 by Anthony
Replied by Anthony on topic Re: CB K2 Integration.
cheers for the reply, it wasnt so much help with the code per se, more a general idea on where your code is that calls for the cb info in place of k2 user info. I'd imaging it would be a case of mimicing the code for say pulling that avatar but replacing the db table field with the relevant one I want to use. Thank you for taking the time to respond.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 9 months ago #122990 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: CB K2 Integration.
I do not know how CB works in that field. You should get the user ID from K2 which is shared with CB and replace the elements I sent you.

For the elements that you need to enter (the query and the retrieved object) you have to ask the CB developers.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum