CJBlog Easy Profile integration?

ruud
ruud
  • ruud
  • 10 months ago
Hi Maverick,

Working on a new website and I am defaulting again to CJBlog for the blog component :)
Because it is a community website I will be using Easy Profile to capture user details.

Easy Profile is able to propagate itself als 'JomSocial': e.g. when I configure in Kunena to use the JomSocial avatar, it will actually use the Easy Profile avatar.

I noticed that when I instruct CJBlog to use JomSocial it doesn't work. I was able to fix that with my limited developer knowledge.

So on the blogpage (article) I see the Easyblog avatar, when clicking on the avatar it redirects me to the CJBlog user profile page. (It redirected me to the user details page, but I was able to change that :) you can see it working here on my testsite: http://xceed.no-ip.org/cm_test/blogs/12-community-management/7-community-management

I addded in administrator cjblog config.xml:

<field name="user_avatar" type="list" class="btn-group" default="none" label="COM_CJBLOG_USER_AVATAR" description="COM_CJBLOG_USER_AVA$
<option value="easyprofile">EasyProfile</option>


I altered the cjlib functions.php:
                        case 'easyprofile':

if(!$userid)
{
return CjFunctions::get_user_avatar('gravatar', $userid, $displayname, $height, $email, $attribs, $img_attribs$
}
include_once( JPATH_ROOT . DS . 'components' . DS . 'com_cjblog' . DS . 'api.php' );
include_once( JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'defines.community.php' );
require_once( JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php' );
require_once( JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'helpers' . DS . 'string.php' );
$user = CFactory::getUser( $userid );
$name = $displayname;
$userLink = CjBlogApi::get_user_profile_url($userid, 'name', true, null, true);
$avatar_image = JHtml::image($user->getThumbAvatar(), $name, $img_attribs);
$avatar = $userid > 0 ? JHtml::link($userLink, $avatar_image, $attribs) : JHtml::link('#', $avatar_image, $attribs);

break;


Here is the request:
I want to use the cjblog user profile page (because it is perfect :))
On the CJBlog profile page (and on the articles) I want the Easy Profile avatar
On the CJBlog page (and on the articles) I want the profile text to come from a Easy Profile field (variable)

When editing the avatar or the profile text on the CJbog user profile page it should redirect to Easy Profile user details page (where the user has the ability to edit the details).

I think this will really add value, keep user detail centralized (so not on different components e.g. joomla, cjblog, kunena, etc.), unfortunately I lack the knowledge to add this functionality myself :(

Is this something we can work on? What would be the way to proceed? I will also inform the Easy Profile developer :)

Thanks in advance,
Ruud.

Access to viewing replies is restricted.
Showing 19 of 19 replies
You do not have permissions for replying to this topic.
Loading...
Confirm delete? This action is irreversible and the data will be deleted permanently. Do you want to continue? Confirm Add New Delete Unpublish Cancel Import Uninstall The selected item successfully deleted.
Shondalai