Changeset 47919 in spip-zone for _plugins_/faq/faq_pipelines.php


Ignore:
Timestamp:
May 19, 2011, 9:13:27 AM (10 years ago)
Author:
cedric@…
Message:

compat SPIP 3 : inserer dans insert_head_css pour passer avant les styles du site.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/faq/faq_pipelines.php

    r32091 r47919  
    11<?php
    22
     3function faq_head(){
     4        $css ="";
     5        $css .= '<script src="'.find_in_path('faq.js').'" type="text/javascript"></script>';
     6        $css .= '<link rel="stylesheet" href="'.find_in_path('faq.css').'" type="text/css" media="all" />';
     7        return $css;
     8}
     9
    310function faq_insert_head($flux) {
    4         $flux .= '<script src="'.find_in_path('faq.js').'" type="text/javascript"></script>';
    5         $flux .= '<link rel="stylesheet" href="'.find_in_path('faq.css').'" type="text/css" media="all" />';
     11        if (intval($GLOBALS['spip_version_branche'])<3){
     12                $flux .= faq_head();
     13        }
     14        return $flux;
     15}
     16
     17function faq_insert_head_css($flux) {
     18        if (intval($GLOBALS['spip_version_branche'])>=3){
     19                $flux .= faq_head();
     20        }
    621        return $flux;
    722}
Note: See TracChangeset for help on using the changeset viewer.