15 trigger_error(
"The package only works for XOOPS 2.3+", E_USER_ERROR);
18 if (!defined(
"FRAMEWORKS_ART_FUNCTIONS_INI")):
19 define(
"FRAMEWORKS_ART_FUNCTIONS_INI",
true);
32 if (empty($handler)) {
33 $handlerClass =
"ArtObject";
34 $fileName =
"object.php";
36 $handlerClass =
"ArtObject" . ucfirst($handler) .
"Handler";
37 $fileName =
"object.{$handler}.php";
41 return class_exists($handlerClass);
62 $constant = strtoupper(
"frameworks_{$dirname}_functions" . (($group) ?
"_{$group}" :
""));
63 if (defined($constant)) {
66 return include_once
FRAMEWORKS_ROOT_PATH .
"/{$dirname}/functions.{$group}" . (empty($group) ?
"" :
".") .
"php";
87 $constant = strtoupper(
"{$dirname}_functions" . (($group) ?
"_{$group}" :
"") .
"_loaded");
88 if (defined($constant)) {
91 $filename =
\XoopsBaseConfig::get(
'root-path') .
"/modules/{$dirname}/include/functions.{$group}" . (empty($group) ?
"" :
".") .
"php";
92 return include_once $filename;
109 $renderer = ucfirst(
$dirname) . ucfirst($class) .
"Renderer";
110 if (!class_exists($renderer)) {
111 require_once \XoopsBaseConfig::get(
'root-path') .
"/modules/{$dirname}/class/{$class}.renderer.php";
113 $instance = eval(
"{$renderer}::instance()");
118 if (!function_exists(
"mod_constant")) {
125 function mod_constant(
$name)
128 if (!empty(
$GLOBALS[
"VAR_PREFIXU"]) && @defined(
$GLOBALS[
"VAR_PREFIXU"] .
"_" . strtoupper(
$name))) {
129 return CONSTANT(
$GLOBALS[
"VAR_PREFIXU"] .
"_" . strtoupper(
$name));
130 } elseif (!empty(
$xoops->module) && @defined(strtoupper(
$xoops->module->getVar(
"dirname",
"n") .
"_" .
$name))) {
131 return CONSTANT(strtoupper(
$xoops->module->getVar(
"dirname",
"n") .
"_" .
$name));
132 } elseif (defined(strtoupper(
$name))) {
133 return CONSTANT(strtoupper(
$name));
135 return str_replace(
"_",
" ", strtolower(
$name));
140 if (!function_exists(
"mod_DB_prefix")) {
148 function mod_DB_prefix(
$name, $isRel =
false)
153 return $relative_name;
155 return $xoopsDB->prefix($relative_name);
159 if (!function_exists(
"xoops_message")):
167 function xoops_message($message, $userlevel = 0)
172 } elseif (
$xoops->user->isAdmin()) {
177 if ($userlevel > $level) {
181 echo
"<div style=\"clear:both\"> </div>";
182 if (is_array($message) || is_object($message)) {
187 echo
"<div>{$message}</div>";
189 echo
"<div style=\"clear:both\"> </div>";
200 if (!empty(
$xoops->moduleConfig[
"do_debug"])) {
201 if (is_array($message) || is_object($message)) {
206 echo
"<div>$message</div>";
241 $xoops->isModule() &&
"system" ==
$xoops->module->getVar(
"dirname",
"n") &&
243 (
"update_ok" == $_POST[
"op"] ||
"install_ok" == $_POST[
"op"] ||
"uninstall_ok" == $_POST[
"op"]) &&
244 "modulesadmin" == $_POST[
"fct"]);
const FRAMEWORKS_ROOT_PATH
mod_isModuleAction($dirname="system")
defined('DS') or define('DS' DIRECTORY_SEPARATOR
load_functions($group="", $dirname="art")
mod_getDirname($current_path=null)
mod_loadRenderer($class, $dirname="")
if(!function_exists("mod_constant")) if(!function_exists("mod_DB_prefix")) if(!function_exists("xoops_message"))($message, $userlevel=0) endif
load_objectHandler($handler="", $dirname="art")
mod_loadFunctions($group="", $dirname="")