/** * Initialize */ function helper_plugin_translation() { global $conf; require_once DOKU_INC . 'inc/pageutils.php'; require_once DOKU_INC . 'inc/utf8.php'; // load wanted translation into array $this->trans = strtolower(str_replace(',', ' ', $this->getConf('translations'))); $this->trans = array_unique(array_filter(explode(' ', $this->trans))); sort($this->trans); // load language names $this->LN = confToHash(dirname(__FILE__) . '/lang/langnames.txt'); // display options $this->opts = $this->getConf('display'); $this->opts = explode(',', $this->opts); $this->opts = array_map('trim', $this->opts); $this->opts = array_fill_keys($this->opts, true); // get default translation if (!$conf['lang_before_translation']) { $dfl = $conf['lang']; } else { $dfl = $conf['lang_before_translation']; } if (in_array($dfl, $this->trans)) { $this->defaultlang = $dfl; } else { $this->defaultlang = ''; array_unshift($this->trans, ''); } $this->tns = cleanID($this->getConf('translationns')); if ($this->tns) { $this->tns .= ':'; } }
/** * handle event */ function handle_start(&$event, $param) { global $ID; global $ACT; if ($ACT != 'show') { return; } $redirects = confToHash($this->getsavedir() . '/shorturl.conf'); if ($redirects[$ID]) { if (preg_match('/^https?:\\/\\//', $redirects[$ID])) { send_redirect($redirects[$ID]); } else { if ($this->getConf('showmsg')) { msg(sprintf($this->getLang('redirected'), hsc($ID))); } send_redirect(wl($redirects[$ID], '', true)); } exit; } else { if ($_GET['generateShortURL'] != "" && auth_quickaclcheck($ID) >= AUTH_READ) { $shorturl =& plugin_load('helper', 'shorturl'); if ($shorturl) { $shortID = $shorturl->autoGenerateShortUrl($ID); } } } }
/** * for backward compatability * @see inc/DokuWiki_Plugin#getInfo() */ function getInfo() { if (method_exists(parent, 'getInfo')) { $info = parent::getInfo(); } return is_array($info) ? $info : confToHash(dirname(__FILE__) . '/plugin.info.txt'); }
/** * get attributes (pull apart the string between '<wrap' and '>') * and identify classes, width, lang and dir * * @author Anika Henke <*****@*****.**> * @author Christopher Smith <*****@*****.**> * (parts taken from http://www.dokuwiki.org/plugin:box) */ function getAttributes($data) { $attr = array(); $tokens = preg_split('/\\s+/', $data, 9); $noPrefix = array_map('trim', explode(",", $this->getConf('noPrefix'))); foreach ($tokens as $token) { //get width if (preg_match('/^\\d*\\.?\\d+(%|px|em|ex|pt|pc|cm|mm|in)$/', $token)) { $attr['width'] = $token; continue; } //get lang if (preg_match('/\\:([a-z\\-]+)/', $token)) { $attr['lang'] = trim($token, ':'); continue; } //get classes //restrict token (class names) characters to prevent any malicious data if (preg_match('/[^A-Za-z0-9_-]/', $token)) { continue; } $prefix = in_array($token, $noPrefix) ? '' : 'wrap_'; $attr['class'] = (isset($attr['class']) ? $attr['class'] . ' ' : '') . $prefix . $token; } //get dir if ($attr['lang']) { $lang2dirFile = dirname(__FILE__) . '/conf/lang2dir.conf'; if (@file_exists($lang2dirFile)) { $lang2dir = confToHash($lang2dirFile); $attr['dir'] = strtr($attr['lang'], $lang2dir); } } return $attr; }
/** * get attributes (pull apart the string between '<wrap' and '>') * and identify classes, width, lang and dir * * @author Anika Henke <*****@*****.**> * @author Christopher Smith <*****@*****.**> * (parts taken from http://www.dokuwiki.org/plugin:box) */ function getAttributes($data) { $attr = array(); $tokens = preg_split('/\\s+/', $data, 9); $noPrefix = array_map('trim', explode(',', $this->getConf('noPrefix'))); $restrictedClasses = $this->getConf('restrictedClasses'); if ($restrictedClasses) { $restrictedClasses = array_map('trim', explode(',', $this->getConf('restrictedClasses'))); } $restrictionType = $this->getConf('restrictionType'); foreach ($tokens as $token) { //get width if (preg_match('/^\\d*\\.?\\d+(%|px|em|ex|pt|pc|cm|mm|in)$/', $token)) { $attr['width'] = $token; continue; } //get lang if (preg_match('/\\:([a-z\\-]+)/', $token)) { $attr['lang'] = trim($token, ':'); continue; } //get id if (preg_match('/#([A-Za-z0-9_-]+)/', $token)) { $attr['id'] = trim($token, '#'); continue; } //get classes //restrict token (class names) characters to prevent any malicious data if (preg_match('/[^A-Za-z0-9_-]/', $token)) { continue; } if ($restrictedClasses) { $classIsInList = in_array(trim($token), $restrictedClasses); // either allow only certain classes if ($restrictionType) { if (!$classIsInList) { continue; } // or disallow certain classes } else { if ($classIsInList) { continue; } } } $prefix = in_array($token, $noPrefix) ? '' : 'wrap_'; $attr['class'] = (isset($attr['class']) ? $attr['class'] . ' ' : '') . $prefix . $token; } //get dir if ($attr['lang']) { $lang2dirFile = dirname(__FILE__) . '/conf/lang2dir.conf'; if (@file_exists($lang2dirFile)) { $lang2dir = confToHash($lang2dirFile); $attr['dir'] = strtr($attr['lang'], $lang2dir); } } return $attr; }
/** * General Info * * Needs to return a associative array with the following values: * * author - Author of the plugin * email - Email address to contact the author * date - Last modified date of the plugin in YYYY-MM-DD format * name - Name of the plugin * desc - Short description of the plugin (Text only) * url - Website with more information on the plugin (eg. syntax description) */ function getInfo() { $parts = explode('_', get_class($this)); $info = DOKU_PLUGIN . '/' . $parts[2] . '/plugin.info.txt'; if (@file_exists($info)) { return confToHash($info); } trigger_error('getInfo() not implemented in ' . get_class($this) . ' and ' . $info . ' not found', E_USER_WARNING); }
/** * General Info * * Needs to return a associative array with the following values: * * base - the plugin's base name (eg. the directory it needs to be installed in) * author - Author of the plugin * email - Email address to contact the author * date - Last modified date of the plugin in YYYY-MM-DD format * name - Name of the plugin * desc - Short description of the plugin (Text only) * url - Website with more information on the plugin (eg. syntax description) */ function getInfo() { $parts = explode('_', get_class($this)); $info = DOKU_PLUGIN . '/' . $parts[2] . '/plugin.info.txt'; if (@file_exists($info)) { return confToHash($info); } msg('getInfo() not implemented in ' . get_class($this) . ' and ' . $info . ' not found.<br />This is a bug in the ' . $parts[2] . ' plugin and should be reported to the ' . 'plugin author.', -1); return array('date' => '0000-00-00', 'name' => $parts[2] . ' plugin'); }
/** * General Info * * Needs to return a associative array with the following values: * * base - the plugin's base name (eg. the directory it needs to be installed in) * author - Author of the plugin * email - Email address to contact the author * date - Last modified date of the plugin in YYYY-MM-DD format * name - Name of the plugin * desc - Short description of the plugin (Text only) * url - Website with more information on the plugin (eg. syntax description) */ function getInfo() { $parts = explode('_', get_class($this)); $info = DOKU_PLUGIN . '/' . $parts[2] . '/plugin.info.txt'; if (@file_exists($info)) { return confToHash($info); } msg('getInfo() not implemented in ' . get_class($this) . ' and ' . $info . ' not found.<br />' . 'Verify you\'re running the latest version of the plugin. If the problem persists, send a ' . 'bug report to the author of the ' . $parts[2] . ' plugin.', -1); return array('date' => '0000-00-00', 'name' => $parts[2] . ' plugin'); }
/** * Simple test to make sure the plugin.info.txt is in correct format */ public function test_plugininfo() { $file = __DIR__ . '/../plugin.info.txt'; $this->assertFileExists($file); $info = confToHash($file); $this->assertArrayHasKey('base', $info); $this->assertArrayHasKey('author', $info); $this->assertArrayHasKey('email', $info); $this->assertArrayHasKey('date', $info); $this->assertArrayHasKey('name', $info); $this->assertArrayHasKey('desc', $info); $this->assertArrayHasKey('url', $info); $this->assertEquals('svgpureinsert', $info['base']); $this->assertRegExp('/^https?:\\/\\//', $info['url']); $this->assertTrue(mail_isvalid($info['email'])); $this->assertRegExp('/^\\d\\d\\d\\d-\\d\\d-\\d\\d$/', $info['date']); $this->assertTrue(false !== strtotime($info['date'])); }
/** * handle event */ function handle_start(&$event, $param) { global $ID; global $ACT; if ($ACT != 'show') { return; } $redirects = confToHash(dirname(__FILE__) . '/redirect.conf'); if ($redirects[$ID]) { if (preg_match('/^https?:\\/\\//', $redirects[$ID])) { send_redirect($redirects[$ID]); } else { if ($this->getConf('showmsg')) { msg(sprintf($this->getLang('redirected'), hsc($ID))); } $link = explode('#', $redirects[$ID], 2); send_redirect(wl($link[0], '', true) . '#' . rawurlencode($link[1])); } exit; } }
/** * Returns some info */ function getInfo() { return confToHash(DOKU_PLUGIN . 'emaildigest/plugin.info.txt'); }
public function getInfo() { return confToHash(dirname(__FILE__) . '/plugin.info.txt'); }
function getInfo() { return confToHash(dirname(__FILE__) . '/README'); }
/** * Loads the given plugin and creates an object of it * * @author Andreas Gohr <*****@*****.**> * * @param $type string type of plugin to load * @param $name string name of the plugin to load * @param $new bool true to return a new instance of the plugin, false to use an already loaded instance * @param $disabled bool true to load even disabled plugins * @return objectreference the plugin object or null on failure */ function &load($type, $name, $new = false, $disabled = false) { //we keep all loaded plugins available in global scope for reuse global $DOKU_PLUGINS; list($plugin, $component) = $this->_splitName($name); // check if disabled if (!$disabled && $this->isdisabled($plugin)) { return null; } //plugin already loaded? if (!empty($DOKU_PLUGINS[$type][$name])) { if ($new || !$DOKU_PLUGINS[$type][$name]->isSingleton()) { $class = $type . '_plugin_' . $name; return class_exists($class) ? new $class() : null; } else { return $DOKU_PLUGINS[$type][$name]; } } //try to load the wanted plugin file $dir = $this->get_directory($plugin); $file = $component ? "{$type}/{$component}.php" : "{$type}.php"; if (!is_file(DOKU_PLUGIN . "{$dir}/{$file}")) { return null; } if (!(include_once DOKU_PLUGIN . "{$dir}/{$file}")) { return null; } //construct class and instantiate $class = $type . '_plugin_' . $name; if (!class_exists($class)) { # the plugin might be in the wrong directory $inf = confToHash(DOKU_PLUGIN . "{$dir}/plugin.info.txt"); if ($inf['base'] && $inf['base'] != $plugin) { msg("Plugin installed incorrectly. Rename plugin directory '" . hsc($plugin) . "' to '" . hsc($inf['base']) . "'.", -1); } return null; } $DOKU_PLUGINS[$type][$name] = new $class(); return $DOKU_PLUGINS[$type][$name]; }
/** * Loads the given plugin and creates an object of it * * @author Andreas Gohr <*****@*****.**> * * @param $type string type of plugin to load * @param $name string name of the plugin to load * @param $new bool true to return a new instance of the plugin, false to use an already loaded instance * @param $disabled bool true to load even disabled plugins * @return DokuWiki_Plugin|DokuWiki_Syntax_Plugin|null the plugin object or null on failure */ public function load($type, $name, $new = false, $disabled = false) { //we keep all loaded plugins available in global scope for reuse global $DOKU_PLUGINS; list($plugin, $component) = $this->_splitName($name); // check if disabled if (!$disabled && $this->isdisabled($plugin)) { return null; } $class = $type . '_plugin_' . $name; //plugin already loaded? if (!empty($DOKU_PLUGINS[$type][$name])) { if ($new || !$DOKU_PLUGINS[$type][$name]->isSingleton()) { return class_exists($class, true) ? new $class() : null; } else { return $DOKU_PLUGINS[$type][$name]; } } //construct class and instantiate if (!class_exists($class, true)) { # the plugin might be in the wrong directory $dir = $this->get_directory($plugin); $inf = confToHash(DOKU_PLUGIN . "{$dir}/plugin.info.txt"); if ($inf['base'] && $inf['base'] != $plugin) { msg(sprintf("Plugin installed incorrectly. Rename plugin directory '%s' to '%s'.", hsc($plugin), hsc($inf['base'])), -1); } elseif (preg_match('/^' . DOKU_PLUGIN_NAME_REGEX . '$/', $plugin) !== 1) { msg(sprintf("Plugin name '%s' is not a valid plugin name, only the characters a-z and 0-9 are allowed. " . 'Maybe the plugin has been installed in the wrong directory?', hsc($plugin)), -1); } return null; } $DOKU_PLUGINS[$type][$name] = new $class(); return $DOKU_PLUGINS[$type][$name]; }
/** * Constructor. * Intitalizes the supported video sites */ function syntax_plugin_vshare() { $this->sites = confToHash(dirname(__FILE__) . '/sites.conf'); }
/** * Returns some info */ function getInfo() { return confToHash(DOKU_PLUGIN . '/editsections2/plugin.info.txt'); }
function getInfo() { return array_merge(confToHash(dirname(__FILE__) . '/../info.txt'), array('name' => 'i-net Download (Send File Action Component)')); }
/** * if a short id exists in db: get it * * @author Frank Schiebel <*****@*****.**> * @param none * @return string regular id * */ function shorturlPrintLink($pageID) { if (file_exists($this->savedir . '/shorturl.conf')) { $redirects = confToHash($this->savedir . '/shorturl.conf'); } else { $redirects = array(); } if (in_array($pageID, $redirects)) { $shortID = array_search($pageID, $redirects); $linktext = $this->getLang('shortlinktext'); return '<a href="' . wl($shortID, "", true) . '"> ' . $linktext . '</a>'; } else { $linktext = $this->getLang('generateshortlink'); return '<a href="' . wl($pageID, array(generateShortURL => yes), true) . '"> ' . $linktext . '</a>'; } }
/** * Create output */ function render($mode, Doku_Renderer $renderer, $data) { global $INFO; global $ACT; global $conf; if ($mode == 'xhtml' && strlen($data[0]) > 1) { $src = $data[0]; $origSrc = $src; $trans = "0 " . $data[1]; // "0" includes the original key $debug = $conf['allowdebug']; $error = $this->_checkExecs(); if ($this->getConf('abcok') && (!$INFO['rev'] || $INFO['rev'] && $ACT == 'preview') && !$error) { //do not create/show files if an old revision is viewed, but always if the page is previewed and never when there is an error $entitiesFile = dirname(__FILE__) . '/conf/entities.conf'; if (@file_exists($entitiesFile)) { $entities = confToHash($entitiesFile); $src = strtr($src, $entities); } $fileBase = $this->_getFileBase($origSrc); $srcFile = $fileBase . '.abc'; $srcChanged = !file_exists($srcFile) || file_exists($srcFile) && $src != io_readFile($srcFile); if ($srcChanged) { io_saveFile($srcFile, $src); } if ($this->getConf('abc2abc') && is_executable($this->getConf('abc2abc'))) { $transSrc = $this->_getTransSrc($trans); $transNew = $this->_getTransNew($fileBase, $transSrc); } else { $transSrc = array(0); $transNew = array(); } $renderList = $srcChanged ? $transSrc : $transNew; if ($debug || $_REQUEST['purge']) { $renderList = $transSrc; } // create files foreach ($renderList as $transMode) { // if no transposition is allowed and the tune shall be transposed // by 0 semitones (= not at all), then nothing is appended to the fileBase; // else append the amount of semitiones to the fileBase $curFileBase = $transMode == 0 ? $fileBase : $fileBase . "_" . $transMode; $abcFile = $curFileBase . '.abc'; io_saveFile($abcFile, $src); ob_start(); if ($transMode != 0) { $this->_transpose($abcFile, $srcFile, $transMode); } $debugLog = $this->_createImgFile($abcFile, $curFileBase); if ($this->getConf('displayType') == 1 || $this->getConf('displayType') == 2) { $this->_createMidiFile($abcFile, $curFileBase); } if ($this->getConf('displayType') == 2) { $this->_createPsFile($abcFile, $curFileBase); if ($this->getConf('ps2pdf')) { $this->_createPdfFile($abcFile, $curFileBase); } } $errorLog = ob_get_contents(); ob_end_clean(); } if (($this->getConf('displayErrorlog') || $debug) && $errorLog) { $errorLog = str_replace($this->_getAbc2psVersion(), "abc2ps", $errorLog); //hide abc2ps version for security reasons //TODO: hide lines starting with "writing MIDI file", "File", "Output written on", ... for boring reasons msg(nl2br($errorLog), 2); } if ($debugLog) { msg($debugLog); } // display files foreach ($transSrc as $transMode) { $curFileBase = $transMode == 0 ? $fileBase : $fileBase . "_" . $transMode; $renderer->doc .= $this->_showFiles($curFileBase); } // always have the abc source in the html source (for search engine optimization) // only per css visible when displaySource = 1 if ($this->getConf('displaySource')) { $visible = " visible"; } $renderer->doc .= '<div class="abc_src' . $visible . '">' . NL; $renderer->doc .= $renderer->file($origSrc); $renderer->doc .= '</div>' . NL; } else { if ($error && $this->getConf('abcok')) { msg($error, -1); } $renderer->doc .= $renderer->file($origSrc); } return true; } return false; }
/** * Returns some info */ function getInfo() { return confToHash(DOKU_PLUGIN . 'preservefilenames/plugin.info.txt'); }
/** * Find out what was in the extracted directory * * Correct folders are searched recursively using the "*.info.txt" configs * as indicator for a root folder. When such a file is found, it's base * setting is used (when set). All folders found by this method are stored * in the 'new' key of the $result array. * * For backwards compatibility all found top level folders are stored as * in the 'old' key of the $result array. * * When no items are found in 'new' the copy mechanism should fall back * the 'old' list. * * @author Andreas Gohr <*****@*****.**> * @param array $result - results are stored here * @param string $directory - the temp directory where the package was unpacked to * @param string $default_type - type used if no info.txt available * @param string $subdir - a subdirectory. do not set. used by recursion * @return bool - false on error */ protected function find_folders(&$result, $directory, $default_type = 'plugin', $subdir = '') { $this_dir = "{$directory}{$subdir}"; $dh = @opendir($this_dir); if (!$dh) { return false; } $found_dirs = array(); $found_files = 0; $found_template_parts = 0; while (false !== ($f = readdir($dh))) { if ($f == '.' || $f == '..') { continue; } if (is_dir("{$this_dir}/{$f}")) { $found_dirs[] = "{$subdir}/{$f}"; } else { // it's a file -> check for config $found_files++; switch ($f) { case 'plugin.info.txt': case 'template.info.txt': // we have found a clear marker, save and return $info = array(); $type = explode('.', $f, 2); $info['type'] = $type[0]; $info['tmp'] = $this_dir; $conf = confToHash("{$this_dir}/{$f}"); $info['base'] = basename($conf['base']); $result['new'][] = $info; return true; case 'main.php': case 'details.php': case 'mediamanager.php': case 'style.ini': $found_template_parts++; break; } } } closedir($dh); // files where found but no info.txt - use old method if ($found_files) { $info = array(); $info['tmp'] = $this_dir; // does this look like a template or should we use the default type? if ($found_template_parts >= 2) { $info['type'] = 'template'; } else { $info['type'] = $default_type; } $result['old'][] = $info; return true; } // we have no files yet -> recurse foreach ($found_dirs as $found_dir) { $this->find_folders($result, $directory, $default_type, "{$found_dir}"); } return true; }
* @link http://dokuwiki.org/template:bootstrap3 * @author Giuseppe Di Terlizzi <*****@*****.**> * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) */ if (!defined('DOKU_INC')) { die; } /* must be run from within DokuWiki */ @(require_once dirname(__FILE__) . '/tpl_functions.php'); /* include hook for template functions */ header('X-UA-Compatible: IE=edge,chrome=1'); include_once dirname(__FILE__) . '/tpl_global.php'; // Include template global variables // Get the template info (useful for debug) if ($INFO['isadmin'] && isset($_GET['do']) && $_GET['do'] == 'check') { $template_info = confToHash(dirname(__FILE__) . '/template.info.txt'); msg('bootstrap3 template version: v' . $template_info['date'], 1, '', '', MSG_ADMINS_ONLY); } ?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $conf['lang']; ?> " lang="<?php echo $conf['lang']; ?> " dir="<?php echo $lang['direction']; ?> " class="no-js">
/** * returns a hash of interwikilinks * * @author Harry Fuecks <*****@*****.**> */ function getInterwiki() { static $wikis = NULL; if (!$wikis) { $wikis = confToHash(DOKU_CONF . 'interwiki.conf', true); if (@file_exists(DOKU_CONF . 'interwiki.local.conf')) { $local = confToHash(DOKU_CONF . 'interwiki.local.conf'); $wikis = array_merge($wikis, $local); } } //add sepecial case 'this' $wikis['this'] = DOKU_URL . '{NAME}'; return $wikis; }
/** * Returns some info */ function getInfo() { return confToHash(DOKU_PLUGIN . 'asiansearch/plugin.info.txt'); }
/** * Get lang and dir parameters to add if different from global lang and dir */ function _getLangParams($articleLang) { global $conf; global $lang; $diffLang = ''; $diffDir = ''; if ($conf['lang'] != $articleLang) { $diffLang = 'lang="' . $articleLang . '" xml:lang="' . $articleLang . '"'; // check lang dir $lang2dirFile = dirname(__FILE__) . '/conf/lang2dir.conf'; if (@file_exists($lang2dirFile)) { $lang2dir = confToHash($lang2dirFile); $dir = strtr($articleLang, $lang2dir); } // in case lang is not listed if (!isset($dir) || $dir == $articleLang) { $dir = $lang['direction']; } $diffDir = $lang['direction'] != $dir ? 'dir="' . $dir . '"' : ''; } return $diffLang . ' ' . $diffDir; }
/** * Find out what was in the extracted directory * * Correct folders are searched recursively using the "*.info.txt" configs * as indicator for a root folder. When such a file is found, it's base * setting is used (when set). All folders found by this method are stored * in the 'new' key of the $result array. * * For backwards compatibility all found top level folders are stored as * in the 'old' key of the $result array. * * When no items are found in 'new' the copy mechanism should fall back * the 'old' list. * * @author Andreas Gohr <*****@*****.**> * @param arrayref $result - results are stored here * @param string $base - the temp directory where the package was unpacked to * @param string $dir - a subdirectory. do not set. used by recursion * @return bool - false on error */ function find_folders(&$result, $base, $dir = '') { $dh = @opendir("{$base}/{$dir}"); if (!$dh) { return false; } while (false !== ($f = readdir($dh))) { if ($f == '.' || $f == '..' || $f == 'tmp') { continue; } if (!is_dir("{$base}/{$dir}/{$f}")) { // it's a file -> check for config if ($f == 'plugin.info.txt') { $info = array(); $info['type'] = 'plugin'; $info['tmp'] = "{$base}/{$dir}"; $conf = confToHash("{$base}/{$dir}/{$f}"); $info['base'] = basename($conf['base']); if (!$info['base']) { $info['base'] = basename("{$base}/{$dir}"); } $result['new'][] = $info; } elseif ($f == 'template.info.txt') { $info = array(); $info['type'] = 'template'; $info['tmp'] = "{$base}/{$dir}"; $conf = confToHash("{$base}/{$dir}/{$f}"); $info['base'] = basename($conf['base']); if (!$info['base']) { $info['base'] = basename("{$base}/{$dir}"); } $result['new'][] = $info; } } else { // it's a directory -> add to dir list for old method, then recurse if (!$dir) { $info = array(); $info['type'] = 'plugin'; $info['tmp'] = "{$base}/{$dir}/{$f}"; $info['base'] = $f; $result['old'][] = $info; } $this->find_folders($result, $base, "{$dir}/{$f}"); } } closedir($dh); return true; }
/** * Returns some info */ function getInfo() { return confToHash(DOKU_PLUGIN . 'autoindentcontrol/plugin.info.txt'); }
/** * return some info */ function getInfo() { return confToHash(dirname(__FILE__) . '/info.txt'); }
/** * Class constructor */ function __construct() { parent::helper_plugin_translation(); // load language names $this->LN = confToHash(dirname(__FILE__) . '/lang/langnames.txt'); }