if you want to show messages in frontend build a external menu to
index.php?option=com_aicontactsafe&sTask=messages
for fix errors on show messages do:
to allow admin select multiple groups that have access to messages in frontend in 'joomla >= 1.6' :
in:
/administrator/components/com_aicontactsafe/views/control_panel/view.html.php
search:
return JHTML::_('select.genericlist'
change line to :
$this->gid_messages = explode(",",$this->gid_messages);
return JHTML::_('select.genericlist', $groups, 'gid_messages[]', $attribs, 'value', 'text', $this->gid_messages );
to store multiple groupe that selected in database in 'joomla >= 1.6' :
in:
/administrator/components/com_aicontactsafe/models/control_panel.php
search:
$gid_messages = $postData;
add after it:
if(version_compare(JVERSION, '1.6.0', 'ge')) $gid_messages = implode(",",$gid_messages);
fix for user that have access to messages based on his/her groups
note: in joomla >= 1.6 users can assign to multiple groups
in file:
/administrator/components/com_aicontactsafe/models/messages.php
search:
$gid_user_id = $user->get('gid');
if ($gid_user_id < $this->_config_values && $this->_config_values != 29 && !$this->_backend) {
change to:
$gid_user_id = (version_compare(JVERSION, '1.6.0', 'ge')?JUserHelper::getUserGroups($user->id):$user->get('gid'));
$userallowed = 0;
if(version_compare(JVERSION, '1.6.0', 'ge')) {
$gidm = explode(",",$this->_config_values);
$gids = str_replace($gid_user_id, "ok", $gidm, $userallowed);
} else if($gid_user_id >= $this->_config_values) $userallowed = 1;
if (!$userallowed && $this->_config_values != 29 && !$this->_backend) {
This phrase has been repeated in two places
Both must change
fix for form action url:
in file:
/administrator/components/com_aicontactsafe/views/default/view.html.phpsearch
function getTmplHeader()
change function code to:
function getTmplHeader() {
$header = '<form action="'.JURI::getInstance().'" method="post" name="adminForm" id="adminForm">';
return $header;
}
lost language phrases in frontend:
in:
/language/en-GB/en-GB.com_aicontactsafe.ini
add to end of file:
COM_AICONTACTSAFE_CHANGE_STATUS_TO="Change status to"
COM_AICONTACTSAFE_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST="Please make a selection from the list"
COM_AICONTACTSAFE_RE="RE:"
COM_AICONTACTSAFE_REPLY_SENT="Reply sent."
COM_AICONTACTSAFE_CONFIRM="Confirm"
COM_AICONTACTSAFE_SELECTED_MESSAGES_WERE_DELETED="Selected messages were deleted."
COM_AICONTACTSAFE_MESSAGES_STATUS_CHANGED="Messages status changed !"
COM_AICONTACTSAFE_CLOSE="Close"