Verfasst: Mi 31. Dez 2003, 12:23
keine Ahnung, ich hab's nicht verbrochen.
Das Diskussionsforum zum Open Source Content Management System
https://forum.contenido.org/
ähm wieso ? nimmt die update routine dann rücksicht darauf ? bei einem drop table ?timo hat geschrieben:Neue Info:
Wenn du Plugins entwickelst, solltest du ID's über 10000 verwenden (bei areas, actions, files, frame_files, nav_sub und nav_main).
Code: Alles auswählen
<content/>
<errors/>
</language>
Ja. Drop table gibts ja nicht im Installer, und das DELETE-Statement wurde angepasst.emergence hat geschrieben: ähm wieso ? nimmt die update routine dann rücksicht darauf ? bei einem drop table ?
Da machst du dir doppelte Arbeit, von unserer Seite gibts auf jeden Fall so ein Teil...nur wann, ist die Frage.wie lange ich für den de/installer brauch weiss ich noch nicht... vielleicht ist er ja dann ebenso mit fertig...
Code: Alles auswählen
if(strstr($value2['location'],$con_cfg['PathPlugins'])) {
$plugxml->load($value2['location'].'lang_de.xml');
$main=$plugxml->valueOf("language/main");
}else{
$main = $xml->valueOf($cfgPath['xmlroot'] . $value2["location"]);
}
Code: Alles auswählen
if(strstr($value2['location'], ';')) {
$locs = explode(";", $value2['location']);
$file = trim($locs[0]);
$value2['location'] = trim($locs[1]);
$plugxml->load($cfg["path"]["plugins"].$file);
$main=$plugxml->valueOf("language/main");
}else{
$main = $xml->valueOf($cfgPath['xmlroot'] . $value2["location"]);
}
Code: Alles auswählen
...
<language>
<navigation>
<main>Kalender</main>
<extra>...
Code: Alles auswählen
/* Include the plugin configuration */
$handle = opendir($cfg['path']['contenido'] . $cfg["path"]['plugins'] );
while ($plugin = readdir($handle))
{
$configfile = $cfg['path']['contenido'] . $cfg["path"]['plugins'] . $plugin . "/includes/config.plugin.php";
$localedir = $cfg['path']['contenido'] . $cfg["path"]['plugins'] . $plugin . "/locale/";
if (@file_exists($localedir) && $plugin != "..")
{
i18nRegisterDomain($plugin, $localedir);
}
if (@file_exists($configfile))
{
include($configfile);
}
}
mit etwas glück schaffe ich es heute noch mir das anzusehen...llconsult hat geschrieben:ich habe alle Dateien hier abgelegt:
http://www.ll-consult.de/download/Zitat_plugin.zip
der aktuelle stand der contenido 4.5.x serie.llconsult hat geschrieben:Worum handelt es sich bei der CVS_HEAD ?
Code: Alles auswählen
/* Include the plugin configuration */
$handle = opendir($cfg['path']['contenido'] . $cfg["path"]['plugins'] );
while ($plugin = readdir($handle))
{
$configfile = $cfg['path']['contenido'] . $cfg["path"]['plugins'] . $plugin . "/includes/config.plugin.php";
$localedir = $cfg['path']['contenido'] . $cfg["path"]['plugins'] . $plugin . "/locale/";
if (@file_exists($localedir) && $plugin != "..")
{
i18nRegisterDomain($plugin, $localedir);
}
if (@file_exists($configfile))
{
include($configfile);
}
}
Code: Alles auswählen
/* Include the plugin configuration */
$handle = opendir($cfg['path']['contenido'] . $cfg["path"]['plugins'] );
while ($plugin = readdir($handle))
{
$configfile = $cfg['path']['contenido'] . $cfg["path"]['plugins'] . $plugin . "/includes/config.plugin.php";
if (@file_exists($configfile))
{
include($configfile);
}
}
Code: Alles auswählen
30-Apr-2004 11:51:13] PHP Fatal error: Call to undefined function: i18nregisterdomain() in d:\apache group\apache\htdocs\contenido\contenido\includes\cfg_language_de.inc.php on line 394
Code: Alles auswählen
/**
* i18n($string)
*
* gettext wrapper (for future extensions). Usage:
* i18n("Your text which has to be translated");
*
* @param $string string The string to translate
* @param $domain string The domain to look up
* @return string Returns the translation
*/
function i18n ($string, $domain = "contenido")
{
global $cfg, $i18nLanguage;
if ($i18nLanguage == "he_SS")
{
return i18nEmulateGettext($string, $domain);
}
if (function_exists("dgettext"))
{
if ($domain != "contenido")
{
$translation = dgettext($domain, $string);
return ($translation);
} else {
return gettext($string);
}
}
return i18nEmulateGettext($string, $domain);
}
/**
* i18nEmulateGettext()
*
* Emulates GNU gettext
*
* @param $string string The string to translate
* @param $domain string The domain to look up
* @return string Returns the translation
*/
function i18nEmulateGettext ($string, $domain = "contenido")
{
global $cfg, $i18nLanguage, $transFile, $i18nDomains;
/* Bad thing, gettext is not available. Let's emulate it */
if (!file_exists($i18nDomains[$domain].$i18nLanguage."/LC_MESSAGES/".$domain.".po"))
{
return $string;
}
if (!isset($transFile[$domain]))
{
$transFile[$domain] = implode('',file($i18nDomains[$domain].$i18nLanguage."/LC_MESSAGES/".$domain.".po"));
}
$stringStart = strpos($transFile[$domain],'"'.$string.'"');
if ($stringStart === false)
{
return $string;
}
$searchStart = $stringStart + strlen($string);
$msgstrStart = strpos($transFile[$domain], 'msgstr', $searchStart);
$messageStart = strpos($transFile[$domain], '"', $msgstrStart);
$maxMsgEnd = strpos($transFile[$domain], "\n", $messageStart);
$tempMessage = substr($transFile[$domain], $messageStart+1, $maxMsgEnd- $messageStart+1);
$startSearch = 0;
$endOfMessage = 0;
while ($pos = strpos($tempMessage,'"',$startSearch+1))
{
if ($pos === false)
{
return "Error in i18nEmulateGettext";
}
if (substr($tempMessage, $pos-1,1) != '\\')
{
$endOfMessage = $pos;
}
$startSearch = $pos;
}
$tempMessage = substr($tempMessage,0,$endOfMessage);
$tempMessage = str_replace('\\"','"',$tempMessage);
return ($tempMessage);
}
/**
* i18nInit()
*
* Initializes the i18n stuff.
*
* @param $localePath string Path to the locales
* @param $langCode string Language code to set
* @return string Returns the translation
*/
function i18nInit ($localePath, $langCode)
{
global $i18nLanguage;
global $i18nDomains;
if (function_exists("bindtextdomain"))
{
/* Bind the domain "contenido" to our locale path */
bindtextdomain("contenido", $localePath);
/* Set the default text domain to "contenido" */
textdomain("contenido");
/* Half brute-force to set the locale. */
if (!ini_get("safe_mode"))
{
putenv("LANG=$langCode");
}
setlocale(LC_ALL, $langCode);
}
$i18nDomains["contenido"] = $localePath;
$i18nLanguage = $langCode;
}
/**
* i18nRegisterDomain()
*
* Registers a new i18n domain.
*
* @param $localePath string Path to the locales
* @param $domain string Domain to bind to
* @return string Returns the translation
*/
function i18nRegisterDomain ($domain, $localePath)
{
global $i18nDomains;
if (function_exists("bindtextdomain"))
{
/* Bind the domain "contenido" to our locale path */
bindtextdomain($domain, $localePath);
}
$i18nDomains[$domain] = $localePath;
}