<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://blog.vosinformations.com/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
  <title>blog - vosinformations.com - crawltrack</title>
  <link>http://blog.vosinformations.com/</link>
  <description></description>
  <language>fr</language>
  <pubDate>Sat, 16 Feb 2008 07:37:00 +0000</pubDate>
  <copyright>vosinformations.com</copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>Insérer le tag CrawlTrack dans DotClear 2</title>
    <link>http://blog.vosinformations.com/post/2007/10/28/Inserer-le-tag-CrawlTrack-dans-DotClear-2</link>
    <guid isPermaLink="false">urn:md5:aa36e44ccee3ac585ce307666be60db9</guid>
    <pubDate>Sun, 28 Oct 2007 05:19:00 +0000</pubDate>
    <dc:creator>cobra</dc:creator>
        <category>DotClear</category>
        <category>crawltrack</category><category>dotclear 2</category><category>marqeur</category><category>tag</category>    
    <description>&lt;p&gt;Dans DotClear 1, les tags CrawlTrack s'inséraient aisément dans le template, car ce dernier était en PHP. &lt;br /&gt;
Avec DotClear 2, c'est chose moins facile, car il est devenu impossible d'insérer du PHP dans le template.... enfin presque.&lt;/p&gt;    &lt;p&gt;Dans le dossier &lt;strong&gt;themes/default&lt;/strong&gt; se trouve un fichier &lt;strong&gt;_pulic.php&lt;/strong&gt; qui est exécuté par DotClear 2 lors de chaque affichage. &lt;br /&gt;
C'est dans ce fichier que le marqueur va être inséré.&lt;/p&gt;


&lt;p&gt;Voici le contenu original de _public.php:&lt;/p&gt;


&lt;pre&gt;&amp;lt;?php
# ***** BEGIN LICENSE BLOCK *****
# This file is part of DotClear.
# Copyright (c) 2003-2006 Olivier Meunier and contributors. All rights
# reserved.
#
# DotClear is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# DotClear is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with DotClear; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ***** END LICENSE BLOCK *****&lt;/pre&gt;


&lt;pre&gt;$core-&amp;gt;tpl-&amp;gt;addValue('CustomCSS',array('tplCustomTheme','CustomCSS'));&lt;/pre&gt;


&lt;pre&gt;class tplCustomTheme
{
public static function CustomCSS($attr)
{
$f = $GLOBALS&lt;a href=&quot;http://blog.vosinformations.com/post/2007/10/28/&amp;#039;core&amp;#039;&quot; title=&quot;&amp;#039;core&amp;#039;&quot;&gt;'core'&lt;/a&gt;-&amp;gt;tpl-&amp;gt;getFilters($attr);
return '&amp;lt;?php echo  '.sprintf($f,'$core-&amp;gt;blog-&amp;gt;settings-&amp;gt;public_url.&quot;/custom_style.css&quot;').'; ?&amp;gt;';
}
}&lt;/pre&gt;


&lt;pre&gt;?&amp;gt;&lt;/pre&gt;


&lt;p&gt;Le tag sera inséré à l'avant dernière ligne, la ligne précédent: &lt;strong&gt;?&amp;gt;&lt;/strong&gt; , pour obtenir:&lt;/p&gt;


&lt;pre&gt;&amp;lt;?php
# ***** BEGIN LICENSE BLOCK *****
# This file is part of DotClear.
# Copyright (c) 2003-2006 Olivier Meunier and contributors. All rights
# reserved.
#
# DotClear is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# DotClear is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with DotClear; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# ***** END LICENSE BLOCK *****&lt;/pre&gt;


&lt;pre&gt;$core-&amp;gt;tpl-&amp;gt;addValue('CustomCSS',array('tplCustomTheme','CustomCSS'));&lt;/pre&gt;


&lt;pre&gt;class tplCustomTheme
{
public static function CustomCSS($attr)
{
$f = $GLOBALS&lt;a href=&quot;http://blog.vosinformations.com/post/2007/10/28/&amp;#039;core&amp;#039;&quot; title=&quot;&amp;#039;core&amp;#039;&quot;&gt;'core'&lt;/a&gt;-&amp;gt;tpl-&amp;gt;getFilters($attr);
return '&amp;lt;?php echo  '.sprintf($f,'$core-&amp;gt;blog-&amp;gt;settings-&amp;gt;public_url.&quot;/custom_style.css&quot;').'; ?&amp;gt;';
}
}&lt;/pre&gt;


&lt;pre&gt;$crawltsite=1;
require_once(&quot;/chemin/vers/le/repertoire/crawltrack.php&quot;);&lt;/pre&gt;


&lt;pre&gt;?&amp;gt;&lt;/pre&gt;


&lt;p&gt;L'exemple montre l'insertion du tag utilisé quand le site est hébergé sur le même serveur que CrawlTrack, si tel n'en était pas le cas, il suffira de le remplacer à l'identique par celui prévu pour un site à distance.&lt;/p&gt;


&lt;p&gt;Recopiez (/écrasez) ce fichier dans tous vos thèmes et pensez à le faire au fur et à mesure des rajouts de nouveaux thèmes.&lt;/p&gt;</description>
    
    
    
          <comments>http://blog.vosinformations.com/post/2007/10/28/Inserer-le-tag-CrawlTrack-dans-DotClear-2#comment-form</comments>
      <wfw:comment>http://blog.vosinformations.com/post/2007/10/28/Inserer-le-tag-CrawlTrack-dans-DotClear-2#comment-form</wfw:comment>
      <wfw:commentRss>http://blog.vosinformations.com/feed/rss2/comments/16</wfw:commentRss>
      </item>
    
</channel>
</rss>