source: spip-zone/_plugins_/chatin/head.php @ 117558

Last change on this file since 117558 was 28836, checked in by gaitan@…, 11 years ago

upload a new version

File size: 942 bytes
Line 
1<?php
2
3        function chatin_insert_head($flux){
4
5        /* initialize chat  */
6        session_start(); 
7        $_SESSION['username'] = $GLOBALS['visiteur_session']['nom']; // Must be already set
8
9       
10       
11
12                        $js = '<script src="'.url_absolue(find_in_path('js/chat.js.php')).'" type="text/javascript"></script>';
13            $css = '<link type="text/css" rel="stylesheet" media="all" href="'.url_absolue(find_in_path('css/chat.css')).'" />'; 
14           
15           
16            $css .= '<link type="text/css" rel="stylesheet" media="all" href="'.url_absolue(find_in_path('css/screen.css')).'" />';
17           
18            $css .= '<!--[if lte IE 7]>  <link type="text/css" rel="stylesheet" media="all" href="'.url_absolue(find_in_path('css/screen_ie.css')).'" /><![endif]-->';
19
20
21
22
23
24                if (strpos($flux,'<head')!==FALSE)
25                        return preg_replace('/(<head[^>]*>)/i', "\n\$1".$js.$css, $flux, 1);
26                else 
27                        return $flux.$js.$css;
28        }
29       
30       
31       
32
33?>
Note: See TracBrowser for help on using the repository browser.