anmerkung: snapshot contenido-cvs-2003-12-12.tar
hab mir jetzt die geschichte beim spaw angesehen (html-element)
da gibts eigentlich nur das problem, dass bei den eingefügten html-elementen alle relativen links in falsche absolute verwandelt werden.
diese korrektur sollte schon in selecttemplate.php in der funktion selectTemplate bevor der code mit innerHtml eingefügt wird geschehen.
somit wären die bilder und links auch innerhalb der vorschau absolut korrekt.
ach ja das erste html kommentar geht verloren...
da gibts eigentlich nur das problem, dass bei den eingefügten html-elementen alle relativen links in falsche absolute verwandelt werden.
diese korrektur sollte schon in selecttemplate.php in der funktion selectTemplate bevor der code mit innerHtml eingefügt wird geschehen.
somit wären die bilder und links auch innerhalb der vorschau absolut korrekt.
ach ja das erste html kommentar geht verloren...
und weil wir schon dabei sind
includes/functions.mod.php - function modTestModule
folgender code komplett raus
ersetzen durch
weitere details findest du unter: http://contenido.de/forum/viewtopic.php ... c&start=21
includes/functions.mod.php - function modTestModule
folgender code komplett raus
Code: Alles auswählen
/*$code = str_replace('CMS_VALUE','$CMS_VALUE', $code);
$code = str_replace('CMS_VAR','$CMS_VAR', $code);*/
$code = str_replace('[CMS_VALUE[','[', $code);
for ($i = 0; $i < 10; $i++) {
$code = str_replace('['.$i.'CMS_VALUE[','['.$i, $code);
}
$code = str_replace(']]',']', $code);
$code = str_replace('$$CMS_','$CMS_', $code);
Code: Alles auswählen
$code = preg_replace(',\[(\d+)?CMS_VALUE\[(\d+)\](\d+)?\],i', '[\1\2\3]', $code);
hier der auszug aus dem snapshot
die neue version
das $code = str_replace('$$CMS_','$CMS_', $code); fliegt auch raus -> wird nicht mehr benötigt...
Code: Alles auswählen
while ($db->next_record())
{
$code = str_replace($db->f("type").'[','$'.$db->f("type").'[', $code);
}
/*$code = str_replace('CMS_VALUE','$CMS_VALUE', $code);
$code = str_replace('CMS_VAR','$CMS_VAR', $code);*/
$code = str_replace('[CMS_VALUE[','[', $code);
for ($i = 0; $i < 10; $i++) {
$code = str_replace('['.$i.'CMS_VALUE[','['.$i, $code);
}
$code = str_replace(']]',']', $code);
$code = str_replace('$$CMS_','$CMS_', $code);
$code = str_replace('CMS_VALUE','$CMS_VALUE', $code);
$code = str_replace('CMS_VAR','$CMS_VAR', $code);
/* If the module is an output module, escape PHP since
all output modules enter php mode */
if ($output == true)
{
$code = "?>\n" . $code . "\n<?php";
}
Code: Alles auswählen
while ($db->next_record())
{
$code = str_replace($db->f("type").'[','$'.$db->f("type").'[', $code);
}
$code = preg_replace(',\[(\d+)?CMS_VALUE\[(\d+)\](\d+)?\],i', '[\1\2\3]', $code);
$code = str_replace('CMS_VALUE','$CMS_VALUE', $code);
$code = str_replace('CMS_VAR','$CMS_VAR', $code);
/* If the module is an output module, escape PHP since
all output modules enter php mode */
if ($output == true)
{
$code = "?>\n" . $code . "\n<?php";
}
das kann man auch für die functions.js.php und functions.style.php verwenden...
ach ja bei functions.html_tpl.php w+b
ach ja bei functions.html_tpl.php w+b
das mit dem spaw tpl weiss ich jetzt nicht genau...in functions.html_tpl.php findet sich folgendes:
Code:
print i18n("Can not open file: $filename");
print i18n("Can not write file: $filename");
print i18n("File $filename is not writable");
dies kann nicht funktionieren da $filename jedesmal anders ist oder ?
besser wäre
Code:
printf(i18n("Can not open file: %s"),$filename);
printf(i18n("Can not write file: %s"),$filename);
printf(i18n("File %s is not writable"),$filename);
dies kann man auch in functions.js.php und in functions.style.php einbauen
und die ergänzungen in contenido.po dem entsprechend vornehmen...
Code:
msgid "Can not open file: %s"
msgstr "Kann die Datei %s nicht öffnen"
msgid "Can not write file: %s"
msgstr "Kann in die Datei %s nicht schreiben"
msgid "File %s is not writable"
msgstr "Die Datei %s ist nicht schreibbar"
ähm dann wars das glaub ich... alles andere wäre dann okayhab mir jetzt die geschichte beim spaw angesehen (html-element)
da gibts eigentlich nur das problem, dass bei den eingefügten html-elementen alle relativen links in falsche absolute verwandelt werden.
ähm weiss jetzt nicht genau wie ich es einfacher schreiben sollte:
in functions.html_tpl.php findet sich folgendes:
Code:
print i18n("Can not open file: $filename");
print i18n("Can not write file: $filename");
print i18n("File $filename is not writable");
dies kann nicht funktionieren da $filename jedesmal anders ist oder ?
besser wäre
Code:
printf(i18n("Can not open file: %s"),$filename);
printf(i18n("Can not write file: %s"),$filename);
printf(i18n("File %s is not writable"),$filename);
damit wird die übersetzung funktionieren...
dies kann man auch in functions.js.php und in functions.style.php einbauen... dort ist noch kein i18n verwendet worden...
und die ergänzungen in contenido.po dem entsprechend vornehmen...
Code:
msgid "Can not open file: %s"
msgstr "Kann die Datei %s nicht öffnen"
msgid "Can not write file: %s"
msgstr "Kann in die Datei %s nicht schreiben"
msgid "File %s is not writable"
msgstr "Die Datei %s ist nicht schreibbar"
in functions.html_tpl.php findet sich folgendes:
Code:
print i18n("Can not open file: $filename");
print i18n("Can not write file: $filename");
print i18n("File $filename is not writable");
dies kann nicht funktionieren da $filename jedesmal anders ist oder ?
besser wäre
Code:
printf(i18n("Can not open file: %s"),$filename);
printf(i18n("Can not write file: %s"),$filename);
printf(i18n("File %s is not writable"),$filename);
damit wird die übersetzung funktionieren...
dies kann man auch in functions.js.php und in functions.style.php einbauen... dort ist noch kein i18n verwendet worden...
und die ergänzungen in contenido.po dem entsprechend vornehmen...
Code:
msgid "Can not open file: %s"
msgstr "Kann die Datei %s nicht öffnen"
msgid "Can not write file: %s"
msgstr "Kann in die Datei %s nicht schreiben"
msgid "File %s is not writable"
msgstr "Die Datei %s ist nicht schreibbar"