Announcement

  •  » Engine
  •  » Browser side - javascript/css optimizations

#16 2011-03-08 16:00:24

P@t
Piwigo Team
Nice
2007-06-13
4098

Re: Browser side - javascript/css optimizations

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)


P@t

Offline

 

#17 2011-03-08 17:24:42

rvelices
Former Piwigo Team
2005-12-29
1960

Re: Browser side - javascript/css optimizations

ok

Offline

 

#18 2011-03-09 00:09:32

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

Re: Browser side - javascript/css optimizations

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

 

#19 2011-03-09 21:09:23

LucMorizur
Member
Vienne (Isère) - France
2009-04-30
171

Re: Browser side - javascript/css optimizations

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 !


Our gallery : Le Site à Nous (a silly name in french, but here I don't care ;-) ! )
An event, a new gallery ? Plugin Event Cats
My test gallery : Tests Piwigo de Luc
Thanksalot for this beautiful project.

Offline

 
  •  » Engine
  •  » Browser side - javascript/css optimizations

Board footer

Powered by FluxBB

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