本文整理汇总了PHP中i18n::msg方法的典型用法代码示例。如果您正苦于以下问题:PHP i18n::msg方法的具体用法?PHP i18n::msg怎么用?PHP i18n::msg使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类i18n
的用法示例。
在下文中一共展示了i18n::msg方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sql
function glossar_replace($string)
{
global $REX, $mypage;
$I18N_GLOSSAR = new i18n($REX[LANG], $REX[INCLUDE_PATH] . "/addons/{$mypage}/lang/");
// CREATE LANG OBJ FOR THIS ADDON
$sql = new sql();
$sql->setQuery("select * from rex__glossar order by shortcut");
for ($i = 0; $i < $sql->getRows(); $i++) {
$language = $sql->getValue("language");
if ($language == "0") {
$language = $I18N_GLOSSAR->msg('lang_de_short');
} elseif ($language == "1") {
$language = $I18N_GLOSSAR->msg('lang_en_short');
} else {
$language = $I18N_GLOSSAR->msg('lang_fr_short');
}
$id = $sql->getValue("short_id");
$shortcut = htmlentities($sql->getValue("shortcut"));
$escapedshortcut = str_replace('.', '\\.', $shortcut);
$description = htmlentities($sql->getValue("description"));
$language = trim($language);
$casesense = $sql->getValue("casesense");
$search = "/((<[^>]*)|{$escapedshortcut})/e";
$replace = '"\\2"=="\\1"? "\\1":"<span lang=\\"' . $language . '\\" xml:lang=\\"' . $language . '\\" title=\\"' . $language . ': ' . $description . '\\" class=\\"shortcut\\">' . $shortcut . '</span>"';
$subject = $string;
if ($casesense == 0) {
$search .= 'i';
}
$string = preg_replace($search, $replace, $subject);
$sql->counter++;
}
return $string;
}
示例2: define
* Guestbook Addon
* @author staab[at]public-4u[dot]de Markus Staab
* @author <a href="http://www.public-4u.de">www.public-4u.de</a>
* @package redaxo3
* @version $Id: config.inc.php,v 1.1 2007/06/11 11:54:26 kills Exp $
*/
$mypage = 'guestbook';
// only for this file
if (!defined('TBL_GBOOK')) {
define('TBL_GBOOK', 'rex_9_gbook');
}
// CREATE LANG OBJ FOR THIS ADDON
$I18N_GBOOK = new i18n($REX['LANG'], $REX['INCLUDE_PATH'] . '/addons/' . $mypage . '/lang');
$REX['ADDON']['page'][$mypage] = $mypage;
$REX['ADDON']['rxid'][$mypage] = "9";
$REX['ADDON']['name'][$mypage] = $I18N_GBOOK->msg('menu_title');
$REX['ADDON']['perm'][$mypage] = 'guestbook[]';
$REX['PERM'][] = 'guestbook[]';
// Im Frontend CSS einfügen
if (!$REX['REDAXO']) {
rex_register_extension('OUTPUT_FILTER', 'rex_gbook_insert_css');
function rex_gbook_insert_css($params)
{
$content = $params['subject'];
$styles = '';
$files = array('guestbook.css');
foreach ($files as $file) {
$css_file = dirname(__FILE__) . '/css/' . $file;
$size = filesize($css_file);
if ($size > 0) {
$handle = fopen($css_file, 'r');
示例3: rex_create_lang
/**
* Funktion zum Anlegen eines Sprache-Objekts
*
* @param $locale Locale der Sprache
* @param $searchpath Pfad zum Ordner indem die Sprachdatei gesucht werden soll
* @param $setlocale TRUE, wenn die locale für die Umgebung gesetzt werden soll, sonst FALSE
* @return unknown_type
*/
function rex_create_lang($locale = "de_de", $searchpath = '', $setlocale = TRUE)
{
global $REX;
$_searchpath = $searchpath;
if ($searchpath == '') {
$searchpath = $REX['INCLUDE_PATH'] . DIRECTORY_SEPARATOR . "lang";
}
$lang_object = new i18n($locale, $searchpath);
if ($_searchpath == '') {
$REX['LOCALES'] = $lang_object->getLocales($searchpath);
}
if ($setlocale) {
$locales = array();
foreach (explode(',', trim($lang_object->msg('setlocale'))) as $locale) {
$locales[] = $locale . '.' . strtoupper(str_replace('iso-', 'iso', $lang_object->msg('htmlcharset')));
$locales[] = $locale . '.' . strtoupper(str_replace('iso-', 'iso', str_replace("-", "", $lang_object->msg('htmlcharset'))));
$locales[] = $locale . '.' . strtolower(str_replace('iso-', 'iso', $lang_object->msg('htmlcharset')));
$locales[] = $locale . '.' . strtolower(str_replace('iso-', 'iso', str_replace("-", "", $lang_object->msg('htmlcharset'))));
}
foreach (explode(',', trim($lang_object->msg('setlocale'))) as $locale) {
$locales[] = $locale;
}
setlocale(LC_ALL, $locales);
}
return $lang_object;
}
示例4: unset
<?php
/**
* FDL Zürich Uploader - Redaxo Addon
*
* @author sascha.weidner@factorylabs.com
*
* @package redaxo4
* @version 1.0
*/
// error_reporting(E_ALL);
// ini_set('display_errors', 1);
$mypage = 'slice_ui';
$myroot = $REX['INCLUDE_PATH'] . '/addons/' . $mypage;
$I18N_slice_ui = new i18n($REX['LANG'], $REX['INCLUDE_PATH'] . '/addons/' . $mypage . '/lang/');
$REX['ADDON']['version'][$mypage] = $I18N_slice_ui->msg('slice_ui_version');
$REX['ADDON']['author'][$mypage] = 'Sascha Weidner';
$REX['ADDON']['rxid'][$mypage] = $mypage;
$REX['ADDON']['page'][$mypage] = $mypage;
$REX['ADDON']['name'][$mypage] = $I18N_slice_ui->msg('slice_ui_menu_link');
$REX['ADDON']['perm'][$mypage] = 'copySlice[]';
$REX['PERM'][] = 'copySlice[]';
$REX['ADDON'][$mypage]['backend'] = '1';
$REX['ADDON'][$mypage]['frontend'] = '1';
if (rex_request('reset_clipboard')) {
unset($_SESSION['slice_ui']);
}
require_once $REX['INCLUDE_PATH'] . '/addons/' . $mypage . '/settings.inc.php';
require_once $REX['INCLUDE_PATH'] . '/addons/' . $mypage . '/classes/class.rex_copy.inc.php';
if (rex_request('page') == 'content') {
rex_register_extension('PAGE_HEADER', 'rex_copy::appendToPageHeader');
示例5:
<?php
$mypage = "simple_user";
// only for this file
$I18N_SIMPLE_USER = new i18n($REX[LANG], $REX[INCLUDE_PATH] . "/addons/{$mypage}/lang/");
// CREATE LANG OBJ FOR THIS ADDON
$REX[ADDON][rxid][$mypage] = "2";
// unique id /
// $REX[ADDON][nsid][$mypage] = "REX002,REX003"; // necessary rxid; - not yet included
$REX[ADDON][page][$mypage] = "{$mypage}";
// pagename/foldername
$REX[ADDON][name][$mypage] = $I18N_SIMPLE_USER->msg("simple_user");
// name
$REX[ADDON][perm][$mypage] = "simple_user[]";
// permission
$REX[PERM][] = "simple_user[]";
$TABLE['simple_user'] = "rex_2_user";
$REX[ADDON][extras][$REX[ADDON][rxid][$mypage]][TABLE] = $TABLE['simple_user'];
// IF NECESSARY INCLUDE FUNC/CLASSES ETC
// INCLUDE IN FRONTEND --- if ($REX[GG])
// INCLUDE IN BACKEND --- if (!$REX[GG])
示例6: array
* @author <a href="http://www.design-to-use.de">www.design-to-use.de</a>
*/
$addon_key = 'd2u_kurse';
// Nur fuer diese Datei
// CREATE LANG OBJ FOR THIS ADDON
$I18N_KURSE = new i18n($REX['LANG'], $REX['INCLUDE_PATH'] . '/addons/' . $addon_key . '/lang');
$REX['ADDON']['page'][$addon_key] = $addon_key;
$REX['ADDON']['name'][$addon_key] = "Kursverwaltung";
$REX['ADDON']['perm'][$addon_key] = 'd2u_kurse[]';
$REX['ADDON']['version'][$addon_key] = '2.4';
$REX['ADDON']['author'][$addon_key] = "http://www.design-to-use.de - Tobias Krais";
$REX['PERM'][] = $addon_key . '[]';
$REX['PERM'][] = $addon_key . '[alle_orte]';
if ($REX['REDAXO'] && $REX['USER']) {
if ($REX['USER']->isAdmin() || $REX['USER']->hasPerm($addon_key . '[alle_orte]')) {
$REX['ADDON'][$addon_key]['SUBPAGES'] = array(array('kurse', $I18N_KURSE->msg('kurse_angebote')), array('kurskategorien', $I18N_KURSE->msg('kurskategorien')), array('orte', $I18N_KURSE->msg('orte')), array('terminkategorien', $I18N_KURSE->msg('terminkategorien')), array('zielgruppen', $I18N_KURSE->msg('zielgruppen')), array('einstellungen', $I18N_KURSE->msg('einstellungen')));
if (OOPlugin::isAvailable('d2u_kurse', 'kufer_import')) {
$REX['ADDON'][$addon_key]['SUBPAGES'][] = array('kufer_import', $I18N_KURSE->msg('kufer_import'));
}
}
}
// Einstellungen
require_once $REX['INCLUDE_PATH'] . '/addons/' . $addon_key . '/classes/class.kurse_utils.inc.php';
// consts
define('D2U_KURSE_ARRAY_DELIMITER', '|');
define('D2U_KURSE_DATA_DIR', $REX['INCLUDE_PATH'] . '/data/addons/' . $addon_key . '/');
define('D2U_KURSE_BACKUP_DIR', $REX['INCLUDE_PATH'] . '/data/addons/' . $addon_key . '/backup/');
// default settings (user settings are saved in data dir!)
$REX['ADDON'][$addon_key]['settings'] = array('anmeldung_artikel' => 0, 'anmeldung_artikel_name' => '', 'anmeldung_mail_empfaenger' => '', 'multinewsletter_group' => 0, 'kurse_artikel' => 0, 'kurse_artikel_name' => '', 'vhsagb_artikel' => 0, 'vhsagb_artikel_name' => '', 'zielgruppe_titel' => 'Zielgruppe', 'zielgruppe_farbe' => '', 'zielgruppe_bild' => '', 'kategorie_titel' => 'Kategorie', 'kategorie_farbe' => '', 'kategorie_bild' => '', 'ort_titel' => 'Ort', 'ort_farbe' => '', 'ort_bild' => '', 'termin_titel' => 'Termin', 'termin_farbe' => '', 'termin_bild' => '', 'freitext_1_titel' => '', 'freitext_1_farbe' => '', 'freitext_2_titel' => '', 'freitext_2_farbe' => '');
// overwrite default settings with user settings
kurse_utils::includeSettingsFile();
示例7: array
include_once $REX['INCLUDE_PATH'] . '/addons/' . $rxa_tinymce['name'] . '/functions/function_rex_tinymce.inc.php';
// Kompatibilitäts-Funktionen
include_once $REX['INCLUDE_PATH'] . '/addons/' . $rxa_tinymce['name'] . '/functions/function_rex_compat.inc.php';
// Request-Variablen
$rxa_tinymce['get_page'] = rex_request('page', 'string');
$rxa_tinymce['get_tinymce'] = rex_request('tinymce', 'string');
$rxa_tinymce['get_tinymceinit'] = rex_request('tinymceinit', 'string');
// TinyMCE-Init-Javascript ausliefern
if ($rxa_tinymce['get_tinymceinit'] == 'true') {
a52_tinymce_output_init();
exit;
}
// Im Backend Sprachobjekt anlegen
$I18N_A52 = new i18n($REX['LANG'], $REX['INCLUDE_PATH'] . '/addons/' . $rxa_tinymce['name'] . '/lang/');
// Addon-Subnavigation für das REDAXO-Menue
$REX['ADDON'][$rxa_tinymce['name']]['SUBPAGES'] = array(array('', $I18N_A52->msg('menu_module')), array('settings', $I18N_A52->msg('menu_settings')), array('css', $I18N_A52->msg('menu_css')), array('tipps', $I18N_A52->msg('menu_tipps')), array('info', $I18N_A52->msg('menu_information')));
// ausgewählte Seiten laut Konfiguration
$rxa_tinymce['includepages'] = explode(',', trim(str_replace(' ', '', $REX['ADDON'][$rxa_tinymce['name']]['pages'])));
if (!in_array('content', $rxa_tinymce['includepages'])) {
$rxa_tinymce['includepages'][] = 'content';
}
// TinyMCE ins Backend integrieren, nur in ausgewählten Seiten laut Konfiguration
if ($rxa_tinymce['get_page'] != '' and in_array($rxa_tinymce['get_page'], $rxa_tinymce['includepages']) and $REX['ADDON'][$rxa_tinymce['name']]['active'] == 'on') {
rex_register_extension('OUTPUT_FILTER', 'a52_tinymce_opf');
}
// Outputfilter für Medienpool und Linkmap
if ($REX['ADDON'][$rxa_tinymce['name']]['active'] == 'on') {
$rxa_tinymce['get_inputfield'] = rex_request('opener_input_field', 'string');
if (strstr($rxa_tinymce['get_inputfield'], 'REX_MEDIA_') or strstr($rxa_tinymce['get_inputfield'], 'LINK_')) {
$_SESSION['a52_tinymce'] = false;
}
示例8: showDetail
function showDetail()
{
$this->language == 1 ? $I18_prefix = 'en_en_utf8' : ($I18_prefix = 'de_de_utf8');
$I18N_NEWS_DB = new i18n($I18_prefix, REX_INCLUDE_PATH . '/addons/' . MY_PAGE . '/lang');
if ($this->active == 0) {
$addSQL = 'AND status = "0"';
}
if ($this->active == 1) {
$addSQL = 'AND status = "1"';
}
if ($this->language != "") {
$addSQL .= 'AND clang = ' . $this->language;
}
$qry = 'SELECT *
FROM ' . TBL_NEWS . '
WHERE id = "' . $_REQUEST['newsid'] . '"
' . $addSQL . '
';
$sql = new rex_sql();
if ($this->debug == 1) {
$sql->debugsql = true;
}
$data = $sql->getArray($qry);
if (is_array($data) and sizeof($data) > 0) {
include 'redaxo/include/addons/news/libs/Smarty.class.php';
$t = new Smarty();
$t->debugging = false;
$t->caching = false;
$t->cache_lifetime = 120;
$t->config_dir = 'redaxo/include/addons/news/view/configs/';
$t->compile_dir = 'redaxo/include/addons/news/view/templates_c/';
$t->cache_dir = 'redaxo/include/addons/news/view/cache/';
$t->template_dir = 'redaxo/include/addons/news/view/templates/';
/* Fuer spaeter - Bilderslider Header oder so
if ($data[0]["image_header"] != "") // Bildausgabe Header
{
$images_header = explode(",", $data[0]["image_header"]);
foreach ($images_header as $i)
{
$s = getimagesize("files/".$i);
($s[0]<=620) ? $b[] = $i : $b[] = "index.php?rex_img_type=rex_rbw_620&rex_img_file=".$i;
}
if (is_array($images_header) and sizeof($images_header)>0) $headerBilder = headerBilder($b, $REX['CUR_CLANG']);
print '<div id="newsSlider" class="slideshow flexslider">'.$headerBilder."</div>\n";
}*/
if ($data[0]["image"] != "") {
$_images = explode(",", $data[0]["image"]);
foreach ($_images as $k => $file) {
if (file_exists($REX['HTDOCS_PATH'] . "files/" . $file)) {
$fileobj = OOMedia::getMediaByName($file, $REX['CUR_CLANG']);
$images[$k]['file'] = $fileobj->_name;
$images[$k]['item'] = !empty($fileobj->_title) ? $fileobj->_title : $fileobj->_name;
$_filesizeis = filesize($REX['HTDOCS_PATH'] . "files/" . $fileobj->_name);
$images[$k]['size'] = $this->getfilesize($_filesizeis);
$images[$k]['description'] = $fileobj->_med_description;
$images[$k]['copyright'] = $fileobj->_med_copyright;
$images[$k]['date'] = date("d.m.Y", $fileobj->_updatedate);
$images[$k]['time'] = date("H:i", $fileobj->_updatedate);
$images[$k]['typ'] = substr(strrchr($fileobj->_name, "."), 1);
}
}
}
$item[$i]['name'] = $data[0]["name"];
$item[$i]['source'] = $data[0]["source"];
$item[$i]['keywords'] = $data[0]["keywords"];
$item[$i]['teaser'] = $data[0]["teaser"];
$item[$i]['date'] = $this->rex_news_format_date($data[0]["online_date"], $this->language);
if (OOAddon::isAvailable("textile")) {
if ($data[0]["article"] != "") {
$output = $data[0]["article"];
$text = $output;
if ($text != "") {
$text = str_replace("\t", "", $text);
$text = htmlspecialchars_decode($text);
$text = str_replace("<br />", "", $text);
$item[$i]['text'] = rex_a79_textile($text);
}
}
}
// Download
if ($data[0]["filelist"] != "") {
$filelist = explode(",", $data[0]["filelist"]);
foreach ($filelist as $k => $file) {
if (file_exists($REX['HTDOCS_PATH'] . "files/" . $file)) {
$fileobj = OOMedia::getMediaByName($file, $REX['CUR_CLANG']);
$files[$k]['file'] = $fileobj->_name;
$files[$k]['item'] = !empty($fileobj->_title) ? $fileobj->_title : $fileobj->_name;
$_filesizeis = filesize($REX['HTDOCS_PATH'] . "files/" . $fileobj->_name);
$files[$k]['size'] = $this->getfilesize($_filesizeis);
$files[$k]['description'] = $fileobj->_med_description;
$files[$k]['copyright'] = $fileobj->_med_copyright;
$files[$k]['date'] = date("d.m.Y", $fileobj->_updatedate);
$files[$k]['time'] = date("H:i", $fileobj->_updatedate);
$files[$k]['typ'] = substr(strrchr($fileobj->_name, "."), 1);
}
}
}
$item[$i]['back'] = $I18N_NEWS_DB->msg('back');
$t->assign("files", $files);
$t->assign("images", $images);
//.........这里部分代码省略.........
示例9: elseif
include_once $REX[INCLUDE_PATH] . "/functions/function_string.inc.php";
include_once $REX[INCLUDE_PATH] . "/functions/function_folder.inc.php";
include_once $REX[INCLUDE_PATH] . "/addons.inc.php";
include_once $REX[INCLUDE_PATH] . "/functions/function_onoff.inc.php";
// ----------------- REDAXO COMMUNITY
include_once $REX[INCLUDE_PATH] . "/classes/class.board.inc.php";
include_once $REX[INCLUDE_PATH] . "/classes/class.mime_mail.inc.php";
// ----------------- REDAXO IM/EXPORT
include_once $REX[INCLUDE_PATH] . "/classes/class.tar.inc.php";
// ----------------- EXTRAS
include_once $REX[INCLUDE_PATH] . "/classes/class.mail_decode.inc.php";
include_once $REX[INCLUDE_PATH] . "/classes/class.form.inc.php";
include_once $REX[INCLUDE_PATH] . "/classes/class.list.inc.php";
include_once $REX[INCLUDE_PATH] . "/classes/class.oocategory.inc.php";
// OO Classes
include_once $REX[INCLUDE_PATH] . "/classes/class.oomedia.inc.php";
// OO Classes
include_once $REX[INCLUDE_PATH] . "/classes/class.textile.inc.php";
// Textile class
include_once $REX[INCLUDE_PATH] . "/functions/function_createimage.inc.php";
// ----------------- CREATE LANG OBJ
if (!$REX[GG] && $lang == "de_DE") {
$REX[LANG] = $lang;
} elseif (!$REX[GG] && $lang == "en_GB") {
$REX[LANG] = $lang;
}
$I18N = new i18n($REX[LANG], $REX[INCLUDE_PATH] . "/lang/");
$REX[LOCALES] = i18n::getLocales($REX[INCLUDE_PATH] . "/lang/");
// -----------------
setlocale(LC_ALL, trim($I18N->msg("setlocale")));
示例10:
<?php
$mypage = "bug_report";
// only for this file
$I18N_BUG_REPORT = new i18n($REX['LANG'], $REX['INCLUDE_PATH'] . "/addons/{$mypage}/lang/");
// CREATE LANG OBJ FOR THIS ADDON
// $REX['ADDON']['rxid'][$mypage] = "2"; // unique id /
// $REX[ADDON][nsid][$mypage] = "REX002,REX003"; // necessary rxid; - not yet included
$REX['ADDON']['page'][$mypage] = $mypage;
// pagename/foldername
$REX['ADDON']['name'][$mypage] = $I18N_BUG_REPORT->msg("bug_report");
// name
$REX['ADDON']['perm'][$mypage] = "bug_report[]";
// permission
$REX['PERM'][] = "bug_report[]";
$TABLE['bug_report'] = "bug_report";
$REX['ADDON']['extras'][$REX['ADDON']['rxid'][$mypage]]['TABLE'] = $TABLE['bug_report'];
// IF NECESSARY INCLUDE FUNC/CLASSES ETC
// INCLUDE IN FRONTEND --- if ($REX[GG])
// INCLUDE IN BACKEND --- if (!$REX[GG])
/*COMMENT*/
示例11: header
header("Location: login.php?" . "&FORM[loginmessage]=" . urlencode($REX_LOGIN->message));
header('Content-Type: text/html; charset=' . $I18N->msg("htmlcharset"));
$LOGIN = FALSE;
exit;
} else {
$LOGIN = TRUE;
$REX_USER = $REX_LOGIN->USER;
}
// ----------------- CREATE LANG OBJ
/*
if ($REX_USER->isValueOf("rights","be_lang[de_de]")) $REX[LANG] = "de_de";
else if ($REX_USER->isValueOf("rights","be_lang[en_gb]")) $REX[LANG] = "en_gb";
*/
$I18N = new i18n($REX[LANG], $REX[INCLUDE_PATH] . "/lang/");
$REX[LOCALES] = i18n::getLocales($REX[INCLUDE_PATH] . "/lang/");
setlocale(LC_ALL, trim($I18N->msg("setlocale")));
header('Content-Type: text/html; charset=' . $I18N->msg("htmlcharset"));
$dl = false;
$page = strtolower($page);
if ($page == "addon" && ($REX_USER->isValueOf("rights", "addon[]") || $REX_USER->isValueOf("rights", "dev[]"))) {
$page_name = $I18N->msg("addon");
} elseif ($page == "specials" && ($REX_USER->isValueOf("rights", "specials[]") || $REX_USER->isValueOf("rights", "dev[]"))) {
$page_name = $I18N->msg("specials");
} elseif ($page == "module" && ($REX_USER->isValueOf("rights", "module[]") || $REX_USER->isValueOf("rights", "dev[]"))) {
$page_name = $I18N->msg("module");
} elseif ($page == "template" && ($REX_USER->isValueOf("rights", "template[]") || $REX_USER->isValueOf("rights", "dev[]"))) {
$page_name = $I18N->msg("template");
} elseif ($page == "user" && ($REX_USER->isValueOf("rights", "user[]") || $REX_USER->isValueOf("rights", "admin[]"))) {
$page_name = $I18N->msg("user");
} elseif ($page == "medienpool") {
$dl = true;
示例12: rex_create_lang
function rex_create_lang($locale = "de_de", $searchpath = '')
{
global $REX;
$_searchpath = $searchpath;
if ($searchpath == '') {
$searchpath = $REX['INCLUDE_PATH'] . "/lang";
}
$lang_object = new i18n($locale, $searchpath);
if ($_searchpath == '') {
$REX['LOCALES'] = $lang_object->getLocales($searchpath);
}
$locale = trim($lang_object->msg('setlocale'));
$charset = trim($lang_object->msg('htmlcharset'));
$charset_alt = str_replace('iso-', 'iso', $charset);
$setted = setlocale(LC_ALL, $locale . '.' . $charset, $locale . '.' . $charset_alt, $locale);
return $lang_object;
}
示例13: copy
$error = '';
// check folder write permissions
$tmpDir = $REX['MEDIAFOLDER'] . '/' . $REX['TEMP_PREFIX'];
if (!is_dir($tmpDir) && !mkdir($tmpDir)) {
$error = 'Could not create temp-dir "' . $tmpDir . '"!';
}
if ($error == '' && !is_writable($tmpDir)) {
$error = 'temp-dir "' . $tmpDir . '" not writable!';
}
$tinyDir = $tmpDir . '/tinymce';
if ($error == '' && !is_dir($tinyDir) && !mkdir($tinyDir)) {
$error = 'Could not create tiny-dir "' . $tinyDir . '"!';
}
if ($error == '' && !is_writable($tinyDir)) {
$error = 'tiny-dir "' . $tinyDir . '" not writable!';
}
// Copy files
if ($error == '') {
// Install Tiny Core
rex_a52_extract_archive('include/addons/tinymce/js/tinymce.zip', $I18N_A52->msg('install_core'));
// Install German Language Pack
rex_a52_extract_archive('include/addons/tinymce/js/tinymce_lang_de.zip', $I18N_A52->msg('install_lang_pakage'));
// Install Redaxo Plugin
rex_a52_extract_archive('include/addons/tinymce/js/redaxo_tiny_plugin.zip', $I18N_A52->msg('install_redaxo_plugin'), '../files/' . $REX['TEMP_PREFIX'] . '/tinymce/jscripts/tiny_mce/plugins/');
copy('include/addons/tinymce/css/tinymce.css', '../files/' . $REX['TEMP_PREFIX'] . '/tinymce/tinymce.css');
}
if ($error != '') {
$REX['ADDON']['installmsg']['tinymce'] = $error;
} else {
$REX['ADDON']['install']['tinymce'] = true;
}
示例14: rex_d2u_stellenmarkt_media_is_in_use
$REX['ADDON']['version'][$mypage] = '2.0.7';
$REX['ADDON']['perm'][$mypage] = $mypage . '[]';
$REX['ADDON']['author'][$mypage] = "www.design-to-use.de - Tobias Krais - http://www.design-to-use.de/";
$REX['PERM'][] = $mypage . '[]';
// SEO42 Erweiterung
if (OOAddon::isActivated('seo42')) {
// SEO42
require_once dirname(__FILE__) . "/extensions/seo42.inc.php";
// URLs fuer SEO42 bekannt machen
rex_register_extension('SEO42_PATHLIST_CREATED', 'd2u_stellenmarkt_extended_urls');
// URLs in Sitemap eintragen
rex_register_extension('SEO42_SITEMAP_ARRAY_CREATED', 'd2u_stellenmarkt_extended_sitemap');
}
rex_register_extension('OOMEDIA_IS_IN_USE', 'rex_d2u_stellenmarkt_media_is_in_use');
// add subpages
$REX['ADDON'][$mypage]['SUBPAGES'] = array(array('', $I18N_STELLEN->msg('stellenangebote')), array('kategorien', $I18N_STELLEN->msg('kategorien')), array('kontakte', $I18N_STELLEN->msg('kontakte')));
if (OOPlugin::isAvailable('d2u_stellenmarkt', 'hr4you_sync')) {
array_push($REX['ADDON'][$mypage]['SUBPAGES'], array('hr4you_sync', 'HR4YOU Sync'));
}
/**
* Prüft ob dieses Addon Medien im Medienpool nutzt.
* @global array $REX Redaxo Einstellungen
* @param type $params Übergabeparameter des Extension Points
* @return string Warnnachricht als Array
*/
function rex_d2u_stellenmarkt_media_is_in_use($params)
{
global $REX;
$warning = $params['subject'];
$filename = addslashes($params['filename']);
$sql_stelle = rex_sql::factory();
示例15: stats
<?php
$mypage = "stats";
// only for this file
include_once $REX[INCLUDE_PATH] . "/addons/{$mypage}/classes/class.stats.inc.php";
if (!$REX[GG]) {
// only backend
// CREATE LANG OBJ FOR THIS ADDON
$I18N_STATS = new i18n($REX[LANG], $REX[INCLUDE_PATH] . "/addons/{$mypage}/lang/");
$REX[ADDON][rxid][$mypage] = "7";
// unique redaxo addon id
$REX[ADDON][page][$mypage] = "{$mypage}";
$REX[ADDON][name][$mypage] = $I18N_STATS->msg("stats_title");
$REX[ADDON][perm][$mypage] = "stats[]";
$REX[PERM][] = "stats[]";
} else {
$log = new stats();
$log->writeLog($article_id + 0);
}
// backend and frontend
$REX[ADDON][tbl][log][$mypage] = "rex_7_log";
// wir noch nicht benutzt