[ Index ] |
|
Code source de XOOPS 2.0.17.1 |
[Code source] [Imprimer] [Statistiques]
xos_opal_Theme component class file
Author: | Skalpa Keo <skalpa@xoops.org> |
Copyright: | The Xoops project http://www.xoops.org/ |
License: | http://www.fsf.org/copyleft/gpl.html GNU public license |
Version: | $Id: theme.php 892 2007-07-28 09:35:49Z phppp $ |
Poids: | 564 lignes (19 kb) |
Inclus ou requis: | 1 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
xos_opal_ThemeFactory:: (2 méthodes):
createInstance()
isThemeAllowed()
xos_opal_Theme:: (14 méthodes):
xoInit()
generateCacheId()
checkCache()
render()
addScript()
addStylesheet()
addLink()
addHttpMeta()
addMeta()
headContent()
renderMetas()
genElementId()
renderAttributes()
resourcePath()
Classe: xos_opal_ThemeFactory - X-Ref
xos_opal_ThemeFactorycreateInstance( $options = array() X-Ref |
Instanciate the specified theme |
isThemeAllowed( $name ) X-Ref |
Checks if the specified theme is enabled or not param: string $name return: bool |
Classe: xos_opal_Theme - X-Ref
xoInit( $options = array() X-Ref |
Initializes this theme Upon initialization, the theme creates its template engine and instanciates the plug-ins from the specified {@link $plugins} list. If the theme is a 2.0 theme, that does not display redirection messages, the HTTP redirections system is disabled to ensure users will see the redirection screen. param: array $options return: bool |
generateCacheId($cache_id, $extraString = '') X-Ref |
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 param: string $cache_id raw cache id param: string $extraString extra string return: string complete cache id |
checkCache() X-Ref |
Pas de description |
render( $canvasTpl = null, $pageTpl = null, $contentTpl = null, $vars = array() X-Ref |
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). param: string $canvasTpl The canvas template, if different from the theme default param: string $pageTpl The page template, if different from the theme default (unsupported, 2.3+ only) param: string $contentTpl The content template param: array $vars Template variables to send to the template engine |
addScript( $src = '', $attributes = array() X-Ref |
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 <script> tag. If unspecified, the <var>type</var> attribute value will default to 'text/javascript'. <code> // Add an external script using a physical path $theme->addScript( 'www/script.js', null, '' ); $theme->addScript( 'modules/newbb/script.js', null, '' ); // Specify attributes for the <script> tag $theme->addScript( 'mod_xoops_SiteManager#common.js', array( 'type' => 'application/x-javascript' ), '' ); // Insert a code snippet $theme->addScript( null, array( 'type' => 'application/x-javascript' ), 'window.open("Hello world");' ); </code> param: string $src path to an external script file param: array $attributes hash of attributes to add to the <script> tag param: string $content Code snippet to output within the <script> tag return: void |
addStylesheet( $src = '', $attributes = array() X-Ref |
Add StyleSheet or CSS code to the document head param: string $src path to .css file param: array $attributes name => value paired array of attributes such as title param: string $content CSS code to output between the <style> tags (in case $src is empty) return: void |
addLink( $rel, $href = '', $attributes = array() X-Ref |
Add a <link> to the header param: string $rel Relationship from the current doc to the anchored one param: string $href URI of the anchored document param: array $attributes Additional attributes to add to the <link> element |
addHttpMeta( $name, $value = null ) X-Ref |
Set a meta http-equiv value |
addMeta( $type = 'meta', $name = '', $value = '' ) X-Ref |
Change output page meta-information |
headContent( $params, $content, &$smarty, &$repeat ) X-Ref |
Pas de description |
renderMetas( $type = null, $return = false ) X-Ref |
Pas de description |
genElementId( $tagName = 'xos' ) X-Ref |
Generates a unique element ID param: string $tagName return: string |
renderAttributes( $coll ) X-Ref |
Transform an attributes collection to an XML string param: array $coll return: string |
resourcePath( $path ) X-Ref |
Return a themable file resource path param: string $path return: string |
Généré le : Sun Nov 25 11:44:32 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |