[SPIP Zone] r4839 - /_plugins_/-jQuery/head.php

Author: fil@rezo.net
Date: Thu Aug 24 02:12:14 2006
New Revision: 4839

Log:
insert jquery as first script, but not before the <html> tag (in the private space it was ruining the design)

Modified:
    _plugins_/-jQuery/head.php

Modified: _plugins_/-jQuery/head.php

--- _plugins_/-jQuery/head.php (original)
+++ _plugins_/-jQuery/head.php Thu Aug 24 02:12:14 2006
@@ -7,7 +7,7 @@
     //else
     // $js = '<script src="'.find_in_path('jquery.pack.213.js').'" type="text/javascript"></script>';
     
- return $js.$flux;
+ return preg_replace('/<script /', $js.'<script ', $flux, 1);
   }

?>

fil@rezo.net ha scritto:

Author: fil@rezo.net
Date: Thu Aug 24 02:12:14 2006
New Revision: 4839

Log:
insert jquery as first script, but not before the <html> tag (in the private space it was ruining the design)

I modified init_entete() in presentation.php to pass only <head> content to the header_prive pipeline so it had to work.

Renato

Renato Formato a écrit :

 ha scritto:
  
Author: 
Date: Thu Aug 24 02:12:14 2006
New Revision: 4839

Log:
insert jquery as first script, but not before the <html> tag (in the private space it was ruining the design)

    
I modified init_entete() in presentation.php to pass only <head> content 
to the header_prive pipeline so it had to work.

Renato
  

yes with spiip and modified presentation.php, but it didn’t work very well without spiip plugin.
jquery plugin is not used only with spiip (even if there are not yet many users … ), so we had to keep it functionnal in every case.

Cedric

cedric.morin@yterium.com ha scritto:

Renato Formato a écrit :

fil@rezo.net ha scritto:
  

Author: fil@rezo.net
Date: Thu Aug 24 02:12:14 2006
New Revision: 4839

Log:
insert jquery as first script, but not before the <html> tag (in the private space it was ruining the design)

I modified init_entete() in presentation.php to pass only <head> content to the header_prive pipeline so it had to work.

Renato
  

yes with spiip and modified presentation.php, but it didn't work very well without spiip plugin.
jquery plugin is not used only with spiip (even if there are not yet many users ... ), so we had to keep it functionnal in every case.

Cedric

yes, my fault. I did not consider the most common case.

Renato

>insert jquery as first script, but not before the <html> tag (in the
>private space it was ruining the design)
>
I modified init_entete() in presentation.php to pass only <head> content
to the header_prive pipeline so it had to work.

It worked in spiip, but it didn't work in spip :slight_smile:

-- Fil