View Issue Details

IDProjectCategoryView StatusLast Update
0018447phpList 3 applicationTheme - Trevelinpublic03-01-17 22:40
Reporterduncanc Assigned To 
Status resolvedResolutionfixed 
Product Version3.2.6 
Fixed in Version3.3.0 
Summary0018447: Theme naming problem
DescriptionWhen using the bootstrap theme in phplist by setting the $ui variable, that has to be called phplist-ui-bootstrap, the name of the git repository.

This is caused by the file pagetop.php, and possibly others, having a reference

<link rel="stylesheet" href="ui/phplist-ui-bootstrap/css/style.css?v=<?php echo filemtime(dirname(__FILE__).'/css/style.css'); ?>" />
TagsNo tags attached.



16-12-16 11:37

manager   ~0058542

Can these references be made relative? Would that impact child themes (e.g. boostrap-ph)?


16-12-16 14:07


It was relative, but i changed answering Michiel request.


16-12-16 14:09


Also, the ph theme has php includes from public theme, and use LESS files from public theme, those references need to be hardcoded.


16-12-16 14:21


Maybe we can use relative for bootstrap and hardcode for bootstrap-ph, if Michiel agree.


17-12-16 17:27

administrator   ~0058557

We should split between the Name of a theme and the underlying folder structure. We can also not name the theme "bootstrap" because that's a reserved name. Boostrap is framework, but not a theme name.

We should be more creative with Theme names, eg

I propose to give it a real name, eg "Chubut" or something. We can then have a little "meta file" like in the languages, that handles the underlying structure, eg


And I will make a theme changer to allow swapping themes.


18-12-16 23:37


Chubut! Yes! Trevelin is in Chubut!


20-12-16 22:35


Reminder sent to: samtuke

Sam, do you want to assign this to me so i can change phplist-ui-bootstrap to "phplist-ui-bootlist" as we talk on last team meeting, or I should wait?


21-12-16 09:59

manager   ~0058567

Please work on this issue Marie. Thanks for the reminder.


22-12-16 01:21


I created a theme_info file with 2 vars:
I added a function in functions.php named theme_info to manage this and create relative paths to the ui/dir
I changed paths in footers, headers and pagetops to use this theme_info function.
So with this change you can change the theme directory and declare that name as dir in this theme_info file. And that should work.
I commited to my fork and made a PR, when you accept this change you should cnage the repository name to phplist-ui-bootlist, and the theme directory name in dev sites.

I did all the necessary changes to handle this in Bootlist-ph.
But as it is a child theme, i need to use hard path in many places.
Same as in Bootlist, i commited to my fork and make the MR, when you accept this you should change repository name to phplist-ui-bootlist-ph and dev site theme directory.


03-01-17 22:37

administrator   ~0058584

I've added a theme switcher and this can be seen on the DEV site

It uses the "theme_info" file and expects "name" and "dir" for variables for now.


03-01-17 22:40

administrator   ~0058585

Reminder sent to: samtuke

I will document how this works. Remind me about it, if I didn't do that in the next few days, which will be best, when it's still fresh.


1. you can use the theme switcher in the templates
2. if there's one theme only, it will not show.
3. you can force a theme, with "?settheme=XXX" on the URL
4. If the theme is incorrect or not found, it will default back to the theme set in the config file (GLOBALS['ui'])
5. for a theme to show up, there needs to be a "theme_info" file