create a new theme.html file with the following<{php}>
$mod = $GLOBALS['xoopsModule'];
$dirname = (isset($mod) ? $mod->getVar('dirname') :'system');
if ($dirname == 'newbb') {
$theme='dream_on';
} elseif ($dirname == 'news') {
$theme='sunshine';
}elseif ($dirname == 'mylinks') {
$theme='imago06';
} else {
$theme='7dana-rose';
}
$this->assign('themename', $theme.'/theme.html');
$this->assign('xoops_theme', $theme);
$this->assign('xoops_themecss', XOOPS_URL.'/themes/'.$theme.'/style.css');
$this->assign('xoops_imageurl', XOOPS_URL.'/themes/'.$theme.'/');
<{/php}>
<{include file="$themename"}>
Create a New Theme
We created a new theme call Multi (you can name it to whatever you wish) under the theme directory - use either a FTP client or mkdir shell command.
We uploaded the newly created theme.html file into Multi theme directory. Also we uploaded the style.css file from ThemeA to the Multi directory.
Please note that style.css is not required to make your multiple themes work. Without it, all the java popup windows will not look very nice, as they can’t find a suitable style.css file under Multi theme. Javascript popup windows will only look for the style.css file under the default theme (Multi), and not under individual themes.
Enable Multiple Themes
We then went to Preferences and General Settings: selected Yes for updating theme files and selected Multi as the default theme.
Viola, we have a multi-theme site. If you have followed the steps and have not made typos and other mistakes, now you should have a multi-themed Xoops Site.
<{if $xoops_dirname == "publisher"}>
<meta property="og:type" content="website" />
<meta property="og:title" content="<{$item.title}>" />
<meta property="og:description" content="<{$item.summary}>" />
<link rel="image_src" href="<{$item.image_path}>" />
<meta property="og:image" content="<{$item.image_path}>"/>
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="628" />
<meta property="og:url" content="<{$item.itemurl}>"/>
<meta itemprop="image" content="<{$item.image_path}>"/>
<link rel="canonical" href="<{$item.itemurl}>"/>
<{/if}>
Mamba wrote:
You can try and test these two versions:
Version 1: the original version, updated for XOOPS 2.5.9 and PHP 7.2, but the the calendar button doesn't work, i.e. you have to enter the date manually
Version 2: Quick & dirty rewrite of the Version 1, incl. a Vue countdown component.
Please note: I don't have time to do anything more with these modules, but it will be a good start for you to improve it further. Or somebody else could help you. Just fork it on GitHub
RewriteRule ^publisher.([a-z]+).([0-9.]+)/ modules/publisher/index.php?seoOp=$1&seoArg=$2
RewriteRule ^publisher/?$ /modules/publisher/index.php
RewriteRule ^DRAAITIJD/?$ /publisher.item.24/DRAAITIJD.html