PHP Classes

File: htdocs/themes/xswatch4/theme_autorun.php

Recommend this page to a friend!
  Packages of Michael Beck   Xoops 2.5   htdocs/themes/xswatch4/theme_autorun.php   Download  
File: htdocs/themes/xswatch4/theme_autorun.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Xoops 2.5
Modular content management publication system
Author: By
Last change:
Date: 2 months ago
Size: 897 bytes
 

Contents

Class file image Download
<?php
xoops_load
('XoopsFormRendererBootstrap4');
XoopsFormRenderer::getInstance()->set(new XoopsFormRendererBootstrap4());

/** @var XoopsTpl */
global $xoopsTpl;
if(!empty(
$xoopsTpl)) {
   
$xoopsTpl->addConfigDir(__DIR__);
}

/* Check if tinyMce 5 is selected in system configuration */
$editor = xoops_getModuleOption('blocks_editor', 'system');
if (
$editor != 'tinymce5') {
   
$editor = xoops_getModuleOption('comments_editor', 'system');
    if (
$editor != 'tinymce5') {
       
$editor = xoops_getModuleOption('general_editor', 'system');
    }
}
if (
$editor == 'tinymce5' && isset($GLOBALS['xoTheme'])) {
   
$GLOBALS['xoTheme']->addStylesheet( XOOPS_URL . '/class/xoopseditor/tinymce5/tinymce5/jscripts/tiny_mce/plugins/xoopscode/css/prism.css' );
   
$GLOBALS['xoTheme']->addScript( XOOPS_URL . '/class/xoopseditor/tinymce5/tinymce5/jscripts/tiny_mce/plugins/xoopscode/js/prism.js' );
}