It seems to me that as for the plugins we should make a page of administration of template/themes
That would make it possible to the user to activate/deactivate template.
In the template the user could activate/deactivate themes.
For team to choose the themes delivered activated.
Especially to set up the connection with PEM for the addition of template/themes without using the FTP
Let's start the discussion !
Offline
Yes. That can me more easy to manage!
+1
Offline
+1
Offline
Yes. I agree... Only activated themes will be available.
Exception: Webmaster can select any theme.
Pending questions:
What will happen to user profile with a recent deactivated theme? They switch to default theme?
What will happen to the default profile with a recent deactivated theme? It will switch to next available theme?
At least one theme must be activated, don't you think so?
Offline
VDigital wrote:
At least one theme must be activated, don't you think so?
yes
VDigital wrote:
Pending questions:
What will happen to user profile with a recent deactivated theme? They switch to default theme?
What will happen to the default profile with a recent deactivated theme? It will switch to next available theme?
Define a theme by défault.
Every user who isn't on dispo theme seesaw on the theme by défault.
Possibility of reimposing a theme to all the users
Offline
Possibility of creating a subject with part of a model
Offline
This topic comes in the right place at the right time :-) In my opinion, the theme selector needs a serious refresh and we also need to make Piwigo communicate with the Piwigo community through http://piwigo.org/ext
The ability to activate/deactivate installed themes is nice.
1. Theme Selector
We still have an old listbox with all installed themes. I'm sure we can do much much better now. For example, I've taken screenshots of Gmail theme selector and WordPress theme manager. Each theme is represented as a thumbnail and either clicking on the thumbnail changes the current theme (Gmail behavior) or clicking on the thumbnail show a lightbox-like popup preview.
This feature can be used on admin side an on public side if the admin has allowed users to choose another theme.
2. Theme Manager, install from Extensions
Plugins have the "Plugin Manager", with the ability to connect to piwigo.org/ext and see live updates of the most useful plugins. Themes deserve just the same! As themes are more graphical than plugins, a more graphical presentation of available themes would suit best to themes.
Personnaly, I think that a WordPress-like Theme manager + ability to install new theme from piwigo.org/ext would be nice!
Offline
I'll add :
3. Theme customisation
In the same way as some wordpress theme who come with an admin panel, and since we got php avaible for theme (themeconf.inc.php),
I think it would be great to let theme/template creator make an admin panel for customization (optionnal of course).
---------
+1 for the screenshot list. I propose to have an icon for each theme too, thinking to theme switcher plugin
Offline
Repie38,
I don't know if you are aware of Swift Theme Creator.
It is ongoing project, I will come back later on that plugin.
;-)
Offline
yes, i know this plugin, i saw it during rc tests.
but it's a plugin, and I think it would be really much more simple to allow theme to have their own config page.
(for example, to have a new item in admin menu, with the list of theme witch are customizable,
and each customizable theme have it's own php file for an admin panel).
you see where I want to go ? theme and its configuration on one side, plugin on another ;)
Offline
Yep!
[STC: Swift Theme Creator will just change colors, [maybe some graphs] but not the code.]
How do you imagine interactions between STC and a theme manager?
Offline
I'm working on the Theme Manager.
First step : browse and install themes from piwigo.org/ext
I want to make a "visual" browsing.
First issues:
* 1 style extension != 1 theme
* 1 style extension may depend on another (that's also true for plugins, and that's not managed at all)
I won't try to make it perfect on the first copy.
Once the first step achieved, I will work on actions like activation/deactivation/select as default/uninstall.
Offline
First results
On my local copy, I have made some ugly changes in the plugins management class to handle themes and templates.
1) add a parameter to the get_server_plugins method to list plugins OR styles (it's just a numeric id in the URL for HTTP on PEM)
2) a false admin page [Configuration > Themes] that is in fact plugins_new with a $page['ext_type'] == "style" instead of "plugin".
3) heavy modification on extract_plugin_files to handle templates and themes. This is the main point.
The algorithm is the following:
* if the ext_type equals "plugin", then we look for main.inc.php
* if the ext_type equals "style", it can be either a template (with at least 1 mandatory theme) or pack of themes (at least 1 theme)
A template is a directory with a sub-directory "theme"... couldn't find anything better :-/
A theme is a directory with a file themeconf.inc.php inside
The themeconf.inc.php is parsed, but not executed (to avoid security issues, I wonder if it's really that important as we're going to execute later). I look for "*template*foo*" and "*theme*bar*".
The template is extracted in ./template/foo
A theme is extracted in ./template/foo/theme/bar
My heavy modification of extract_plugin_files is not a good idea. A cleaner way would be to have an extensions.class.php and 2 children : themes.class.php + plugins.class.php.
Anyway, this ugly hack already greatly improves themes installation :-)
Discussion with flop25
We've had a discussion on Jabber with flop25 mainly about how to manage dependencies and so on. I haven't solved the issue yet of course. Piwigo doesn't know which revision of each template or theme is installed. We have also talked about packaging of themes and templates in piwigo.org/ext, with the conclusions:
1) 1 style extension = 1 theme (take Simple/White as an example)
2) 1 style extension may be packaged with its template (Simple/Grey)
3) 1 extension may require another extension (Simple/White requires Simple/Grey)
4) 1 revision may require a specific revision (Simple/White 1.3a requires Simple/Grey 1.3)
Dependencies are managed at piwigo.org/ext level, not inside the zip archive.
Offline
I've had a private discussion with ddtddt related to this topic. Here comes his email (this was written by ddtddt, not me):
1) Prerequisites
Users don't need to know about templates. They are just interested in themes.
2) piwigo.org/ext the place where we share Piwigo extensions
On piwigo.org/ext, we should separate "themes" and "templates"
3) Architecture inside Piwigo
Inside Piwigo, we should move the "theme" directory into "template" (a theme may work on several templates)
template |_ yoga |_ template2 |_ template3 |_ themes |_ sylvia |_ clear |_ ...
In the themeconf.inc.php file (or another one) we should add data to identify the them
/* Themes Name: Version: Template: Description: Themes URI: http://piwigo.org/ext/extension_view.php?eid=1234 Author: Piwigo team Author URI: http://piwigo.org */
4) Piwigo administration panel
Several tabs.
Tab 1 : Installed Themes
When displaying this page, Piwigo detects installed themes and checks if it requires a template to be installed. If a template is missing, Piwigo offers to install it.
Update in table #themes
id -> varchar(64) -> "Themes Name" field in themeconf.inc.php state -> enum('inactive','active') -> inactive by default version -> varchar(64) -> "Version" field in themeconf.inc.php template -> varchar(64) -> "Template" field in themeconf.inc.php
If the "Template" field in themeconf.inc.php equals something like "template1,template2", then we create 2 lines in the #themes table.
Possible actions:
* activate => the theme becomes selectable in the "customize" screen for users and in the configuration default display settings.
* deactivate => the theme is removed from the "customize" screen for users ... + all users using this theme now uses the default theme
* delete => the theme is removed from the "template/theme" directory. If no other theme uses the corresponding template, then Piwigo offers to also delete the template.
Display or the theme list
Themes are sorted by template (on the template name, tooltip with the template description given on piwigo.org/ext)
Yoga
Nom Actions Version Screenshot
Nom Actions Version Screenshot
Nom Actions Version Screenshot
Template2
Nom Actions Version Screenshot
Nom Actions Version Screenshot
Tab 2 : check for updates
The same as the corresponding tab in plugins management. Useless to display up to date themes.
Tab3 : Other Available Themes
Same interface as corresponding tab in plugins management + screenshots from piwigo.org/ext
Tab4 : Settings
Ability to force a theme to all users
Ability to force a theme to a set of users (based on a group, or a privacy level, or a status)
Ability to have a default theme different from the guest theme (to persist in the #config table and not in the #user_infos table.
Offline
plg wrote:
Code:
/* Themes Name: Version: Template: Description: Themes URI: http://piwigo.org/ext/extension_view.php?eid=1234 Author: Piwigo team Author URI: http://piwigo.org */
Why using that comment syntax difficult to parse and error prone ? I think an ini file will be better and easier to write for contributors, and easier to analyze for us.
I propose
Themes Name = Version = Template = Description = Themes URI = http://piwigo.org/ext/extension_view.php?eid=1234 Author = Piwigo team Author URI = http://piwigo.org
We don't have to care of space and tabs, they will be trim !
We can also make sections :
[Theme] Name = Version = Template = Description = URI = http://piwigo.org/ext/extension_view.php?eid=1234 [Author] Name = Piwigo team URI = http://piwigo.org
Offline