Announcement

  •  » Themes
  •  » migrate your themes to Piwigo 2.1

#1 2010-04-03 22:34:39

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

migrate your themes to Piwigo 2.1

Hi all,

This is not yet a comprehensive list of actions to migrate your 2.0 themes to 2.1 new architecture. As I realized in [Forum, post 112750 by plg in topic 15831] Not repeat the slideshow ?, the language keys conversion is the biggest part of the work if you have some *.tpl files in your theme.

This is the case for Simple Grey, Gally, flopPure, flopOS.

If you want to send me a zip file with your *.tpl inside, then I will perform an automatic conversion from 2.0 language keys to 2.1 language keys. I already did it for gally (and I expect some feedback from grum about this ;-) Give me an URL to your zip file or send it by email.

Offline

 

#2 2010-04-03 23:21:38

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

Re: migrate your themes to Piwigo 2.1

nicolas advised me to commit my script if you want to perform the conversion by yourself. So here it is : tools/convert_template_to_2.1.pl (in trunk of course).

Backup your *.tpl directory first.

Code:

cd trunk
cp -r themes/gallyDefault/template
cp -r themes/gallyDefault/template.orig
perl tools/convert_template_to_2.1.pl themes/gallyDefault/template
diff -ru themes/gallyDefault/template.orig themes/gallyDefault/template

On the gally *.tpl, I saw that *.tpl files related to NBM (notification by email) were not corectly converted I think. I advised grum to remove them from gally, if they should be the same as in the new "default" theme.

Offline

 

#3 2010-04-04 16:19:08

grum
Former Piwigo Team
Pantin
2007-09-10
1371

Re: migrate your themes to Piwigo 2.1

I finished to check my tpl files (other than NBM, not the time for now to checks them)

Only two kind of keys have been forgotten :
'return to homepage' => 'Home'
{$pwg->l10n_dec('%d element', '%d elements',  => {$pwg->l10n_dec('%d image', '%d images',


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

Offline

 

#4 2010-04-04 19:01:59

nicolas
Former Piwigo Team
2004-12-30
1232

Re: migrate your themes to Piwigo 2.1

grum wrote:

I finished to check my tpl files (other than NBM, not the time for now to checks them)

Only two kind of keys have been forgotten :
'return to homepage' => 'Home'
{$pwg->l10n_dec('%d element', '%d elements',  => {$pwg->l10n_dec('%d image', '%d images',

It's difficult to find that key in a  template. I think we must find an another syntax for plurals form and avoid using that php syntax.

Offline

 

#5 2010-04-04 19:43:29

saimon
Member
2006-12-04
184

Re: migrate your themes to Piwigo 2.1

plg wrote:

If you want to send me a zip file with your *.tpl inside, then I will perform an automatic conversion from 2.0 language keys to 2.1 language keys. I already did it for gally (and I expect some feedback from grum about this ;-) Give me an URL to your zip file or send it by email.

Hi,
I will try your script, thanks plg, but if you want to look at it, the code is here : http://bitbucket.org/saimon/simple-piwigo/
get the code : $ hg clone http://bitbucket.org/saimon/simple-piwigo/
make a "bundle" you can send me with the modifications: $ hg -t tgz bundle

Offline

 

#6 2010-04-05 22:16:38

grum
Former Piwigo Team
Pantin
2007-09-10
1371

Re: migrate your themes to Piwigo 2.1

another thing :

in picture.tpl, the key '%.2f (rated %d times, standard deviation = %.2f)' is replaced by '%.2f (rated %d times)'

for theme creators, be carefull : you have to update the javascript too, the standard deviation is not available anymore.
replace the string {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count, $rate_summary.std) } by the string {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count) }


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

Offline

 

#7 2010-04-05 22:30:10

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

Re: migrate your themes to Piwigo 2.1

grum wrote:

in picture.tpl, the key '%.2f (rated %d times, standard deviation = %.2f)' is replaced by '%.2f (rated %d times)'

details on [Subversion] r5500

Offline

 

#8 2010-04-05 22:51:43

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

Re: migrate your themes to Piwigo 2.1

saimon wrote:

make a "bundle" you can send me with the modifications: $ hg -t tgz bundle

Sorry, I couldn't make the "bundle" action work. Here comes a simple "tar.gz": http://piwigo.org/tmp/simple-piwigo.tar.gz

Offline

 

#9 2010-04-06 13:33:30

saimon
Member
2006-12-04
184

Re: migrate your themes to Piwigo 2.1

thanks plg :-)

Offline

 

#10 2010-05-18 09:01:18

Sugar888
Translation Team
Zurich
2009-11-29
54

Re: migrate your themes to Piwigo 2.1

Hi Guys

I'm currently using a modified version of the theme yoga/sylvia. I’ve changed the colour of the icons and changed the png for the top left picture. Do I have to change something before I upgrade from 2.0.10 to 2.1.0?

Offline

 

#11 2010-05-18 19:48:32

Darryl
Member
2010-04-27
58

Re: migrate your themes to Piwigo 2.1

Yes, make sure you back them up. I also modified my .png file for top-left and it was over-written when I upgraded.

You should be able to back them up and simply replace them again when the upgrade is complete.

Offline

 

#12 2010-05-18 23:12:39

Sugar888
Translation Team
Zurich
2009-11-29
54

Re: migrate your themes to Piwigo 2.1

Thanks Darryl.

It seems to work, although there are some infos that I don't know what to change. The one thing that I had to look for was the favicon, because I didn't realised that it should be in the same folder than the Icons. ^^

At the moment I can use the theme without any problems so I think, I let this like it is :D

Offline

 
  •  » Themes
  •  » migrate your themes to Piwigo 2.1

Board footer

Powered by FluxBB

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