Announcement

  •  » Extensions
  •  » Piwigo 2.5 how to generate template code with add_picture_button

#1 2013-03-23 07:15:19

icy
Translation Team
Vietnam
2011-06-30
105

Piwigo 2.5 how to generate template code with add_picture_button

In Piwigo 2.5, the template for the default themes doesn't support $U_ADMIN. I guess this variable is replaced by the following functions

Code:

$template->add_picture_button($content, $rank);
$template->add_index_button($content, $rank);

It's easy to use these functions, but the question is how to generate the template code by using them? For example, in the previous use of U_ADMIN I can easily support international language but in Piwigo 2.5 I can only support English. See for example

[Github] icy_picture_modify file main.inc.php@L96

Any idea?

Last edited by icy (2013-03-23 07:15:49)

Offline

 

#2 2013-03-23 10:34:59

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Piwigo 2.5 how to generate template code with add_picture_button

look at
http://piwigo.org/svn/extensions/skelet … ts.inc.php
function skeleton_add_button()



you can also use l10n('') function, with is the same as the {''|@translate} Smarty tag

Offline

 

#3 2013-03-23 14:36:21

icy
Translation Team
Vietnam
2011-06-30
105

Re: Piwigo 2.5 how to generate template code with add_picture_button

mistic100 wrote:

look at
http://piwigo.org/svn/extensions/skelet … ts.inc.php
function skeleton_add_button()



you can also use l10n('') function, with is the same as the {''|@translate} Smarty tag

Thank you very much that's exactly that I am looking for.

Offline

 
  •  » Extensions
  •  » Piwigo 2.5 how to generate template code with add_picture_button

Board footer

Powered by FluxBB

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