View Issue Details

IDProjectCategoryView StatusLast Update
0023771mantisbtuipublic2018-01-03 20:03
ReporterStarbuckAssigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status newResolutionopen 
Product Version2.8.1 
Target VersionFixed in Version 
Summary0023771: Allow for theme other than default "ace"
Description

In code/layout_api.php, function layout_head_c, the CSS is hard-coded to the "ace" theme. Complete customisation of that requires a new plugin hooking to EVENT_LAYOUT_RESOURCES that simply adds another overriding stylesheet after that.
See example of what one user had to go through.
This suggestion hopes to lead to an alternative default CSS that's easy for user's to implement.
A code suggestion for solving this is in Additional Information. Please approve, revise, or propose an alternate solution.

Additional Information

This is "pseudo code", not plug-n-play. I did not actually try it yet.
I suggest a mod to code/layout_api.php, function layout_head_c as follows:

  1. Allow for a global configuration setting for the CSS.
  2. As a backup, allow a hook for an alternative theme, which some plugin might make user-specific.
# theme styles
$default_theme = config_get_global( 'default_theme' );
$override_theme = event_signal( 'EVENT_LAYOUT_CSS' );
if('' != $override_theme) { 
  $default_theme = $override_theme;
}
if('' == $default_theme) { 
  $default_theme = 'ace';
}
html_css_link( $this_theme . '.min.css' );
html_css_link( $this_theme . '-mantis.css' );
html_css_link( $this_theme . '-skins.min.css' );

Now an admin can add $g_default_theme = 'mytheme'; to the config, and/or a plugin can return a theme override.

If that looks like it should work and this is a valid request, I'll try the code and submit a PR.

TagsNo tags attached.

Activities

syncguru

syncguru

2018-01-03 20:03

developer   ~0058470

I don't know about replacing the theme. I find it hard to image building a new theme that reuses all of Ace class names ... etc that is part of MantisBT markup. What seems doable though is skinning the theme. So a designer or developer would generate a duplicate the skins.css file and make their changes then configure ManitsBT to use their skin file instead of the default one.

Issue History

Date Modified Username Field Change
2018-01-03 13:34 Starbuck New Issue
2018-01-03 20:03 syncguru Note Added: 0058470