Also in the settings.xml add the last option:
<field name="user_profile" type="list" label="COM_RSEVENTSPRO_CONF_USER_PROFILE" description="COM_RSEVENTSPRO_CONF_USER_PROFILE_DESC" default="0">
<option value="0">COM_RSEVENTSPRO_CONF_USER_PROFILE_NONE</option>
<option value="1">COM_RSEVENTSPRO_CONF_USER_PROFILE_JS</option>
<option value="2">COM_RSEVENTSPRO_CONF_USER_PROFILE_CB</option>
<option value="3">COM_RSEVENTSPRO_CONF_USER_AVATAR_EASY_PROFILE</option>
</field>
to support link to attendies user profile.
<field name="event_owner_profile" type="list" label="COM_RSEVENTSPRO_CONF_EVENT_OWNER_PROFILE" description="COM_RSEVENTSPRO_CONF_EVENT_OWNER_PROFILE_DESC" default="0">
<option value="0">COM_RSEVENTSPRO_CONF_USER_PROFILE_NONE</option>
<option value="1">COM_RSEVENTSPRO_CONF_USER_PROFILE_JS</option>
<option value="2">COM_RSEVENTSPRO_CONF_USER_PROFILE_CB</option>
<option value="3">COM_RSEVENTSPRO_CONF_USER_AVATAR_EASY_PROFILE</option>
</field>
To support Event owner link to user profile
<field name="event_owner" type="list" label="COM_RSEVENTSPRO_CONF_EVENT_OWNER" description="COM_RSEVENTSPRO_CONF_EVENT_OWNER_DESC" default="0">
<option value="0">COM_RSEVENTSPRO_CONF_USER_DISPLAY_NAME</option>
<option value="1">COM_RSEVENTSPRO_CONF_USER_DISPLAY_USERNAME</option>
<option value="2">COM_RSEVENTSPRO_CONF_USER_DISPLAY_JS</option>
<option value="3">COM_RSEVENTSPRO_CONF_USER_DISPLAY_CB</option>
<option value="4">COM_RSEVENTSPRO_CONF_USER_AVATAR_EASY_PROFILE</option>
</field>
to support display of owner name from easyprofile.
And in rseventspro.php add the part that says Easy profile:
public static function getProfile($type, $id) {
$profile = $type == 'guests' ? rseventsproHelper::getConfig('user_profile','int') : rseventsproHelper::getConfig('event_owner_profile','int');
$url = '';
if (!empty($profile)) {
// JomSocial
if ($profile == 1) {
if (file_exists(JPATH_SITE.'/components/com_community/libraries/core.php')) {
include_once(JPATH_SITE.'/components/com_community/libraries/core.php');
$url = CRoute::_('index.php?option=com_community&view=profile&userid='.$id);
}
}
// Community Builder
else if ($profile == 2) {
if (file_exists(JPATH_ADMINISTRATOR.'/components/com_comprofiler/plugin.foundation.php')) {
include_once(JPATH_ADMINISTRATOR.'/components/com_comprofiler/plugin.foundation.php');
global $_CB_framework;
cbimport('cb.database');
$url = $_CB_framework->userProfileUrl( $id, true );
}
}
// Easy Profile
else if ($profile == 3) {
if (file_exists(JPATH_SITE.'/components/com_jsn/helpers/helper.php')) {
include_once(JPATH_SITE.'/components/com_jsn/helpers/helper.php');
$user = JsnHelper::getUser($id);
$url = $user->getLink();
}
}
}
And this to get the owner name from easy profile:
public static function getUser($uid, $type = 'owner') {
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$user = JFactory::getUser($uid);
$option = $type == 'guest' ? rseventsproHelper::getConfig('user_display','int') : rseventsproHelper::getConfig('event_owner','int');
if (!$uid) {
return JText::_('COM_RSEVENTSPRO_GLOBAL_GUEST');
}
if ($option == 0) {
return $user->name;
} elseif ($option == 1) {
return $user->username;
} elseif ($option == 2) {
if (file_exists(JPATH_SITE.'/components/com_community/libraries/core.php')) {
include_once JPATH_SITE.'/components/com_community/libraries/core.php';
$user = CFactory::getUser($uid);
return $user->getDisplayName();
} else return $user->name;
} elseif ($option == 3) {
$query->clear()
->select($db->qn('firstname'))->select($db->qn('middlename'))->select($db->qn('lastname'))
->from($db->qn('#__comprofiler'))
->where($db->qn('user_id').' = '.(int) $uid);
$db->setQuery($query);
if ($details = $db->loadObject()) {
return $details->firstname.' '.$details->middlename.' '.$details->lastname;
}
return $user->name;
} elseif ($option == 4) {
if (file_exists(JPATH_SITE.'/components/com_jsn/helpers/helper.php')) {
include_once(JPATH_SITE.'/components/com_jsn/helpers/helper.php');
$user = JsnHelper::getUser($uid);
}
return $user->name;
} else return $user->name;
}