Last change
on this file since 52813 was
52813,
checked in by kent1@…, 9 years ago
|
if (!defined("_ECRIRE_INC_VERSION")) return; sur tout fichier PHP pour sécurité future principalement
|
File size:
1.1 KB
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | if (!defined("_ECRIRE_INC_VERSION")) return; |
---|
4 | |
---|
5 | function googleplus1_css(){ |
---|
6 | return '<link rel="stylesheet" type="text/css" href="'.find_in_path('googleplus1.css').'" media="all" />'."\n"; |
---|
7 | } |
---|
8 | |
---|
9 | /** |
---|
10 | * ajout feuille de style dans le HEAD_CSS |
---|
11 | * pris en charge correctement a partir de SPIP 3 |
---|
12 | * @param string $flux |
---|
13 | * @return string |
---|
14 | */ |
---|
15 | function googleplus1_insert_head_css($flux){ |
---|
16 | if (intval($GLOBALS['spip_version_branche'])>=3) |
---|
17 | $flux .= googleplus1_css(); |
---|
18 | return $flux; |
---|
19 | } |
---|
20 | |
---|
21 | function googleplus1_insert_head($flux){ |
---|
22 | if (intval($GLOBALS['spip_version_branche'])<3) |
---|
23 | $flux .= googleplus1_css(); |
---|
24 | |
---|
25 | include_spip('inc/config'); |
---|
26 | $googleplus1_lang = lire_config('langue_site'); |
---|
27 | $flux .= ' |
---|
28 | <script type="text/javascript" src="https://apis.google.com/js/plusone.js"> |
---|
29 | {lang: \''.$googleplus1_lang.'\'} |
---|
30 | </script>'; |
---|
31 | include_spip('inc/filtres'); |
---|
32 | if (function_exists('produire_fond_statique')) |
---|
33 | $jsFile = produire_fond_statique('googleplus1.js'); |
---|
34 | else |
---|
35 | $jsFile = generer_url_public('googleplus1.js'); |
---|
36 | |
---|
37 | $flux .= "<script src='$jsFile' type='text/javascript'></script>\n"; |
---|
38 | return $flux; |
---|
39 | return $flux; |
---|
40 | } |
---|
41 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.