WYSIWYG Editor(en) gehen nur einmal [SOLVED]
WYSIWYG Editor(en) gehen nur einmal [SOLVED]
nach dem anmelden im Backend kann ich nur einmal den Content-Part WYSIWYG benutzen
- egal welchen Editor ich in der conf.inc.php einstelle -
beim zweiten aufruf oder nach 'Inhalt aktualisieren' kommt nur noch 'reines HTML'
nach Logout und erneutem Login geht es wieder einmal.
Horst
- egal welchen Editor ich in der conf.inc.php einstelle -
beim zweiten aufruf oder nach 'Inhalt aktualisieren' kommt nur noch 'reines HTML'
nach Logout und erneutem Login geht es wieder einmal.
Horst
Last edited by pico on Wed 26. Jan 2005, 12:43, edited 1 time in total.
so - hab jetzt mal in der wysiwyg.editor.inc ein echo eingefügt
wenn man nun den wysiwyg-Editor das erstemal in einer Session aufruft wird der Wert '4' (hab ich so in der config.inc.php) ausgegeben, beim 2. Aufruf wird 'Array' ausgegeben, was wohl meine Vermutung bestätigt, dass die Variable verloren geht
Ich kann leider nicht feststellen wann und wo dieser Datenverlust eintritt
Horst
Code: Select all
if(!isset($wysiwyg_editor['rows'])) $wysiwyg_editor['rows'] = '15';
if(!isset($wysiwyg_editor['editor'])){
$wysiwyg_editor['editor'] = 1;
if(isset($_SESSION["wysiwyg_editor"])) $wysiwyg_editor['editor'] = $_SESSION["wysiwyg_editor"];
}
$wysiwyg_editor['lang'] = isset($_SESSION["wcs_user_lang"]) ? $_SESSION["wcs_user_lang"] : 'en';
echo $wysiwyg_editor['editor']; /* <------- hier */
switch($wysiwyg_editor['editor']) {
Ich kann leider nicht feststellen wann und wo dieser Datenverlust eintritt
Horst
it looks like one of this "flüchtigkeitsfehler". the session is stored in a array field instead of the array.
so in file wysiwig.editor.inc.php change line
to
hope this helps
so in file wysiwig.editor.inc.php change line
Code: Select all
if(isset($_SESSION["wysiwyg_editor"])) $wysiwyg_editor['editor'] = $_SESSION["wysiwyg_editor"];
Code: Select all
if(isset($_SESSION["wysiwyg_editor"])) $wysiwyg_editor = $_SESSION["wysiwyg_editor"];
ok. schnellschüsse sind nicht immer gleich treffer.
but after a closer look I found that OG builds the array at several locations in the code and for the field editor he is using the session value. but instead of filling the field value he fills the entire array in the editor field. so you have to change this at several locations. please look in the following files:
and change it to
but after a closer look I found that OG builds the array at several locations in the code and for the field editor he is using the session value. but instead of filling the field value he fills the entire array in the editor field. so you have to change this at several locations. please look in the following files:
- inc_tmpl/article.editsummary.tmpl.php
inc_tmpl/content/cnt1.inc.php
inc_tmpl/content/cnt14.inc.php
inc_tmpl/content/cnt51.inc.php
inc_tmpl/message.newsletter.tmpl
Code: Select all
'editor' => $_SESSION["wysiwyg_editor"]
Code: Select all
'editor' => $_SESSION["wysiwyg_editor"]["editor"]
found now that the Typ of WYSIWG-Editor is not taken from conf.inc.php
it looks to me that it takes the one who is set in the wysiwyg.edito.inc.php
here:
it looks to me that it takes the one who is set in the wysiwyg.edito.inc.php
here:
Code: Select all
if(!isset($wysiwyg_editor['editor'])){
$wysiwyg_editor['editor'] = 4; /*<<------- hier */
if(isset($_SESSION["wysiwyg_editor"])) $wysiwyg_editor['editor'] = $_SESSION["wysiwyg_editor"][editor];
}
ok thanx to Habi and Herbu
now it looks good
I will now resume all Steps for further users
Step 1 - change in inc_lib/wysiwyg.editor.inc.php line 43 to
Step 2 - search Code
in
inc_tmpl/article.editsummary.tmpl.php
inc_tmpl/content/cnt1.inc.php
inc_tmpl/content/cnt14.inc.php
inc_tmpl/content/cnt51.inc.php
inc_tmpl/message.newsletter.tmpl
and change it to
btw - i think it would be nice to change the Editortyp in the Backend because everyone has some Features I use sometimes
so long and many Thanks again
now it looks good
I will now resume all Steps for further users
Step 1 - change in inc_lib/wysiwyg.editor.inc.php line 43 to
Code: Select all
if(!isset($wysiwyg_editor['editor'])){
$wysiwyg_editor['editor'] = $phpwcms["wysiwyg_editor"];
if(isset($_SESSION["wysiwyg_editor"])) $wysiwyg_editor ['editor'] = $_SESSION["wysiwyg_editor"][editor];
}
Code: Select all
'editor' => $_SESSION["wysiwyg_editor"]
inc_tmpl/article.editsummary.tmpl.php
inc_tmpl/content/cnt1.inc.php
inc_tmpl/content/cnt14.inc.php
inc_tmpl/content/cnt51.inc.php
inc_tmpl/message.newsletter.tmpl
and change it to
Code: Select all
'editor' => $_SESSION["wysiwyg_editor"][editor]
so long and many Thanks again