There is no issue on inline script because I call add function with load_mode = 1. And if script is already loaded in another tpl, load mode will be changed in add_inline...
function add_inline($code, $require)
{
if(!empty($require))
{
if(!isset($this->registered_scripts[$require]))
$this->load_known_required_script($require, 1) or fatal_error("inline script not found require $require");
$s = $this->registered_scripts[$require];
if($s->load_mode==2)
$s->load_mode=1; // until now the implementation does not allow executing inline script depending on another async script
}
$this->inline_scripts[] = $code;
}
Last edited by P@t (2011-03-08 16:22:42)
Offline
I've started a wiki page to list all technical changes that plugin/theme developers have to know to make their extension compatible with Piwigo 2.2 http://piwigo.org/doc/doku.php?id=en:dev:changes_in_2.2
Is what I wrote concerning combine_script/footer_script correct? (I know the automatic load of dependencies is not commited yet but I think it will be commited)
Offline
plg wrote:
I've started a wiki page to list all technical changes that plugin/theme developers have to know to make their extension compatible with Piwigo 2.2 http://piwigo.org/doc/doku.php?id=en:dev:changes_in_2.2
Nice, clear; and shall be useful !
Offline