Posts: 7
Threads: 1
Joined: Jul 2012
I have a problem. I would like to define in the users xml, different ckeditor setups. I have only managed to change this globally so far in gsconfig.php.
Any help is greatly appreciated!
Posts: 2,928
Threads: 195
Joined: Feb 2011
Hi, hannesr,
I can't help, this is getSimple, not GetComplex ;=)
there is no way to do this, this is no feature of GetSimple
Posts: 6,266
Threads: 181
Joined: Sep 2011
You could make a plugin to define the config depending on the user, you would have to make sure it is not already defined in the gsconfig.
Posts: 7
Threads: 1
Joined: Jul 2012
2013-03-26, 06:00:54
(This post was last modified: 2013-03-26, 06:03:53 by hannesr.)
Yes, I know... I just thought it might be a way since you can set html true or false, maybe there also was a way for more options here. But if not, I think I'll go the plugin route.
(2013-03-26, 04:54:01)Connie Wrote: Hi, hannesr,
I can't help, this is getSimple, not GetComplex ;=)
there is no way to do this, this is no feature of GetSimple
Thanks for the tip, I'll try that... Not exactly sure where to begin on this one, but I'll figure it out
. For future reference I'll share here how I did, if I'm successful.
(2013-03-26, 05:16:37)shawn_a Wrote: You could make a plugin to define the config depending on the user, you would have to make sure it is not already defined in the gsconfig.
Posts: 6,266
Threads: 181
Joined: Sep 2011
Not really as we do not officially support multi users in core.
Posts: 6,266
Threads: 181
Joined: Sep 2011
You can skip the plugin method and use my component hook plugin.
Then use a hook that is after the user file is loaded, probably "common"
Then check the users config
PHP Code:
// psuedo code
function getUserCke(){
GLOBAL $datau;
if ($datau->cketool)
if (!defined('GSEDITORTOOL') define('GSEDITORTOOL',$datau>cketool);
// repeat for GSEDITORLANG, GSEDITOROPTIONS etc
}
Posts: 7
Threads: 1
Joined: Jul 2012
(2013-03-26, 07:24:19)shawn_a Wrote: You can skip the plugin method and use my component hook plugin.
Then use a hook that is after the user file is loaded, probably "common"
Then check the users config
PHP Code:
// psuedo code
function getUserCke(){
GLOBAL $datau;
if ($datau->cketool)
if (!defined('GSEDITORTOOL') define('GSEDITORTOOL',$datau>cketool);
// repeat for GSEDITORLANG, GSEDITOROPTIONS etc
}
Great! Thanks!
Posts: 7
Threads: 1
Joined: Jul 2012
(2013-03-26, 07:24:19)shawn_a Wrote: You can skip the plugin method and use my component hook plugin.
Then use a hook that is after the user file is loaded, probably "common"
Then check the users config
PHP Code:
// psuedo code
function getUserCke(){
GLOBAL $datau;
if ($datau->cketool)
if (!defined('GSEDITORTOOL') define('GSEDITORTOOL',$datau>cketool);
// repeat for GSEDITORLANG, GSEDITOROPTIONS etc
}
Worked beautifully, thanks!
Posts: 3,491
Threads: 106
Joined: Mar 2010
I made a
small plugin for this.