Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xswatch4 and smarty 3 #1483

Open
alain01 opened this issue Nov 15, 2024 · 1 comment
Open

xswatch4 and smarty 3 #1483

alain01 opened this issue Nov 15, 2024 · 1 comment

Comments

@alain01
Copy link
Contributor

alain01 commented Nov 15, 2024

Hi,
With smarty 3 and XOOPS 2.5.11, there are some modifications in the xswatch4 theme.

1 - File README.md
With smarty 3, now we used xswatch4.conf
so The README.md file isn't correct:

  • Dual theme light and dark media query responsive operation - Two files control which themes are used, tpl/xswatchCss.tpl and tpl/xswatchDarkCss.tpl. In the file tpl/xswatchCss.tpl, edit the bottom line to match the Bootswatch theme of your choice for use with prefers-color-scheme light media queries. By default, the line reads css-cerulean. In the file tpl/xswatchDarkCss.tpl, edit the bottom line to match the Bootswatch theme of your choice for use with dark media queries. By default, the line reads css-slate. Your site will then follow the use's browser or OS preference to choose light or dark.

  • Single theme operation - Edit tpl/xswatchDarkCss.tpl and delete the line with the file name, and the theme will be locked to whatever theme is specified in the file tpl/xswatchCss.tpl. No consideration of prefers-color-scheme queries will be made. In the file tpl/xswatchCss.tpl, edit the bottom line to match the Bootswatch theme of your choice. By default, the line reads css-cerulean. To change to a dark theme, for example, change it to css-slate. You can pick from any of the 21 variations listed in the comments in tpl/xswatchCss.tpl_

2 - File theme_autorun.php

A member in monxoops.fr find a bug in this file

if ($editor == 'tinymce5') {
    $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' );
}

becomes

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');
}

@mambax7
Copy link
Collaborator

mambax7 commented Nov 16, 2024

Can you submit a pull request?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants