•  » Engine
  •  » [evolution] Management of the template/theme

#1 2009-03-11 14:16:31

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7262

[evolution] Management of the template/theme

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 !


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#2 2009-03-11 18:46:56

rub
Former Piwigo Team
Lille
2005-08-26
5019

Re: [evolution] Management of the template/theme

Yes. That can me more easy to manage!
+1

Offline

 

#3 2009-03-11 20:52:30

grum
Former Piwigo Team
Pantin
2007-09-10
1371

Re: [evolution] Management of the template/theme

+1


My pictures with Piwigo, of course !
[ www.grum.fr ]

Offline

 

#4 2009-03-11 23:20:11

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: [evolution] Management of the template/theme

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?


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#5 2009-03-12 06:52:46

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7262

Re: [evolution] Management of the template/theme

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


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#6 2009-03-13 13:46:29

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7262

Re: [evolution] Management of the template/theme

Possibility of creating a subject with part of a model


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#7 2009-03-24 00:42:10

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13877

Re: [evolution] Management of the template/theme

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

 

#8 2009-04-13 19:59:16

repie38
Former Piwigo Team
grenoble (FR)
2006-05-23
418

Re: [evolution] Management of the template/theme

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

 

#9 2009-04-13 20:38:44

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: [evolution] Management of the template/theme

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.

;-)


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#10 2009-04-15 11:59:04

repie38
Former Piwigo Team
grenoble (FR)
2006-05-23
418

Re: [evolution] Management of the template/theme

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

 

#11 2009-04-15 12:51:15

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: [evolution] Management of the template/theme

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?


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#12 2010-02-18 11:33:31

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13877

Re: [evolution] Management of the template/theme

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

 

#13 2010-02-19 01:38:42

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13877

Re: [evolution] Management of the template/theme

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

 

#14 2010-02-23 12:11:39

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13877

Re: [evolution] Management of the template/theme

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)

Code:

template
  |_ yoga
  |_ template2
  |_ template3
  |_ themes
      |_ sylvia
      |_ clear
      |_ ...

In the themeconf.inc.php file (or another one) we should add data to identify the them

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
*/

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

Code:

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

 

#15 2010-02-23 13:07:57

nicolas
Former Piwigo Team
2004-12-30
1232

Re: [evolution] Management of the template/theme

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

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

We don't have to care of space and tabs, they will be trim !
We can also make sections :

Code:

[Theme]
Name =
Version =
Template =
Description =
URI = http://piwigo.org/ext/extension_view.php?eid=1234

[Author]
Name = Piwigo team
URI = http://piwigo.org

Offline

 
  •  » Engine
  •  » [evolution] Management of the template/theme

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact