Announcement

  •  » Engine
  •  » Template modeling

#16 2010-03-10 22:32:35

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

Re: Template modeling

There is a problem on Controller popup page. (MultiView)

Warning: opendir(../../template/default/theme) [function.opendir]: failed to open dir: No such file or directory in C:\wamp\www\Piwigo.org\trunk\include\functions.inc.php on line 138

= There is no theme currently within default !

;-)


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

Offline

 

#17 2010-03-10 22:42:54

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

Re: Template modeling

VDigital wrote:

= There is no theme currently within default !

Well, yes I also encounter issues. Can you fix this?

Offline

 

#18 2010-03-10 22:48:02

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

Re: Template modeling

May I say moving default to template-common? ;-D
Seriously? I will analyse the best way to fix it.


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

Offline

 

#19 2010-03-10 23:23:34

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

Re: Template modeling


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

Offline

 

#20 2010-03-10 23:26:31

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

Re: Template modeling

Thank you VDigital :-)

Offline

 

#21 2010-03-10 23:54:32

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

Re: Template modeling

VDigital wrote:

On gallery side, the default template_dir is now an array.

If the template file exist as today in the template directory, no behaviour change.
But if the template file is missing...

The code checks in $themeconf['modeling'] the template model to use.

Case 1 - A new template called "newbe" as no .tpl files but in themeconf.inc.php
you have:
$themeconf['modeling'] = 'yoga';

=> all .tpl files (header.tpl, index.tpl, etc.) could be found in the yoga template.

Case 2 - A new template called "oldbe" as no .tpl files but in themeconf.inc.php
you DO NOT have:
$themeconf['modeling'] = 'yoga';

=> all .tpl files (header.tpl, index.tpl, etc.) could be found in the template-common/yoga/ directory.


Case 3 - A new template called "Advanced" as some .tpl files but in themeconf.inc.php
you have:
$themeconf['modeling'] = 'yoga';

=> .tpl files (header.tpl, index.tpl, etc.) could be found in the template/Advanced directory.
if not found (missing files)
=> .tpl files (header.tpl, index.tpl, etc.) could be found in the template/yoga directory.
if not
=> .tpl files (header.tpl, index.tpl, etc.) could be used if they are in the template-common/yoga/ directory.


New feature in trunk: [Subversion] r5071

In above text, template-common/yoga/ directory must be understood as template/default/ 
but the logic is similar.


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

Offline

 

#22 2010-03-10 23:57:49

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

Re: Template modeling

$themeconf['modeling'] = false;

=> All *.tpl files are only searched in the related template directory (so they must be provided).


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

Offline

 

#23 2010-03-11 00:09:10

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

Re: Template modeling

VDigital wrote:

$themeconf['modeling'] = false;

=> All *.tpl files are only searched in the related template directory (so they must be provided).

What if a theme is distributed with $themeconf['modeling'] = true; and you don't want the check of menubar.tpl in 2 directories?

Offline

 

#24 2010-03-11 00:26:43

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

Re: Template modeling

Case 4 - A new template called "Mine" as some .tpl (including menubar.tpl) files but in themeconf.inc.php
you have:
$themeconf['modeling'] = true;


Search will be
in the template/Mine/ directory.
if not found (missing files)
in the template/default directory.

So for menubar only one directory (template/Mine) will be searched
and maybe for profile.tpl it will be search in the first directory but if the file is missing it would be found in template/default.
This is the reason I recommend to have frequently used files in the template directory as today.


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

Offline

 
  •  » Engine
  •  » Template modeling

Board footer

Powered by FluxBB

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