Hi,
I'm developping a multilingual site (french and german).
There is a problem in the front end form.
The editor toolbar is in english although the languages files are installed (for Phoca Guestbook and Tiny Mce).
In the Tiny mce parameters, the option "Detect the language" is checked !
Any idea ?
Thank you.
Editor toolbar
- Jan
- Phoca Hero
- Posts: 48536
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Editor toolbar
Hi, confirmed, the options path changed in editors, will be fixed in next version:

Thank you for the info.
Jan

Thank you for the info.
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 4
- Joined: 03 Aug 2016, 18:41
Re: Editor toolbar
I've founded the problem.
There is an error in the file ..\components\com_phocaguestbook\models\fields\phocaeditor.php line 68.
The lang prefix is forced to "en'.
The right code is : with a variable instead of 'en'.
There is an error in the file ..\components\com_phocaguestbook\models\fields\phocaeditor.php line 68.
Code: Select all
$langPrefix = $paramsE->get('lang_code','en');
The right code is :
Code: Select all
$langPrefix = $paramsE->get('lang_code', substr(strval($language->getTag()), 0,2));
- Jan
- Phoca Hero
- Posts: 48536
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Editor toolbar
It needs to be accepted the option of the plugin if the language should be changed or not
Code: Select all
$user = JFactory::getUser();
$language = JFactory::getLanguage();
$theme = 'modern';
$ugroups = array_combine($user->getAuthorisedGroups(), $user->getAuthorisedGroups());
// Prepare the parameters
$levelParams = new Joomla\Registry\Registry;
$extraOptions = new stdClass;
$toolbarParams = new stdClass;
$configuration = $paramsE->get('configuration');
$extraOptionsAll = $configuration->setoptions;
$toolbarParamsAll = $configuration->toolbars;
// Get configuration depend from User group
foreach ($extraOptionsAll as $set => $val)
{
$val->access = empty($val->access) ? array() : $val->access;
// Check whether User in one of allowed group
foreach ($val->access as $group)
{
if (isset($ugroups[$group]))
{
$extraOptions = $val;
$toolbarParams = $toolbarParamsAll->$set;
}
}
}
// Merge the params
$levelParams->loadObject($toolbarParams);
$levelParams->loadObject($extraOptions);
// List the skins
$skindirs = glob(JPATH_ROOT . '/media/editors/tinymce/skins' . '/*', GLOB_ONLYDIR);
// Set the selected skin
$skin = 'lightgray';
$side = $app->isClient('administrator') ? 'skin_admin' : 'skin';
if ((int) $levelParams->get($side, 0) < count($skindirs))
{
$skin = basename($skindirs[(int) $levelParams->get($side, 0)]);
}
$langMode = $levelParams->get('lang_mode', 1);
$langPrefix = $levelParams->get('lang_code', 'en');
If you find Phoca extensions useful, please support the project
- Jan
- Phoca Hero
- Posts: 48536
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Editor toolbar
Hi, set in version 3.0.7:
https://www.phoca.cz/news/963-phoca-gue ... 7-released
Please test and let me know.
Thank you, Jan
https://www.phoca.cz/news/963-phoca-gue ... 7-released
Please test and let me know.
Thank you, Jan
If you find Phoca extensions useful, please support the project