phplist

NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1


View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0018447phplist applicationTheme - bootstrappublic15-12-16 17:2603-01-17 22:40
Reporterduncanc 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version3.2.6 
Target VersionFixed 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.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0058542)
samtuke (administrator)
16-12-16 11:37

Can these references be made relative? Would that impact child themes (e.g. boostrap-ph)?
(0058545)
mariez (developer)
16-12-16 14:07

It was relative, but i changed answering Michiel request.
Ref: https://mantis.phplist.org/view.php?id=18370 [^]
(0058546)
mariez (developer)
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.
(0058547)
mariez (developer)
16-12-16 14:21

Maybe we can use relative for bootstrap and hardcode for bootstrap-ph, if Michiel agree.
(0058557)
michiel (manager)
17-12-16 17:27


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 https://en-gb.wordpress.org/themes/ [^]

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

---
name=Chubut
folder=phplist-ui-bootstrap
---

And I will make a theme changer to allow swapping themes.
(0058561)
mariez (developer)
18-12-16 23:37

Chubut! Yes! Trevelin is in Chubut!
(0058566)
mariez (developer)
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?
(0058567)
samtuke (administrator)
21-12-16 09:59

Please work on this issue Marie. Thanks for the reminder.
(0058570)
mariez (developer)
22-12-16 01:21

I created a theme_info file with 2 vars:
name=Bootlist
dir=phplist-ui-bootlist
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.
https://github.com/phpList/phplist-ui-bootstrap/pull/27 [^]

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.
https://gitlab.com/phpList/phplist-ui-bootstrap-ph/merge_requests/42 [^]
(0058584)
michiel (manager)
03-01-17 22:37

I've added a theme switcher and this can be seen on the DEV site http://dev.phplist.com/lists/admin/? [^]

It uses the "theme_info" file and expects "name" and "dir" for variables for now.
(0058585)
michiel (manager)
03-01-17 22:40

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.

Basically:

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



Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker