Twitter
Jomsocial Integration for Resource 1.5.8 Build 6285 - Hack

Hi Guys,

 

for complete integration of jomsocial please:

1.: set in configuration of com_resource "Community Integration" to "com_comprofiler"

2.: hack the com_comprofiler.php file (.../components/com_resource/library/php/community/com_comprofiler.php)

<?php defined('_JEXEC') or die('Restricted access'); ?>
<?php

class MRCommunityCom_comprofiler
{
function userName($id, $name)
{
$jspath = JPATH_BASE.DS.'components'.DS.'com_community';
include_once($jspath.DS.'libraries'.DS.'core.php');
$user_profile_link = CRoute::_("index.php?option=com_community&view=profile&userid={$id}");
$out = JHTML::link($user_profile_link, $name);
return $out;
}

function userAvatar($id, $params, $prefix = '')
{

$db =&JFactory::getDBO();

static $users = array();
if(array_key_exists($id, $users)) return $users[$id];

$sql = "SELECT avatar FROM #__community_users WHERE userid = ".$id." AND avatarapproved = 1";
$db->setQuery($sql);
$fname = $db->loadResult();

if($fname)
{
$avatar = '<a href="'. $link .'">'.JHTML::image(JURI::base().''.$fname, $user->get('username'). JText::_('Avatar')).'</a>';
return $users[$id];
}
else
{

$users[$id] = JHTML::image(JURI::base().'components/com_community/assets/user_thumb.png', JText::_('Avatar'));

return $users[$id];

}
}
}

?>

 

3.: have fun!

 

 

cheers Jan

 

Version 1.5.8 Build 6285
License Other
Type Non-Commercial
Extension type Special
Complaint Click to send e-mail online
pdmunichAvatar

pdmunich VIP
 
Votes: 0
Answers: 0
Hits: 1977
Modified: 06 Jun 2011

In Comment section you can leave only reviews. If you have questions or support requests ask in Support Desk / 3DP Extensions category or send Personal Message.

Comments

There are no comments for this item

Be the first to leave a comment

Add New Comment
Name:
Email:
Comment:
Attachment
Hide Comment
Security code:
Enter text as you see on image
 
 

Latest Extensions

What is best way for Download/Installation MightyExtensions?
 


Member Area



Member Activity

We have 1190 guests and 6 members online


MightyTemplate - Professional Joomla Templates