Hello,
I'm using the plugin "user self-registration" and want the CKEditor to be the default editor. As it is now I have, as administrator, to change editor for every new user.
Is it possible to set the CKEditor as default, an if, how do I do that?
Best regards
Arne Johansson
CKEditor as default editor
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: CKEditor as default editor
Hey,
currently the plugin doesn't offer an option to actually do that. But it's not so hard to patch out until we add the config option (it would make sense to set defaults for ALL available options, but that is some larger work).
To achieve it in your case, simply edit the common.inc.php file of the plugin and search for this line:
now change that to:
The last line is what's new, it simply sets the option called "wysiwyg" to 1 (yes) by default.
(This will only apply to new users, not existing ones)
HTH,
Garvin
currently the plugin doesn't offer an option to actually do that. But it's not so hard to patch out until we add the config option (it would make sense to set defaults for ALL available options, but that is some larger work).
To achieve it in your case, simply edit the common.inc.php file of the plugin and search for this line:
Code: Select all
serendipity_db_query("UPDATE {$serendipity['dbPrefix']}authors
SET right_publish = '" . ($author['right_publish'] ? '1' : '0') . "',
password = '" . $author['password'] . "'
WHERE authorid = " . (int)$newID);
serendipity_set_config_var('no_create', $author['no_create'], $newID);
serendipity_set_config_var('lang', $serendipity['lang'], $newID);
Code: Select all
serendipity_db_query("UPDATE {$serendipity['dbPrefix']}authors
SET right_publish = '" . ($author['right_publish'] ? '1' : '0') . "',
password = '" . $author['password'] . "'
WHERE authorid = " . (int)$newID);
serendipity_set_config_var('no_create', $author['no_create'], $newID);
serendipity_set_config_var('lang', $serendipity['lang'], $newID);
serendipity_set_config_var('wysiwyg', 1, $newID);
(This will only apply to new users, not existing ones)
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: CKEditor as default editor
(I created a github issue https://github.com/s9y/Serendipity/issues/308 for this to remind me of adding such a feature in the future)
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: CKEditor as default editor
Hey!
This has now been addressed in the new version of the plugin (2.38) that should apeart within the next 24 hours on Spartacus.
This has now been addressed in the new version of the plugin (2.38) that should apeart within the next 24 hours on Spartacus.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/