Hi,
I've created small but maybe usefull plugin for changing interface themes.
Plagin and more info is available on: [extension by mistic100] Theme switch This topic is created just to support potential users of this plugin.
Pavel
Offline
The first new plugin for Piwigo... Thxs.
Offline
Thanks a lot pab, we will use is on the demo website, for sure :-)
Currently, it only works with themes in the same template, but we can also have other templates (like gally). Can you add the template support?
As in "Language Switch", you display a list of links (and by default, there are no icons), as I hope there will be many more template/theme available in the future, can you change this link list into a select box (like the "Sort order" select box, with a onchange="document.location = this.options[this.selectedIndex].value;") ?
Offline
great !
I guess this plugin will quickly become a must :)
Offline
z0rglub wrote:
Thanks a lot pab, we will use is on the demo website, for sure :-)
Currently, it only works with themes in the same template, but we can also have other templates (like gally). Can you add the template support?
As in "Language Switch", you display a list of links (and by default, there are no icons), as I hope there will be many more template/theme available in the future, can you change this link list into a select box (like the "Sort order" select box, with a onchange="document.location = this.options[this.selectedIndex].value;") ?
Language Switch is using flags because generally your gallery can be in 2/3 languages.
I have no idea about how many theme from PhpWebGallery 1.7 that can work for Piwigo but many.
I hope to get more templates like gally and many themes each.
So I agree the select box is the better solution.
( More people won't know the meaning of these icons and won't use them. A "skin" select will become evidence for anybody. )
Offline
Hi,
it is written that is isn't restricted to one template (bu I must admit, I tested it just on one template). But you have to provide icons for all templates/themes you want to let users switch to.
Select box will be improovement. I'll prepare this in a new version of the plugin. Select box will show all available themes. Current version shows only those for which you provide icons.
Pavel
Offline
pab wrote:
Select box will be improovement. I'll prepare this in a new version of the plugin. Select box will show all available themes. Current version shows only those for which you provide icons.
Of course I've installed the plugin to test on my local development gallery, and even if I don't provide any icon, links are displayed with the alternate text.
Offline
That's strange. What version of piwigo do you use? There is an if condition based on file_exist() PHP function. If icon doesn't exist then link isn't added.
Offline
pab wrote:
Hi,
it is written that is isn't restricted to one template (bu I must admit, I tested it just on one template). But you have to provide icons for all templates/themes you want to let users switch to.
Select box will be improovement. I'll prepare this in a new version of the plugin. Select box will show all available themes. Current version shows only those for which you provide icons.
Pavel
New version of plugin is released. Now you can choose if you provide icons or use select box which will allow to switch to all available themes.
Offline
I think i will use the select box so that i can see the other themes.I want to have the idea how can i does my own.
Offline
cassandra_31 wrote:
I think i will use the select box so that i can see the other themes.I want to have the idea how can i does my own.
You wish to change it, begin by duplicating one of the directories of the proposed theme. For example ,clear/ ou /dark/.
Let us suppose that you wish a theme rather green and let us call this new theme " greenery ".
We shall thus have a new sub-directory / template / yoga / theme / greenery/.
With 3 files:
1. index.php ( ← Re-steer the small curious: )
2. theme.css ( ← The specific indications in this new theme )
3. themeconf.inc.php ( ← Redirections indispensable to this theme )
Let us begin by modifying themeconf.inc.php:
<?php
$themeconf = array(
'template' => 'yoga',
'theme' => 'greenery',
'icon_dir' => 'template/yoga/icon',
'admin_icon_dir' => 'template/yoga/icon/admin',
'mime_icon_dir' => 'template/yoga/icon/mimetypes/',
'local_head' => '<!-- no theme specific head content -->'
);
?>
Then to modify theme.css:
All the art to know how to marry the nuances and the colours lives in this file to you to know how to adapt it. An extract:
Offline
hi
I have drop in my Piwi your plugin, whitch is side on the right of "language switch". By the way, I founded that there was too much littke pictures on this line, so I've been doing this :
//add_event_handler('loc_end_index', 'theme_icons' );
But perhaps there is a more elegant way to resolved ? What do you think about it ? Can you offer to the finel user the possibility to put on or not the icon's ?
And thank's for the job you've done :)
Thank you Makno, I will use your fix for the Piwigo demonstration, because I also think that the icon list is "too much" (imagine what it will look like when 46 themes will be available :-)
Offline
here are my personnal icons for yoga/montblancXL and yoga/blancmontXL
(the second theme will be avaible soon)
hope it can be usefull ;)
edit: forum attached files bug ...
Last edited by repie38 (2009-04-04 18:28:55)
Offline
Hi ;
I used Theme Switch plugin with only yoga/dark and yoga/clear themes until these last days, it was working nice -- great :-) ! Then I decided to add theme floPure/autumn to my gallery.
So currently in the select box are 3 lines : the first is yoga/dark, the second yoga/clear, and the third floPure/autumn.
I have now the following strange behaviour : when yoga/dark or yoga/clear are the current theme, it is the matching line which is selected in the select box. I mean, if yoga/dark is the current theme, the first line is displayed in the select box. If yoga/clear is the current theme, the second line is displayed in the select box. But if floPure/autumn is the current theme, then yoga/dark is displayed in the select box, as if yoga/dark was the current theme ! Thus when I select yoga/dark in the select box, it is like if I was chosing the current theme, so nothing happens -- the current theme remains floPure/autumn. If I select floPure/autumn, the theme changes to... floPure/autumn ! -- and yoga/dark is displayed in the select box "of course". Only by selecting yoga/clear am I able to come back to yoga/dark.
It can be seen on my gallery of course : http://myr.luc.free.fr .
If there was a solution, I'm interested in it :-) !
Luc
Offline