~ubuntu-branches/ubuntu/trusty/pluxml/trusty-proposed

« back to all changes in this revision

Viewing changes to core/lib/class.plx.show.php

  • Committer: Package Import Robot
  • Author(s): Tanguy Ortolo
  • Date: 2014-01-14 21:55:05 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140114215505-q8b6y30b69q29cx0
Tags: 5.3-1
* New upstream release.
* debian/po/es.po: Spanish translation, thanks to Matías Bellone.
 (Closes: #733066)
* debian/control: update Standards-Version to 3.9.5 (no change needed).
* debian/postinst: update PluXml version in configuration file, to avoid
  triggering the update script (nothing else to do).

Show diffs side-by-side

added added

removed removed

Lines of Context:
198
198
                if($this->plxMotor->mode == 'categorie') {
199
199
                        $title_htmltag = $this->plxMotor->aCats[$this->plxMotor->cible ]['title_htmltag'];
200
200
                        if($title_htmltag!='')
201
 
                                echo plxUtils::strCheck($this->plxMotor->aConf['title'].' - '.$title_htmltag);
 
201
                                echo plxUtils::strCheck($title_htmltag.' - '.$this->plxMotor->aConf['title']);
202
202
                        else
203
 
                                echo plxUtils::strCheck($this->plxMotor->aConf['title'].' - '.$this->plxMotor->aCats[$this->plxMotor->cible ]['name']);
 
203
                                echo plxUtils::strCheck($this->plxMotor->aCats[$this->plxMotor->cible ]['name'].' - '.$this->plxMotor->aConf['title']);
204
204
                        return;
205
205
                }
206
206
                if($this->plxMotor->mode == 'article') {
219
219
                                echo plxUtils::strCheck($this->plxMotor->aStats[$this->plxMotor->cible ]['name'].' - '.$this->plxMotor->aConf['title']);
220
220
                        return;
221
221
                }
222
 
        if($this->plxMotor->mode == 'archives') {
 
222
                if($this->plxMotor->mode == 'archives') {
223
223
                        preg_match('/^(\d{4})(\d{2})?(\d{2})?/',$this->plxMotor->cible, $capture);
224
224
                        $year = !empty($capture[1]) ? ' '.$capture[1] : '';
225
225
                        $month = !empty($capture[2]) ? ' '.plxDate::getCalendar('month', $capture[2]) : '';
226
226
                        $day = !empty($capture[3]) ? ' '.plxDate::getCalendar('day', $capture[3]) : '';
227
 
            echo plxUtils::strCheck(L_PAGETITLE_ARCHIVES.$day.$month.$year.' - '.$this->plxMotor->aConf['title']);
228
 
            return;
229
 
        }
230
 
        if($this->plxMotor->mode == 'tags') {
231
 
            echo plxUtils::strCheck(L_PAGETITLE_TAG.' '.$this->plxMotor->cible.' - '.$this->plxMotor->aConf['title']);
232
 
            return;
233
 
        }
 
227
                        echo plxUtils::strCheck(L_PAGETITLE_ARCHIVES.$day.$month.$year.' - '.$this->plxMotor->aConf['title']);
 
228
                        return;
 
229
                }
 
230
                if($this->plxMotor->mode == 'tags') {
 
231
                        echo plxUtils::strCheck(L_PAGETITLE_TAG.' '.$this->plxMotor->cibleName.' - '.$this->plxMotor->aConf['title']);
 
232
                        return;
 
233
                }
234
234
                if($this->plxMotor->mode == 'erreur') {
235
235
                        echo plxUtils::strCheck($this->plxMotor->plxErreur->getMessage().' - '.$this->plxMotor->aConf['title']);
236
236
                        return;
324
324
         *
325
325
         * @param       extra   nom du lien vers la page d'accueil
326
326
         * @param       format  format du texte pour chaque catégorie (variable : #cat_id, #cat_status, #cat_url, #cat_name, #art_nb)
327
 
     * @param   include liste des catégories à afficher séparées par le caractère | (exemple: 001|003)
328
 
     * @param   exclude liste des catégories à ne pas afficher séparées par le caractère | (exemple: 002|003)
329
 
         * @return      stdout
 
327
         * @param       include liste des catégories à afficher séparées par le caractère | (exemple: 001|003)
 
328
         * @param       exclude liste des catégories à ne pas afficher séparées par le caractère | (exemple: 002|003)
 
329
         * @return      stdout
330
330
         * @scope       global
331
331
         * @author      Anthony GUÉRIN, Florent MONTHEL, Stephane F
332
332
         **/
561
561
        /**
562
562
         * Méthode qui affiche la date de publication de l'article selon le format choisi
563
563
         *
564
 
         * @param       format  format du texte de la date (variable: #minute, #hour, #day, #month, #num_day, #num_month, #num_year(4), #num_year(2))
 
564
         * @param       format  format du texte de la date (variable: #minute, #hour, #day, #month, #num_day, #num_month, #num_year(4), #num_year(2))
565
565
         * @return      stdout
566
566
         * @scope       home,categorie,article,tags,archives
567
567
         * @author      Stephane F.
610
610
         **/
611
611
        public function artCat($separator=',') {
612
612
 
 
613
                $cats = array();
613
614
                # Initialisation de notre variable interne
614
615
                $catIds = $this->artActiveCatIds();
615
616
                foreach ($catIds as $idx => $catId) {
625
626
                                        else
626
627
                                                $active = "noactive";
627
628
                                        # On effectue l'affichage
628
 
                                        echo '<a class="'.$active.'" href="'.$this->plxMotor->urlRewrite('?categorie'.intval($catId).'/'.$url).'" title="'.$name.'">'.$name.'</a>';
 
629
                                        $cats[] = '<a class="'.$active.'" href="'.$this->plxMotor->urlRewrite('?categorie'.intval($catId).'/'.$url).'" title="'.$name.'">'.$name.'</a>';
629
630
                                } else { # La categorie n'existe pas
630
 
                                        echo L_UNCLASSIFIED;
 
631
                                        $cats[] =  L_UNCLASSIFIED;
631
632
                                }
632
633
                        } else { # Categorie "home"
633
 
                                echo '<a class="active" href="'.$this->plxMotor->urlRewrite().'" title="'.L_HOMEPAGE.'">'.L_HOMEPAGE.'</a>';
 
634
                                $cats[] = '<a class="active" href="'.$this->plxMotor->urlRewrite().'" title="'.L_HOMEPAGE.'">'.L_HOMEPAGE.'</a>';
634
635
                        }
635
 
                        if ($idx!=sizeof($catIds)-1) echo $separator.' ';
636
636
                }
 
637
                echo implode($separator, $cats);
637
638
        }
638
639
 
639
640
        /**
640
641
         * Méthode qui affiche la liste des tags l'article sous forme de lien
641
642
         *
642
643
         * @param       format  format du texte pour chaque tag (variable : #tag_status, #tag_url, #tag_name)
643
 
         * @param       separator       caractère de séparation entre les tags affichées
 
644
         * @param       separator       caractère de séparation entre les tags affichées
644
645
         * @return      stdout
645
646
         * @scope       home,categorie,article,tags,archives
646
647
         * @author      Stephane F
666
667
        }
667
668
 
668
669
        /**
 
670
         * Méthode qui affiche le lien "Lire la suite" si le chapô de l'article est renseigné
 
671
         *
 
672
         * @param       format  format d'affichage du lien pour lire la suite de l'article (#art_url, #art_title)
 
673
         * @return      stdout
 
674
         * @scope       home,categorie,tags,archives
 
675
         * @author      Stephane F
 
676
         **/
 
677
        public function artReadMore($format='') {
 
678
 
 
679
                # Affichage du lien "Lire la suite" si un chapo existe
 
680
                if($this->plxMotor->plxRecord_arts->f('chapo') != '') {
 
681
                        $format = ($format=='' ? '<p class="more"><a href="#art_url" title="#art_title">'.L_ARTCHAPO.'</a></p>' : $format);
 
682
                        if($format) {
 
683
                                # On recupere les infos de l'article
 
684
                                $id = intval($this->plxMotor->plxRecord_arts->f('numero'));
 
685
                                $title = plxUtils::strCheck($this->plxMotor->plxRecord_arts->f('title'));
 
686
                                $url = $this->plxMotor->plxRecord_arts->f('url');
 
687
                                # Formatage de l'affichage
 
688
                                $row = str_replace("#art_url", $this->plxMotor->urlRewrite('?article'.$id.'/'.$url), $format);
 
689
                                $row = str_replace("#art_title", $title, $row);
 
690
                                echo $row;
 
691
                        }
 
692
                }
 
693
        }
 
694
 
 
695
        /**
669
696
         * Méthode qui affiche le châpo de l'article ainsi qu'un lien
670
697
         * pour lire la suite de l'article. Si l'article n'a pas de chapô,
671
698
         * le contenu de l'article est affiché (selon paramètres)
680
707
 
681
708
                # On verifie qu'un chapo existe
682
709
                if($this->plxMotor->plxRecord_arts->f('chapo') != '') {
683
 
                        # On recupere les infos de l'article
 
710
                        # On récupère les infos de l'article
684
711
                        $id = intval($this->plxMotor->plxRecord_arts->f('numero'));
685
712
                        $title = plxUtils::strCheck($this->plxMotor->plxRecord_arts->f('title'));
686
713
                        $url = $this->plxMotor->plxRecord_arts->f('url');
809
836
         * @param       max             nombre d'articles maximum
810
837
         * @param       cat_id  ids des catégories cible
811
838
         * @param   ending      texte à ajouter en fin de ligne
 
839
         * @param       sort    tri de l'affichage des articles (sort|rsort|alpha)
812
840
         * @return      stdout
813
841
         * @scope       global
814
842
         * @author      Florent MONTHEL, Stephane F
815
843
         **/
816
 
        public function lastArtList($format='<li><a href="#art_url" title="#art_title">#art_title</a></li>',$max=5,$cat_id='',$ending='') {
 
844
        public function lastArtList($format='<li><a href="#art_url" title="#art_title">#art_title</a></li>',$max=5,$cat_id='',$ending='', $sort='rsort') {
817
845
                # Hook Plugins
818
846
                if(eval($this->plxMotor->plxPlugins->callHook('plxShowLastArtList'))) return;
819
847
                # Génération de notre motif
824
852
 
825
853
                # Nouvel objet plxGlob et récupération des fichiers
826
854
                $plxGlob_arts = clone $this->plxMotor->plxGlob_arts;
827
 
                if($aFiles = $plxGlob_arts->query($motif,'art','rsort',0,$max,'before')) {
 
855
                if($aFiles = $plxGlob_arts->query($motif,'art',$sort,0,$max,'before')) {
828
856
                        foreach($aFiles as $v) { # On parcourt tous les fichiers
829
857
                                $art = $this->plxMotor->parseArticle(PLX_ROOT.$this->plxMotor->aConf['racine_articles'].$v);
830
858
                                $num = intval($art['numero']);
850
878
                                $row = str_replace('#cat_list', implode(', ',$catList), $row);
851
879
                                $row = str_replace('#art_url',$this->plxMotor->urlRewrite('?article'.$num.'/'.$art['url']),$row);
852
880
                                $row = str_replace('#art_status',$status,$row);
853
 
                                $author = plxUtils::getValue($this->plxMotor->aUsers[$art['author']]['name']);
854
 
                                $row = str_replace('#art_author',plxUtils::strCheck($author),$row);
 
881
                                $author = plxUtils::getValue($this->plxMotor->aUsers[$art['author']]['name']);
 
882
                                $row = str_replace('#art_author',plxUtils::strCheck($author),$row);
855
883
                                $row = str_replace('#art_title',plxUtils::strCheck($art['title']),$row);
856
884
                                $strlength = preg_match('/#art_chapo\(([0-9]+)\)/',$row,$capture) ? $capture[1] : '100';
857
885
                                $chapo = plxUtils::truncate($art['chapo'],$strlength,$ending,true,true);
959
987
        /**
960
988
         * Méthode qui affiche la date de publication d'un commentaire delon le format choisi
961
989
         *
962
 
         * @param       format  format du texte de la date (variable: #minute, #hour, #day, #month, #num_day, #num_month, #num_year(2), #num_year(4))
 
990
         * @param       format  format du texte de la date (variable: #minute, #hour, #day, #month, #num_day, #num_month, #num_year(2), #num_year(4))
963
991
         * @return      stdout
964
992
         * @scope       article
965
993
         * @author      Florent MONTHEL et Stephane F
1050
1078
         * @scope       global
1051
1079
         * @author      Florent MONTHEL, Stephane F
1052
1080
         **/
1053
 
        public function lastComList($format='<li><a href="#com_url">#com_author a dit :</a><br/>#com_content(50)</li>',$max=5,$art_id='',$cat_ids='') {
 
1081
        public function lastComList($format='<li><a href="#com_url">#com_author L_SAID :</a><br/>#com_content(50)</li>',$max=5,$art_id='',$cat_ids='') {
1054
1082
 
1055
1083
                # Hook Plugins
1056
1084
                if(eval($this->plxMotor->plxPlugins->callHook('plxShowLastComList'))) return;
1078
1106
                                                        $date = $com['date'];
1079
1107
                                                        $content = strip_tags($com['content']);
1080
1108
                                                        # On modifie nos motifs
1081
 
                                                        $row = str_replace('#com_id',$com['numero'],$format);
 
1109
                                                        $row = str_replace('L_SAID', L_SAID, $format);
 
1110
                                                        $row = str_replace('#com_id',$com['numero'],$row);
1082
1111
                                                        $row = str_replace('#com_url',$this->plxMotor->urlRewrite($url),$row);
1083
1112
                                                        $row = str_replace('#com_author',$com['author'],$row);
1084
1113
                                                        while(preg_match('/#com_content\(([0-9]+)\)/',$row,$capture)) {
1103
1132
 
1104
1133
        /**
1105
1134
         * Méthode qui affiche la liste des pages statiques.
1106
 
         * Si la variable $extra est renseignée, un lien vers la
1107
 
         * page d'accueil (nommé $extra) sera mis en place en première position
1108
1135
         *
1109
 
         * @param       extra   nom du lien vers la page d'accueil
1110
 
         * @param       format  format du texte pour chaque page (variable : #static_id, #static_status, #static_url, #static_name, #group_di, #group_class, #group_name)
 
1136
         * @param       extra           si renseigné: nom du lien vers la page d'accueil affiché en première position
 
1137
         * @param       format          format du texte pour chaque page (variable : #static_id, #static_status, #static_url, #static_name, #group_id, #group_class, #group_name)
 
1138
         * @param       menublog        position du menu Blog (si non renseigné le menu n'est pas affiché)
1111
1139
         * @return      stdout
1112
1140
         * @scope       global
1113
 
         * @author      Florent MONTHEL, Stephane F
 
1141
         * @author      Stephane F
1114
1142
         **/
1115
 
        public function staticList($extra='', $format='<li id="#static_id" class="#static_class"><a href="#static_url" class="#static_status" title="#static_name">#static_name</a></li>', $format_group='<li id="#group_id" class="#group_class">#group_name</li>') {
 
1143
        public function staticList($extra='', $format='<li id="#static_id" class="#static_class"><a href="#static_url" class="#static_status" title="#static_name">#static_name</a></li>', $format_group='<span class="#group_class">#group_name</span>', $menublog=false) {
1116
1144
 
1117
1145
                $menus = array();
1118
 
 
1119
1146
                # Hook Plugins
1120
1147
                if(eval($this->plxMotor->plxPlugins->callHook('plxShowStaticListBegin'))) return;
1121
1148
                $home = ((empty($this->plxMotor->get) OR preg_match('/^page[0-9]*/',$this->plxMotor->get)) AND basename($_SERVER['SCRIPT_NAME'])=="index.php");
1126
1153
                        $stat = str_replace('#static_url',$this->plxMotor->urlRewrite(),$stat);
1127
1154
                        $stat = str_replace('#static_name',plxUtils::strCheck($extra),$stat);
1128
1155
                        $stat = str_replace('#static_status',($home==true?"active":"noactive"), $stat);
1129
 
                        $menus[] = $stat;
 
1156
                        $menus[][] = $stat;
1130
1157
                }
1131
 
                else
1132
 
                                $menus[] = "";
1133
 
                # On verifie qu'il y a des pages statiques
1134
1158
                if($this->plxMotor->aStats) {
1135
 
                        $group_name='';
1136
1159
                        foreach($this->plxMotor->aStats as $k=>$v) {
1137
1160
                                if($v['active'] == 1 AND $v['menu'] == 'oui') { # La page  est bien active et dispo ds le menu
1138
 
                                        # On modifie nos motifs
1139
 
                                        if(!empty($v['group']) AND $group_name!=$v['group']) {
1140
 
                                                $group = str_replace('#group_id','static-group-'.plxUtils::title2url($v['group']),$format_group);
1141
 
                                                $group = str_replace('#group_class','static-group',$group);
1142
 
                                                $group = str_replace('#group_name',plxUtils::strCheck($v['group']),$group);
1143
 
                                                $menus[] =  $group;
1144
 
                                        }
1145
1161
                                        $stat = str_replace('#static_id','static-'.intval($k),$format);
1146
 
                                        if(empty($v['group']))
1147
 
                                                $stat = str_replace('#static_class','static-group',$stat);
1148
 
                                        else
1149
 
                                                $stat = str_replace('#static_class','static-menu',$stat);
1150
 
                                        if(plxUtils::checkSite($v['url'],false))
 
1162
                                        $stat = str_replace('#static_class','static-menu',$stat);
 
1163
                                        if($v['url'][0]=='?') # url interne commençant par ?
 
1164
                                                $stat = str_replace('#static_url',$this->plxMotor->urlRewrite($v['url']),$stat);
 
1165
                                        elseif(plxUtils::checkSite($v['url'],false)) # url externe en http ou autre
1151
1166
                                                $stat = str_replace('#static_url',$v['url'],$stat);
1152
 
                                        else
 
1167
                                        else # url page statique
1153
1168
                                                $stat = str_replace('#static_url',$this->plxMotor->urlRewrite('?static'.intval($k).'/'.$v['url']),$stat);
1154
1169
                                        $stat = str_replace('#static_name',plxUtils::strCheck($v['name']),$stat);
1155
1170
                                        $stat = str_replace('#static_status',(($home===false AND $this->staticId()==intval($k))?'static active':'noactive'), $stat);
1156
 
                                        $menus[] =  $stat;
1157
 
                                        $group_name=$v['group']; # pour gérer la rupture au niveau de l'affichage
1158
 
                                }
1159
 
                        } # Fin du while
 
1171
                                        if($v['group']=='')
 
1172
                                                $menus[][] =  $stat;
 
1173
                                        else
 
1174
                                                $menus[$v['group']][] =  $stat;
 
1175
                                }
 
1176
                        }
 
1177
                }
 
1178
                if($menublog) {
 
1179
                        if($this->plxMotor->aConf['homestatic']!='' AND isset($this->plxMotor->aStats[$this->plxMotor->aConf['homestatic']])) {
 
1180
                                if($this->plxMotor->aStats[$this->plxMotor->aConf['homestatic']]['active']) {
 
1181
                                        $menu = str_replace('#static_id','page-blog',$format);
 
1182
                                        if ($this->plxMotor->get AND preg_match('/^(blog|categorie|archives|tag|article)/', $_SERVER['QUERY_STRING'])) {
 
1183
                                                $menu = str_replace('#static_status','active',$menu);
 
1184
                                        } else {
 
1185
                                                $menu = str_replace('#static_status','noactive',$menu);
 
1186
                                        }
 
1187
                                        $menu = str_replace('#static_url', $this->plxMotor->urlRewrite('?blog'),$menu);
 
1188
                                        $menu = str_replace('#static_name',L_PAGEBLOG_TITLE,$menu);
 
1189
                                        array_splice($menus, (intval($menublog)-1), 0, array($menu));
 
1190
                                }
 
1191
                        }
1160
1192
                }
1161
1193
 
1162
1194
                # Hook Plugins
1163
1195
                if(eval($this->plxMotor->plxPlugins->callHook('plxShowStaticListEnd'))) return;
1164
1196
 
1165
 
                echo implode('', $menus);
 
1197
                # Affichage des pages statiques + menu Accueil et Blog
 
1198
                if($menus) {
 
1199
                        foreach($menus as $k=>$v) {
 
1200
                                if(is_numeric($k)) {
 
1201
                                        echo "\n".(is_array($v) ? $v[0] : $v);
 
1202
                                }
 
1203
                                else {
 
1204
                                        $group = str_replace('#group_id','static-group-'.plxUtils::title2url($k),$format_group);
 
1205
                                        $group = str_replace('#group_class','static group',$group);
 
1206
                                        $group = str_replace('#group_name',plxUtils::strCheck($k),$group);
 
1207
                                        echo "\n<li>\n\t".$group."\n\t<ul id=\"static-".plxUtils::title2url($k)."\">\t\t";
 
1208
                                        foreach($v as $kk => $vv) {
 
1209
                                                echo "\n\t\t".$vv;
 
1210
                                        }
 
1211
                                        echo "\n\t</ul>\n</li>\n";
 
1212
                                }
 
1213
                        }
 
1214
                        echo "\n";
 
1215
                }
 
1216
 
1166
1217
        }
1167
1218
 
1168
1219
        /**
1419
1470
         *
1420
1471
         * @param       format  format du texte pour chaque tag (variable : #tag_size #tag_status, #tag_url, #tag_name, #nb_art)
1421
1472
         * @param       max             nombre maxi de tags à afficher
 
1473
         * @param       order   tri des tags (random, alpha, '')
1422
1474
         * @return      stdout
1423
1475
         * @scope       global
1424
1476
         * @author      Stephane F
1425
1477
         **/
1426
 
        public function tagList($format='<li><a class="#tag_size #tag_status" href="#tag_url" title="#tag_name">#tag_name</a></li>', $max='') {
 
1478
        public function tagList($format='<li><a class="#tag_size #tag_status" href="#tag_url" title="#tag_name">#tag_name</a></li>', $max='', $order='') {
1427
1479
                # Hook Plugins
1428
1480
                if(eval($this->plxMotor->plxPlugins->callHook('plxShowTagList'))) return;
1429
1481
 
1448
1500
                                        }
1449
1501
                                }
1450
1502
                        }
1451
 
                        array_multisort($array);
 
1503
                        # limite sur le nombre de tags à afficher
1452
1504
                        if($max!='') $array=array_slice($array, 0, intval($max), true);
 
1505
                        # tri des tags
 
1506
                        switch($order) {
 
1507
                                case 'alpha':
 
1508
                                        array_multisort($array);
 
1509
                                        break;
 
1510
                                case 'random':
 
1511
                                        $arr_elem = array();
 
1512
                                        $keys = array_keys($array);
 
1513
                                        shuffle($keys);
 
1514
                                        foreach ($keys as $key) {
 
1515
                                                $arr_elem[$key] = $array[$key];
 
1516
                                        }
 
1517
                                        $array = $arr_elem;
 
1518
                                        break;
 
1519
                        }
1453
1520
                }
1454
1521
                # On affiche la liste
1455
1522
                $size=0;
1472
1539
         * @scope       global
1473
1540
         * @author      Stephane F
1474
1541
         **/
1475
 
    public function archList($format='<li id="#archives_id"><a class="#archives_status" href="#archives_url" title="#archives_name">#archives_name</a></li>'){
 
1542
        public function archList($format='<li id="#archives_id"><a class="#archives_status" href="#archives_url" title="#archives_name">#archives_name</a></li>'){
1476
1543
                # Hook Plugins
1477
1544
                if(eval($this->plxMotor->plxPlugins->callHook('plxShowArchList'))) return;
1478
1545
 
1479
1546
                $curYear=date('Y');
1480
 
        $array = array();
 
1547
                $array = array();
1481
1548
 
1482
1549
                $plxGlob_arts = clone $this->plxMotor->plxGlob_arts;
1483
1550
 
1520
1587
                                echo $name;
1521
1588
                        }
1522
1589
                }
1523
 
    }
 
1590
        }
1524
1591
 
1525
1592
        /**
1526
1593
         * Méthode qui affiche un lien vers la page blog.php
1530
1597
         * @scope       global
1531
1598
         * @author      Stephane F
1532
1599
         **/
1533
 
    public function pageBlog($format='<li id="#page_id"><a class="#page_status" href="#page_url" title="#page_name">#page_name</a></li>') {
 
1600
        public function pageBlog($format='<li id="#page_id"><a class="#page_status" href="#page_url" title="#page_name">#page_name</a></li>') {
1534
1601
                # Hook Plugins
1535
1602
                if(eval($this->plxMotor->plxPlugins->callHook('plxShowPageBlog'))) return;
1536
1603
 
1564
1631
                $theme = $this->plxMotor->aConf['racine_themes'].$this->plxMotor->style.'/';
1565
1632
                $css = str_replace('php','css',$this->plxMotor->template);
1566
1633
                if(is_file($theme.$css_dir.$css))
1567
 
                        echo "\t".'<link rel="stylesheet" type="text/css" href="'.$this->plxMotor->urlRewrite($theme.$css_dir.$css).'" media="screen" />'."\n";
 
1634
                        echo '<link rel="stylesheet" type="text/css" href="'.$this->plxMotor->urlRewrite($theme.$css_dir.$css).'" media="screen" />'."\n";
 
1635
        }
 
1636
 
 
1637
        /**
 
1638
         * Méthode qui ajoute, s'il existe, le fichier css associé aux plugins
 
1639
         *
 
1640
         * @return      stdout
 
1641
         * @scope       global
 
1642
         * @author      Stephane F
 
1643
         **/
 
1644
        public function pluginsCss() {
 
1645
                # Hook Plugins
 
1646
                if(eval($this->plxMotor->plxPlugins->callHook('plxShowPluginsCss'))) return;
 
1647
 
 
1648
                $filename = $this->plxMotor->aConf['racine_plugins'].'site.css';
 
1649
                if(is_file(PLX_ROOT.$filename))
 
1650
                        echo '<link rel="stylesheet" type="text/css" href="'.$this->plxMotor->urlRewrite($filename).'" media="screen" />'."\n";
1568
1651
        }
1569
1652
 
1570
1653
        /**