123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304 |
- <?php
- /**
- * See license.inc
- */
- /**
- * @param string name Nom de la propri�t� � afficher ('name')
- case 'img' : echo $GLOBALS['img_path']; break;
- case 'rss' : echo dc_blog_rss; break;
- case 'atom' : echo dc_blog_atom; break;
- case 'search' : echo dc_blog_url; break;
- case 'logo' : echo $GLOBALS['img_path'].'/dotclear_pw.png'; break;
- */
- function dcInfo($param = NULL)
- {
- switch ($param) {
- case 'lang': // echo dc_default_lang; break;
- global $lang;
- $ret = $lang;
- break;
- case 'desc' :
- /* Dotclear does:
- echo dc_blog_desc; break;
- */
- global $conf;
- $ret = $conf['site_slogan'];
- break;
-
- case 'encoding': // echo dc_encoding; break;
- $ret = 'utf-8'; // Fixed in drupal
- break;
-
- case 'theme':
- /* Dotclear does:
- echo $GLOBALS['theme_uri'].$GLOBALS['__theme']; break;
- -----------
- Use:
- <?php print $styles ?>
- instead */
- break;
-
- case 'url':
- /* Dotclear does:
- echo dc_blog_url; break;
- */
- $ret = url();
- break;
-
- default:
- /* Dotclear does:
- echo dc_blog_name;
- */
- global $conf;
- $ret = $conf['site_name'];
- break;
- } ;
-
- echo $ret;
- }
- /**
- * @function dcHeadLinks
- * Cette fonction affiche les liens (link) dans l'en-t�te du fichier HTML.
- * Elle g�n�re automatiquement les liens de navigation dans le blog. Il
- * suffit de la placer dans l'en-t�te du document
- * Exemple:
- * <link rel="archive" href="/index.php/2006/03" title="march 2006" />
- * ibidem pour chacun des mois contenant des posts
- * <link rel="chapter" href="/index.php/2006/03/17/39-drupal-tips-configuring-zend-studio-phpdocumentor-extension-for-drupal" title="Drupal tips: configuring Zend Studio PHPDocumentor extension for Drupal" />
- * ibidem pour chacun des posts de la page en cours
- * <link rel="alternate" type="application/rss+xml" title="RSS" href="/rss.php" />
- * <link rel="alternate" type="application/xml" title="Atom" href="/atom.php" />
- */
- function dcHeadLinks()
- {
- $base_url;
- $ret = '';
- /**
- * for each of the top-level links (or top-level categories in some vocabulary ?)
- */
- drupal_add_link
- (
- array
- (
- 'rel' => 'section',
- 'href' => $base_url . '/somelink',
- 'title' => 'sometitle',
- )
- );
- /**
- * for each of the months having some nodes
- */
- drupal_add_link(
- array
- (
- 'rel' => 'chapter',
- 'href' => $base_url . '/somelink', // archive.module apparently doesn't know how to do month pages ?
- 'title' => 'sometitle',
- )
- );
- /**
- * for each of the posts on the current page
- */
- drupal_add_link(
- array
- (
- 'rel' => 'chapter',
- 'href' => $base_url . '/node/somenid',
- 'title' => 'sometitle',
- )
- );
- }
-
- function dcSinglePostTitle()
- {
- return 'dcSinglePostTitle';
- }
-
- function dcSingleCatTitle()
- {
- return 'dcSingleCatTitle';
- }
-
- function dcSingleMonthTitle()
- {
- return 'dcSingleMonthTitle';
- }
-
- function dcCustomTitle()
- {
- return 'dcCustomTitle';
- }
-
- function dcPostTrackbackAutoDiscovery()
- {
- return 'dcPostTrackbackAutoDiscovery' ;
- }
- function dcSearchString()
- {
- return 'dcSearchString' ;
- }
-
- function dcCalendar()
- {
- return 'dcCalendar' ;
- }
-
- function dcSelection()
- {
- return 'dcSelection' ;
- }
-
- function dcLangList()
- {
- return 'dcLangList';
- }
-
- function dcCatList()
- {
- return 'dcCatList';
- }
-
- function dcMonthsList()
- {
- return 'dcMonthsList' ;
- }
-
- class dcBlogRoll
- {
- function linkList()
- {
- return 'blogRoll::linklist';
- }
- }
- ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml"
- xml:lang="<?php dcInfo('lang') ?>"
- lang="<?php dcInfo('lang') ?>">
- <head>
- <meta http-equiv="Content-Type"
- content="text/html; charset=<?php dcInfo('encoding'); ?>" />
- <meta name="MSSmartTagsPreventParsing" content="TRUE" />
- <?php dcHeadLinks(); ?>
- <link rel="alternate" type="application/rss+xml" title="RSS" href="<?php dcInfo('rss'); ?>" />
- <link rel="alternate" type="application/xml" title="Atom" href="<?php dcInfo('atom'); ?>" />
- <meta name="DC.title" content="<?php dcInfo(); ?>" />
- <title><?php dcSinglePostTitle('%s - '); dcSingleCatTitle('%s - ');
- dcSingleMonthTitle('%s - '); dcCustomTitle('%s - '); dcInfo(); ?></title>
-
- <?php print $styles ?>
- <?php dcPostTrackbackAutoDiscovery(); ?>
- </head>
- <body>
- <div id="page">
- <div id="top">
- <h1><a href="<?php dcInfo('url'); ?>"><?php dcInfo(); ?></a>:
- <span style="font-style: italic; font-weight: lighter ; font-size: smaller; color: blue ;" ><?php dcInfo('desc') ; ?></span></h1>
- </div>
- <p id="prelude"><a href="#main">Aller au contenu</a> |
- <a href="#sidebar">Aller au menu</a> |
- <a href="#search">Aller à la recherche</a></p>
- <div id="main">
- <div id="content">
- <?php if ($err_msg != '') : /* Si on a une quelconque erreur, on l'affiche */?>
- <div class="error"><strong>Erreur : </strong>
- <?php echo $err_msg; ?></div>
-
- <?php elseif ($preview) : /* Si on demande la pr�visualisation d'un commentaire */?>
- <h3>Commentaire pour <?php dcPostTitle(); ?></h3>
- <div id="comment-preview">
- <blockquote>
- <?php dcCommentPreview(); ?>
- </blockquote>
- </div>
-
- <h3>Changer le commentaire</h3>
- <?php include dirname(__FILE__).'/form.php'; ?>
-
- <?php elseif ($mode != 'post') : /* Si aucune erreur et mode != post on affiche une liste de billets */?>
- <?php # Phrase affich� en cas de recherche (%s est le mot cherch�)
- dcSearchString('<p>Résultats de votre recherche de <em>%s</em>.</p>');
- ?>
-
- <?php include dirname(__FILE__).'/list.php'; ?>
-
- <?php else : /* Sinon, mode = post, donc billet unique (avec commentaires et tout le reste)*/?>
- <?php include dirname(__FILE__).'/post.php'; ?>
- <?php endif; ?>
-
- </div>
- </div>
- <div id="sidebar">
- <div id="calendar">
- <h2>Calendrier</h2>
- <?php #Affichage du calendrier
- dcCalendar('<table summary="Calendrier">%s</table>'); ?>
- <span></span>
- </div>
-
- <div id="search">
- <form action="<?php dcInfo('search'); ?>" method="get">
-
- <h2><label for="q">Rechercher</label></h2>
- <p class="field"><input name="q" id="q" type="text" size="10"
- value="<?php dcSearchString(); ?>" accesskey="4" />
- <input type="submit" class="submit" value="ok" /></p>
-
- </form>
- </div>
-
- <?php /* Affichage du blog "selection uniquement si des billets sont
- pr�sents */ ?>
- <?php dcSelection('<div id="selection"><h2>À retenir</h2><ul>%s</ul></div>'); ?>
-
- <?php dcLangList('<div id="languages"><h2>Langues</h2><ul>%s</ul></div>'); ?>
-
- <div id="categories">
- <h2>Catégories</h2>
- <?php dcCatList(); ?>
- </div>
-
- <div id="archives">
- <h2>Archives</h2>
- <?php dcMonthsList(); ?>
- </div>
-
- <div id="links">
- <h2>Liens</h2>
- <?php dcBlogroll::linkList(); ?>
- </div>
-
- <div id="syndicate">
- <h2>Syndication</h2>
- <ul>
- <li><a href="<?php dcInfo('rss'); ?>">fil rss</a></li>
- <li><a href="<?php dcInfo('rss'); ?>?type=co">fil rss commentaires</a></li>
- <li><a href="<?php dcInfo('atom'); ?>">fil atom</a></li>
- <li><a href="<?php dcInfo('atom'); ?>?type=co">fil atom commentaires</a></li>
- </ul>
- </div>
- </div>
- <p id="footer">
- propulsé par <a href="http://www.drupal.org">Drupal</a>
- sur un thème de <a href="http://www.dotclear.net/">Dotclear</a></p>.
- </div> <!-- end #page -->
- <!-- Blocs en plus pour ajouter des images en tout genre si besoin -->
- <div id="block1"><span></span></div><div id="block2"><span></span></div>
- <div id="block3"><span></span></div><div id="block4"><span></span></div>
- <div id="block5"><span></span></div><div id="block6"><span></span></div>
- <!-- ?php require( bbclone::counter() ); ?-->
- </body>
- </html>
|