Overview

Namespaces

  • None
  • Xmf
    • Database
    • Module
      • Helper
    • Template
  • Xoops
    • Auth
    • Core
      • Cache
      • Database
        • Logging
        • Schema
      • Exception
      • Handler
        • Scheme
      • Kernel
        • Dtype
        • Handlers
        • Model
      • Lists
      • Locale
        • Punic
      • Service
        • Contract
      • Session
      • Text
        • Sanitizer
          • Extensions
      • Theme
        • Plugins
    • Form
    • Html
    • Locale
    • Module
      • Helper
      • Plugin

Classes

  • AdminFactory
  • Factory
  • NullTheme
  • PluginAbstract
  • XoopsTheme
  • Overview
  • Namespace
  • Class
  • Tree

Class XoopsTheme

XoopsTheme component class file

Direct known subclasses

Xoops\Core\Theme\NullTheme, XoopsTheme
Namespace: Xoops\Core\Theme
Package: Theme
Category: Xoops\Core
Copyright: 2008-2015 XOOPS Project (http://xoops.org)
License: GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
Author: Skalpa Keo skalpa@xoops.org
Author: Taiwen Jiang phppp@users.sourceforge.net
Link: http://xoops.org
Located at oops_lib/Xoops/Core/Theme/XoopsTheme.php
Methods summary
public boolean
# xoInit( )

Initializes this theme Upon initialization, the theme creates its template engine and instantiates the plug-ins from the specified Xoops\Core\Theme\XoopsTheme::$plugins list. If the theme is a 2.0 theme, that does not display redirection messages, the HTTP redirection system is disabled to ensure users will see the redirection screen.

Initializes this theme Upon initialization, the theme creates its template engine and instantiates the plug-ins from the specified Xoops\Core\Theme\XoopsTheme::$plugins list. If the theme is a 2.0 theme, that does not display redirection messages, the HTTP redirection system is disabled to ensure users will see the redirection screen.

Returns

boolean
public string
# generateCacheId( string $cache_id, string $extraString = '' )

Generate cache id based on extra information of language and user groups User groups other than anonymous should be detected to avoid disclosing group sensitive contents

Generate cache id based on extra information of language and user groups User groups other than anonymous should be detected to avoid disclosing group sensitive contents

Parameters

$cache_id
raw cache id
$extraString
extra string

Returns

string
complete cache id
public boolean
# checkCache( )

XoopsTheme::checkCache()

XoopsTheme::checkCache()

Returns

boolean
public boolean
# render( string $canvasTpl = null, string $pageTpl = null, string $contentTpl = null, array $vars = array() )

Render the page The theme engine builds pages from 2 templates: canvas and content. A module can call this method directly and specify what templates the theme engine must use. If render() hasn't been called before, the theme defaults will be used for the canvas and page template (and xoopsOption['template_main'] for the content).

Render the page The theme engine builds pages from 2 templates: canvas and content. A module can call this method directly and specify what templates the theme engine must use. If render() hasn't been called before, the theme defaults will be used for the canvas and page template (and xoopsOption['template_main'] for the content).

Parameters

$canvasTpl
The canvas template, if different from the theme default
$pageTpl
The page template, if different from the theme default (unsupported, 2.3+ only)
$contentTpl
The content template
$vars
Template variables to send to the template engine

Returns

boolean
public array
# getLocalizationAssets( string $type = "main" )

Load localization information Folder structure for localization: themes/themefolder/english - main.php - language definitions - style.css - localization stylesheet - script.js - localization script

Load localization information Folder structure for localization: themes/themefolder/english - main.php - language definitions - style.css - localization stylesheet - script.js - localization script

Parameters

$type
language domain (unused?)

Returns

array
list of 2 arrays, one
public
# addScript( string $src = '', array $attributes = array(), string $content = '' )

Adds script code to the document head This methods allows the insertion of an external script file (if $src is provided), or of a script snippet. The file URI is parsed to take benefit of the theme resource overloading system. The $attributes parameter allows you to specify the attributes that will be added to the inserted