XOOPS  2.6.0
theme.php
Go to the documentation of this file.
1 <?php
2 /*
3  You may not change or alter any portion of this comment or credits
4  of supporting developers from this source code or any supporting source code
5  which is considered copyrighted (c) material of the original comment or credit authors.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 */
11 
13 
33 {
37  public $xoBundleIdentifier = 'XoopsThemeFactory';
38 
44  public $allowedThemes = array();
45 
51  public $defaultTheme = 'default';
52 
58  public $allowUserSelection = true;
59 
67  public function createInstance($options = array())
68  {
70  // Grab the theme folder from request vars if present
71  if (empty($options['folderName'])) {
72  if (($req = @$_REQUEST['xoops_theme_select']) && $this->isThemeAllowed($req)) {
73  $options['folderName'] = $req;
74  if (isset($_SESSION) && $this->allowUserSelection) {
75  $_SESSION[$this->xoBundleIdentifier]['defaultTheme'] = $req;
76  }
77  } else {
78  if (isset($_SESSION[$this->xoBundleIdentifier]['defaultTheme'])) {
79  $options['folderName'] = $_SESSION[$this->xoBundleIdentifier]['defaultTheme'];
80  } else {
81  if (empty($options['folderName']) || !$this->isThemeAllowed($options['folderName'])) {
82  $options['folderName'] = $this->defaultTheme;
83  }
84  }
85  }
86  $xoops->setConfig('theme_set', $options['folderName']);
87  }
88  $options['path'] = \XoopsBaseConfig::get('themes-path') . '/' . $options['folderName'];
89  $inst = new XoopsTheme();
90  foreach ($options as $k => $v) {
91  $inst->$k = $v;
92  }
93  $inst->xoInit();
94  return $inst;
95  }
96 
104  public function isThemeAllowed($name)
105  {
106  return (empty($this->allowedThemes) || in_array($name, $this->allowedThemes));
107  }
108 }
109 
118 {
119  public function createInstance($options = array())
120  {
122  $options["plugins"] = array();
123  $options['renderBanner'] = false;
124  $inst = parent::createInstance($options);
125  $inst->path = \XoopsBaseConfig::get('adminthemes-path') . '/' . $inst->folderName;
126  $inst->url = \XoopsBaseConfig::get('adminthemes-url') . '/' . $inst->folderName;
127  $inst->template->assign(array(
128  'theme_path' => $inst->path, 'theme_tpl' => $inst->path . '/xotpl', 'theme_url' => $inst->url,
129  'theme_img' => $inst->url . '/img', 'theme_icons' => $inst->url . '/icons',
130  'theme_css' => $inst->url . '/css', 'theme_js' => $inst->url . '/js',
131  'theme_lang' => $inst->url . '/language',
132  ));
133 
134  return $inst;
135  }
136 }
137 
139 {
145  public $renderBanner = true;
146 
152  public $folderName = '';
153 
159  public $path = '';
160 
164  public $url = '';
165 
171  public $bufferOutput = true;
172 
178  public $canvasTemplate = 'theme.html';
179 
185  public $themesPath = 'themes';
186 
192  public $contentTemplate = '';
193 
198 
202  public $contentCacheId = null;
203 
209  public $content = '';
210 
217  public $plugins = array('XoopsThemeBlocksPlugin');
218 
222  public $renderCount = 0;
223 
229  public $template = false;
230 
236  public $metas = array(
237  'meta' => array(), 'link' => array(), 'script' => array()
238  );
239 
245  public $assets = null;
246 
252  public $baseAssets = array(
253  'js' => array(),
254  'css' => array(),
255  );
256 
262  public $htmlHeadStrings = array();
263 
269  public $templateVars = array();
270 
276  public $use_extra_cache_id = true;
277 
285  public $headersCacheEngine = 'default';
286 
304  public function xoInit()
305  {
307  $this->assets = $xoops->assets();
308  $this->path = \XoopsBaseConfig::get('themes-path') . '/' . $this->folderName;
309  $this->url = \XoopsBaseConfig::get('themes-url') . '/' . $this->folderName;
310  $this->template = null;
311  $this->template = new XoopsTpl();
312  //$this->template->currentTheme = $this;
313  $this->template->assignByRef('xoTheme', $this);
314  $this->template->assign(array(
315  'xoops_theme' => $xoops->getConfig('theme_set'),
316  'xoops_imageurl' => \XoopsBaseConfig::get('themes-url') . '/' . $xoops->getConfig('theme_set') . '/',
317  'xoops_themecss' => $xoops->getCss($xoops->getConfig('theme_set')),
318  'xoops_requesturi' => htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES),
319  'xoops_sitename' => htmlspecialchars($xoops->getConfig('sitename'), ENT_QUOTES),
320  'xoops_slogan' => htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES),
321  'xoops_dirname' => $xoops->moduleDirname,
322  'xoops_banner' => $this->renderBanner ? $xoops->getBanner() : '&nbsp;',
323  'xoops_pagetitle' => $xoops->isModule() ? $xoops->module->getVar('name') : htmlspecialchars($xoops->getConfig('slogan'), ENT_QUOTES)
324  ));
325  $this->template->assign(array(
326  'theme_path' => $this->path, 'theme_tpl' => $this->path . '/xotpl', 'theme_url' => $this->url,
327  'theme_img' => $this->url . '/img', 'theme_icons' => $this->url . '/icons',
328  'theme_css' => $this->url . '/css', 'theme_js' => $this->url . '/js',
329  'theme_lang' => $this->url . '/language',
330  ));
331 
332  if ($xoops->isUser()) {
333  $response = $xoops->service("Avatar")->getAvatarUrl($xoops->user);
334  $avatar = $response->getValue();
335  $avatar = empty($avatar) ? '' : $avatar;
336 
337  $this->template->assign(array(
338  'xoops_isuser' => true,
339  'xoops_avatar' => $avatar,
340  'xoops_userid' => $xoops->user->getVar('uid'), 'xoops_uname' => $xoops->user->getVar('uname'),
341  'xoops_name' => $xoops->user->getVar('name'), 'xoops_isadmin' => $xoops->isAdmin(),
342  'xoops_usergroups' => $xoops->user->getGroups()
343  ));
344  } else {
345  $this->template->assign(array(
346  'xoops_isuser' => false,
347  'xoops_isadmin' => false,
348  'xoops_usergroups' => array(FixedGroups::ANONYMOUS)
349  ));
350  }
351 
352  // Meta tags
353  $metas = array(
354  'description', 'keywords', 'robots', 'rating', 'author', 'copyright'
355  );
356  foreach ($metas as $name) {
357  $this->addMeta('meta', $name, $xoops->getConfig('meta_' . $name));
358  }
359 
360  // Other assigns
361  $assigns = array(
362  'title', 'slogan', 'locale', 'footer', 'jquery_theme', 'startpage'
363  );
364  foreach ($assigns as $name) {
365  // prefix each tag with 'xoops_'
366  $this->template->assign("xoops_$name", $xoops->getConfig($name));
367  }
368 
369  // Load global javascript
370  //$this->addScript('include/xoops.js');
371  //$this->loadLocalization();
372  list($cssAssets, $jsAssets) = $this->getLocalizationAssets();
373  if (!empty($cssAssets)) {
374  $this->addBaseStylesheetAssets($cssAssets);
375  }
376  $this->addBaseScriptAssets('include/xoops.js');
377  $this->addBaseScriptAssets('@jquery');
378  //$this->addBaseScriptAssets('media/bootstrap/js/bootstrap.min.js');
379  if (!empty($jsAssets)) {
380  $this->addBaseScriptAssets($jsAssets);
381  }
382 
383  if ($this->bufferOutput) {
384  ob_start();
385  }
386  $xoops->setTheme($this);
387  $xoops->setTpl($this->template);
388 
389  //For legacy only, never use this Globals
390  $GLOBALS['xoTheme'] = $xoops->theme();
391  $GLOBALS['xoopsTpl'] = $xoops->tpl();
392 
393  //to control order of loading JS and CSS
394  // TODO - this should be done in such a way it can join the base asset
395  // load above.
396  if (XoopsLoad::fileExists($this->path . "/theme_onload.php")) {
397  include_once($this->path . "/theme_onload.php");
398  }
399 
400  // Instanciate and initialize all the theme plugins
401  foreach ($this->plugins as $k => $bundleId) {
402  if (!is_object($bundleId)) {
403  /* @var $plugin XoopsThemePlugin */
404  $plugin = new $bundleId();
405  $plugin->theme = $this;
406  $plugin->xoInit();
407 
408  $this->plugins[$bundleId] = null;
409  $this->plugins[$bundleId] = $plugin;
410  unset($this->plugins[$k]);
411  }
412  }
413  return true;
414  }
415 
425  public function generateCacheId($cache_id, $extraString = '')
426  {
428  static $extra_string;
429  if (!$this->use_extra_cache_id) {
430  return $cache_id;
431  }
432 
433  if (empty($extraString)) {
434  if (empty($extra_string)) {
435  // Generate language section
436  $extra_string = $xoops->getConfig('locale');
437  // Generate group section
438  if (!$xoops->isUser()) {
439  $extra_string .= '-' . FixedGroups::ANONYMOUS;
440  } else {
441  $groups = $xoops->user->getGroups();
442  sort($groups);
443  // Generate group string for non-anonymous groups,
444  // db-pass and db-name (before we find better variables) are used to protect group sensitive contents
445  $extra_string .= '-' . substr(md5(implode('-', $groups)), 0, 8) . '-' . substr(md5(\XoopsBaseConfig::get('db-pass') . \XoopsBaseConfig::get('db-name') . \XoopsBaseConfig::get('db-user')), 0, 8);
446  }
447  }
448  $extraString = $extra_string;
449  }
450  $cache_id .= '-' . $extraString;
451  return $cache_id;
452  }
453 
459  public function checkCache()
460  {
461  if ($_SERVER['REQUEST_METHOD'] != 'POST' && $this->contentCacheLifetime) {
462  $template = $this->contentTemplate ? $this->contentTemplate : 'module:system/system_dummy.tpl';
463  $this->template->caching = 2;
464  $this->template->cache_lifetime = $this->contentCacheLifetime;
465  $uri = str_replace(\XoopsBaseConfig::get('url'), '', $_SERVER['REQUEST_URI']);
466  // Clean uri by removing session id
467  if (defined('SID') && SID && strpos($uri, SID)) {
468  $uri = preg_replace("/([\?&])(" . SID . "$|" . SID . "&)/", "\\1", $uri);
469  }
470  $this->contentCacheId = $this->generateCacheId('page_' . substr(md5($uri), 0, 8));
471  if ($this->template->isCached($template, $this->contentCacheId)) {
472  Xoops::getInstance()->events()->triggerEvent('core.theme.checkcache.success', array($template, $this));
473  $this->render(null, null, $template);
474  return true;
475  }
476  }
477  return false;
478  }
479 
494  public function render($canvasTpl = null, $pageTpl = null, $contentTpl = null, $vars = array())
495  {
496  if ($this->renderCount) {
497  return false;
498  }
500  $xoops->events()->triggerEvent('core.theme.render.start', array($this));
501  $cache = $xoops->cache($this->headersCacheEngine);
502 
503  //Get meta information for cached pages
504  if ($this->contentCacheLifetime && $this->contentCacheId && $content = $cache->read($this->contentCacheId)) {
505  //we need to merge metas set by blocks with the module cached meta
506  $this->htmlHeadStrings = array_merge($this->htmlHeadStrings, $content['htmlHeadStrings']);
507  foreach ($content['metas'] as $type => $value) {
508  $this->metas[$type] = array_merge($this->metas[$type], $content['metas'][$type]);
509  }
510  $xoops->setOption('xoops_pagetitle', $content['xoops_pagetitle']);
511  $xoops->setOption('xoops_module_header', $content['header']);
512  }
513 
514  if ($xoops->getOption('xoops_pagetitle')) {
515  $this->template->assign('xoops_pagetitle', $xoops->getOption('xoops_pagetitle'));
516  }
517  $header = !$xoops->getOption('xoops_module_header') ? $this->template->getTemplateVars('xoops_module_header') : $xoops->getOption('xoops_module_header');
518 
519  //save meta information of cached pages
520  if ($this->contentCacheLifetime && $this->contentCacheId && !$contentTpl) {
521  $content['htmlHeadStrings'] = (array)$this->htmlHeadStrings;
522  $content['metas'] = (array)$this->metas;
523  $content['xoops_pagetitle'] = $this->template->getTemplateVars('xoops_pagetitle');
524  $content['header'] = $header;
525  $cache->write($this->contentCacheId, $content);
526  }
527 
528  // @internal : Lame fix to ensure the metas specified in the xoops config page don't appear twice
529  $old = array('robots', 'keywords', 'description', 'rating', 'author', 'copyright');
530  foreach ($this->metas['meta'] as $name => $value) {
531  if (in_array($name, $old)) {
532  $this->template->assign("xoops_meta_$name", htmlspecialchars($value, ENT_QUOTES));
533  unset($this->metas['meta'][$name]);
534  }
535  }
536 
537  // We assume no overlap between $GLOBALS['xoopsOption']['xoops_module_header'] and $this->template->getTemplateVars( 'xoops_module_header' ) ?
538  $this->template->assign('xoops_module_header', $this->renderMetas(true) . "\n" . $header);
539 
540  if ($canvasTpl) {
541  $this->canvasTemplate = $canvasTpl;
542  }
543  if ($contentTpl) {
544  $this->contentTemplate = $contentTpl;
545  }
546  if (!empty($vars)) {
547  $this->template->assign($vars);
548  }
549  if ($this->contentTemplate) {
550  $this->content = $this->template->fetch($this->contentTemplate, $this->contentCacheId);
551  }
552  if ($this->bufferOutput) {
553  $this->content .= ob_get_contents();
554  ob_end_clean();
555  }
556 
557  $this->template->assignByRef('xoops_contents', $this->content);
558 
559  // Do not cache the main (theme.html) template output
560  $this->template->caching = 0;
561  $this->template->display($this->path . '/' . $this->canvasTemplate);
562  $this->renderCount++;
563  $xoops->events()->triggerEvent('core.theme.render.end', array($this));
564  return true;
565  }
566 
579  public function getLocalizationAssets($type = "main")
580  {
581  $cssAssets = array();
582  $jsAssets = array();
583 
585 
587 
589  // Load global localization stylesheet if available
590  if (XoopsLoad::fileExists($xoops->path('locale/' . $language . '/style.css'))) {
591  $cssAssets[] = $xoops->path('locale/' . $language . '/style.css');
592  }
593  //$this->addLanguage($type);
594  // Load theme localization stylesheet and scripts if available
595  if (XoopsLoad::fileExists($this->path . '/locale/' . $language . '/script.js')) {
596  $jsAssets[] = $this->url . '/locale/' . $language . '/script.js';
597  }
598  if (XoopsLoad::fileExists($this->path . '/locale/' . $language . '/style.css')) {
599  $cssAssets[] = $this->path . '/locale/' . $language . '/style.css';
600  }
601  return array($cssAssets, $jsAssets);
602  }
603 
612  /*
613  public function addLanguage($type = "main", $language = null)
614  {
615  $xoops = Xoops::getInstance();
616  $language = is_null($language) ? $xoops->getConfig('locale') : $language;
617  if (!XoopsLoad::fileExists($file = $xoops->path($this->resourcePath("/locale/{$language}/{$type}.php")))) {
618  if (!XoopsLoad::fileExists($file = $xoops->path($this->resourcePath("/locale/en_US/{$type}.php")))) {
619  return false;
620  }
621  }
622  $ret = include_once $file;
623  return $ret;
624  }*/
625 
654  public function addScript($src = '', $attributes = array(), $content = '')
655  {
657  if (empty($attributes)) {
658  $attributes = array();
659  }
660  if (!empty($src)) {
661  $src = $xoops->url($this->resourcePath($src));
662  $attributes['src'] = $src;
663  }
664  if (!empty($content)) {
665  $attributes['_'] = $content;
666  }
667  if (!isset($attributes['type'])) {
668  $attributes['type'] = 'text/javascript';
669  }
670  $this->addMeta('script', $src, $attributes);
671  }
672 
682  public function addStylesheet($src = '', $attributes = array(), $content = '')
683  {
685  if (empty($attributes)) {
686  $attributes = array();
687  }
688  if (!empty($src)) {
689  $src = $xoops->url($this->resourcePath($src));
690  $attributes['href'] = $src;
691  }
692  if (!isset($attributes['type'])) {
693  $attributes['type'] = 'text/css';
694  }
695  if (!empty($content)) {
696  $attributes['_'] = $content;
697  }
698  $this->addMeta('stylesheet', $src, $attributes);
699  }
700 
710  public function addScriptAssets($assets, $filters = 'default', $target = null)
711  {
712  $url = $this->assets->getUrlToAssets('js', $assets, $filters, $target);
713  $this->addScript($url);
714  }
715 
725  public function addStylesheetAssets($assets, $filters = 'default', $target = null)
726  {
727  $url = $this->assets->getUrlToAssets('css', $assets, $filters, $target);
728  $this->addStylesheet($url);
729  }
730 
740  public function addBaseAssets($type, $assets)
741  {
742  if (is_scalar($assets)) {
743  $this->baseAssets[$type][]=$assets;
744  } elseif (is_array($assets)) {
745  $this->baseAssets[$type] = array_merge($this->baseAssets[$type], $assets);
746  }
747  }
748 
756  public function addBaseScriptAssets($assets)
757  {
758  $this->addBaseAssets('js', $assets);
759  }
760 
769  {
770  $this->addBaseAssets('css', $assets);
771  }
772 
793  public function setNamedAsset($name, $assets, $filters = null)
794  {
795  return $this->assets->registerAssetReference($name, $assets, $filters);
796  }
797 
807  public function addLink($rel, $href = '', $attributes = array())
808  {
809  if (empty($attributes)) {
810  $attributes = array();
811  }
812  if (!empty($href)) {
813  $attributes['href'] = $href;
814  }
815  $attributes['rel'] = $rel;
816  $this->addMeta('link', '', $attributes);
817  }
818 
827  public function addHttpMeta($name, $value = null)
828  {
829  if (isset($value)) {
830  return $this->addMeta('http', $name, $value);
831  }
832  unset($this->metas['http'][$name]);
833  return false;
834  }
835 
845  public function addMeta($type = 'meta', $name = '', $value = '')
846  {
847  if (!isset($this->metas[$type])) {
848  $this->metas[$type] = array();
849  }
850  if (!empty($name)) {
851  $this->metas[$type][$name] = $value;
852  } else {
853  $this->metas[$type][md5(serialize(array($value)))] = $value;
854  }
855  return $value;
856  }
857 
868  public function headContent($params, $content, &$smarty, &$repeat)
869  {
870  if (!$repeat) {
871  $this->htmlHeadStrings[] = $content;
872  }
873  }
874 
882  public function renderMetas($return = false)
883  {
884  $str = '';
885 
886  if (!empty($this->baseAssets['js'])) {
887  $url = $this->assets->getUrlToAssets('js', $this->baseAssets['js']);
888  if (!empty($url)) {
889  $str .= '<script src="' . $url . '" type="text/javascript"></script>'."\n";
890  }
891  }
892 
893  if (!empty($this->baseAssets['css'])) {
894  $url = $this->assets->getUrlToAssets('css', $this->baseAssets['css']);
895  if (!empty($url)) {
896  $str .= '<link rel="stylesheet" href="' . $url . '" type="text/css" />'."\n";
897  }
898  }
899 
900  foreach (array_keys($this->metas) as $type) {
901  $str .= $this->renderMetasByType($type);
902  }
903  $str .= implode("\n", $this->htmlHeadStrings);
904 
905  if ($return) {
906  return $str;
907  }
908  echo $str;
909  return true;
910  }
911 
919  public function renderMetasByType($type)
920  {
921  if (!isset($type)) {
922  return '';
923  }
924 
925  $str = '';
926  switch ($type) {
927  case 'script':
928  foreach ($this->metas[$type] as $attrs) {
929  $str .= "<script" . $this->renderAttributes($attrs) . ">";
930  if (@$attrs['_']) {
931  $str .= "\n//<![CDATA[\n" . $attrs['_'] . "\n//]]>";
932  }
933  $str .= "</script>\n";
934  }
935  break;
936  case 'link':
937  foreach ($this->metas[$type] as $attrs) {
938  $rel = $attrs['rel'];
939  unset($attrs['rel']);
940  $str .= '<link rel="' . $rel . '"' . $this->renderAttributes($attrs) . " />\n";
941  }
942  break;
943  case 'stylesheet':
944  foreach ($this->metas[$type] as $attrs) {
945  if (@$attrs['_']) {
946  $str .= '<style' . $this->renderAttributes($attrs)
947  . ">\n/* <![CDATA[ */\n" . $attrs['_'] . "\n/* //]]> */\n</style>";
948  } else {
949  $str .= '<link rel="stylesheet"' . $this->renderAttributes($attrs) . " />\n";
950  }
951  }
952  break;
953  case 'http':
954  foreach ($this->metas[$type] as $name => $content) {
955  $str .= '<meta http-equiv="' . htmlspecialchars($name, ENT_QUOTES) . '" content="' . htmlspecialchars($content, ENT_QUOTES) . "\" />\n";
956  }
957  break;
958  default:
959  foreach ($this->metas[$type] as $name => $content) {
960  $str .= '<meta name="' . htmlspecialchars($name, ENT_QUOTES) . '" content="' . htmlspecialchars($content, ENT_QUOTES) . "\" />\n";
961  }
962  break;
963  }
964 
965  return $str;
966  }
967 
975  public function genElementId($tagName = 'xos')
976  {
977  static $cache = array();
978  if (!isset($cache[$tagName])) {
979  $cache[$tagName] = 1;
980  }
981  return $tagName . '-' . $cache[$tagName]++;
982  }
983 
991  public function renderAttributes($coll)
992  {
993  $str = '';
994  foreach ($coll as $name => $val) {
995  if ($name != '_') {
996  $str .= ' ' . $name . '="' . htmlspecialchars($val, ENT_QUOTES) . '"';
997  }
998  }
999  return $str;
1000  }
1001 
1009  public function resourcePath($path)
1010  {
1011  if (substr($path, 0, 1) == '/') {
1012  $path = substr($path, 1);
1013  }
1014  $xoops_root_path = \XoopsBaseConfig::get('root-path');
1015 //\Xoops::getInstance()->events()->triggerEvent('debug.log', $this);
1016  if (XoopsLoad::fileExists($xoops_root_path . "/{$this->themesPath}/{$this->folderName}/{$path}")) {
1017 //\Xoops::getInstance()->events()->triggerEvent('debug.log', "custom theme path {$this->themesPath}/{$this->folderName}/{$path}");
1018  return "{$this->themesPath}/{$this->folderName}/{$path}";
1019  }
1020 
1021  if (XoopsLoad::fileExists($xoops_root_path . "/themes/{$this->folderName}/{$path}")) {
1022 //\Xoops::getInstance()->events()->triggerEvent('debug.log', "main theme folder themes/{$this->folderName}/{$path}");
1023  return "themes/{$this->folderName}/{$path}";
1024  }
1025 //\Xoops::getInstance()->events()->triggerEvent('debug.log', "drop thru {$path}");
1026  return $path;
1027  }
1028 }
1029 
1030 abstract class XoopsThemePlugin
1031 {
1035  public $theme = false;
1036 
1037  abstract function xoInit();
1038 }
createInstance($options=array())
Definition: theme.php:67
renderAttributes($coll)
Definition: theme.php:991
checkCache()
Definition: theme.php:459
$contentTemplate
Definition: theme.php:192
$_SESSION['RF']["verify"]
Definition: dialog.php:4
$bufferOutput
Definition: theme.php:171
$templateVars
Definition: theme.php:269
addBaseScriptAssets($assets)
Definition: theme.php:756
static getInstance()
Definition: Xoops.php:160
$options['editor']
createInstance($options=array())
Definition: theme.php:119
$_SERVER['REQUEST_URI']
generateCacheId($cache_id, $extraString= '')
Definition: theme.php:425
getLocalizationAssets($type="main")
Definition: theme.php:579
addScriptAssets($assets, $filters= 'default', $target=null)
Definition: theme.php:710
$headersCacheEngine
Definition: theme.php:285
isThemeAllowed($name)
Definition: theme.php:104
$header
$xoops
Definition: admin.php:25
if(DIRECTORY_SEPARATOR!="/") $xoops_root_path
Definition: config.php:7
$htmlHeadStrings
Definition: theme.php:262
addScript($src= '', $attributes=array(), $content= '')
Definition: theme.php:654
static loadThemeLocale(XoopsTheme $theme)
Definition: Locale.php:87
addBaseStylesheetAssets($assets)
Definition: theme.php:768
addLink($rel, $href= '', $attributes=array())
Definition: theme.php:807
addStylesheetAssets($assets, $filters= 'default', $target=null)
Definition: theme.php:725
addHttpMeta($name, $value=null)
Definition: theme.php:827
$renderCount
Definition: theme.php:222
static fileExists($file)
Definition: xoopsload.php:506
$contentCacheId
Definition: theme.php:202
static get($name)
addMeta($type= 'meta', $name= '', $value= '')
Definition: theme.php:845
$contentCacheLifetime
Definition: theme.php:197
genElementId($tagName= 'xos')
Definition: theme.php:975
renderMetas($return=false)
Definition: theme.php:882
addStylesheet($src= '', $attributes=array(), $content= '')
Definition: theme.php:682
$use_extra_cache_id
Definition: theme.php:276
xoInit()
Definition: theme.php:304
$type
Definition: misc.php:33
$groups
$canvasTemplate
Definition: theme.php:178
setNamedAsset($name, $assets, $filters=null)
Definition: theme.php:793
$GLOBALS['xoops']
Definition: common.php:33
$avatar
Definition: userinfo.php:94
$uri
Definition: search.php:30
renderMetasByType($type)
Definition: theme.php:919
addBaseAssets($type, $assets)
Definition: theme.php:740
if($xoops->isUser()&&$isAdmin) $response
Definition: userinfo.php:83
resourcePath($path)
Definition: theme.php:1009
$language
headContent($params, $content, &$smarty, &$repeat)
Definition: theme.php:868
$renderBanner
Definition: theme.php:145
$target
render($canvasTpl=null, $pageTpl=null, $contentTpl=null, $vars=array())
Definition: theme.php:494