page.tpl.php 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. <?php
  2. /**
  3. * See license.inc
  4. */
  5. /**
  6. * @param string name Nom de la propri�t� � afficher ('name')
  7. case 'img' : echo $GLOBALS['img_path']; break;
  8. case 'rss' : echo dc_blog_rss; break;
  9. case 'atom' : echo dc_blog_atom; break;
  10. case 'search' : echo dc_blog_url; break;
  11. case 'logo' : echo $GLOBALS['img_path'].'/dotclear_pw.png'; break;
  12. */
  13. function dcInfo($param = NULL)
  14. {
  15. switch ($param) {
  16. case 'lang': // echo dc_default_lang; break;
  17. global $lang;
  18. $ret = $lang;
  19. break;
  20. case 'desc' :
  21. /* Dotclear does:
  22. echo dc_blog_desc; break;
  23. */
  24. global $conf;
  25. $ret = $conf['site_slogan'];
  26. break;
  27. case 'encoding': // echo dc_encoding; break;
  28. $ret = 'utf-8'; // Fixed in drupal
  29. break;
  30. case 'theme':
  31. /* Dotclear does:
  32. echo $GLOBALS['theme_uri'].$GLOBALS['__theme']; break;
  33. -----------
  34. Use:
  35. <?php print $styles ?>
  36. instead */
  37. break;
  38. case 'url':
  39. /* Dotclear does:
  40. echo dc_blog_url; break;
  41. */
  42. $ret = url();
  43. break;
  44. default:
  45. /* Dotclear does:
  46. echo dc_blog_name;
  47. */
  48. global $conf;
  49. $ret = $conf['site_name'];
  50. break;
  51. } ;
  52. echo $ret;
  53. }
  54. /**
  55. * @function dcHeadLinks
  56. * Cette fonction affiche les liens (link) dans l'en-t�te du fichier HTML.
  57. * Elle g�n�re automatiquement les liens de navigation dans le blog. Il
  58. * suffit de la placer dans l'en-t�te du document
  59. * Exemple:
  60. * <link rel="archive" href="/index.php/2006/03" title="march 2006" />
  61. * ibidem pour chacun des mois contenant des posts
  62. * <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" />
  63. * ibidem pour chacun des posts de la page en cours
  64. * <link rel="alternate" type="application/rss+xml" title="RSS" href="/rss.php" />
  65. * <link rel="alternate" type="application/xml" title="Atom" href="/atom.php" />
  66. */
  67. function dcHeadLinks()
  68. {
  69. $base_url;
  70. $ret = '';
  71. /**
  72. * for each of the top-level links (or top-level categories in some vocabulary ?)
  73. */
  74. drupal_add_link
  75. (
  76. array
  77. (
  78. 'rel' => 'section',
  79. 'href' => $base_url . '/somelink',
  80. 'title' => 'sometitle',
  81. )
  82. );
  83. /**
  84. * for each of the months having some nodes
  85. */
  86. drupal_add_link(
  87. array
  88. (
  89. 'rel' => 'chapter',
  90. 'href' => $base_url . '/somelink', // archive.module apparently doesn't know how to do month pages ?
  91. 'title' => 'sometitle',
  92. )
  93. );
  94. /**
  95. * for each of the posts on the current page
  96. */
  97. drupal_add_link(
  98. array
  99. (
  100. 'rel' => 'chapter',
  101. 'href' => $base_url . '/node/somenid',
  102. 'title' => 'sometitle',
  103. )
  104. );
  105. }
  106. function dcSinglePostTitle()
  107. {
  108. return 'dcSinglePostTitle';
  109. }
  110. function dcSingleCatTitle()
  111. {
  112. return 'dcSingleCatTitle';
  113. }
  114. function dcSingleMonthTitle()
  115. {
  116. return 'dcSingleMonthTitle';
  117. }
  118. function dcCustomTitle()
  119. {
  120. return 'dcCustomTitle';
  121. }
  122. function dcPostTrackbackAutoDiscovery()
  123. {
  124. return 'dcPostTrackbackAutoDiscovery' ;
  125. }
  126. function dcSearchString()
  127. {
  128. return 'dcSearchString' ;
  129. }
  130. function dcCalendar()
  131. {
  132. return 'dcCalendar' ;
  133. }
  134. function dcSelection()
  135. {
  136. return 'dcSelection' ;
  137. }
  138. function dcLangList()
  139. {
  140. return 'dcLangList';
  141. }
  142. function dcCatList()
  143. {
  144. return 'dcCatList';
  145. }
  146. function dcMonthsList()
  147. {
  148. return 'dcMonthsList' ;
  149. }
  150. class dcBlogRoll
  151. {
  152. function linkList()
  153. {
  154. return 'blogRoll::linklist';
  155. }
  156. }
  157. ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  158. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  159. <html xmlns="http://www.w3.org/1999/xhtml"
  160. xml:lang="<?php dcInfo('lang') ?>"
  161. lang="<?php dcInfo('lang') ?>">
  162. <head>
  163. <meta http-equiv="Content-Type"
  164. content="text/html; charset=<?php dcInfo('encoding'); ?>" />
  165. <meta name="MSSmartTagsPreventParsing" content="TRUE" />
  166. <?php dcHeadLinks(); ?>
  167. <link rel="alternate" type="application/rss+xml" title="RSS" href="<?php dcInfo('rss'); ?>" />
  168. <link rel="alternate" type="application/xml" title="Atom" href="<?php dcInfo('atom'); ?>" />
  169. <meta name="DC.title" content="<?php dcInfo(); ?>" />
  170. <title><?php dcSinglePostTitle('%s - '); dcSingleCatTitle('%s - ');
  171. dcSingleMonthTitle('%s - '); dcCustomTitle('%s - '); dcInfo(); ?></title>
  172. <?php print $styles ?>
  173. <?php dcPostTrackbackAutoDiscovery(); ?>
  174. </head>
  175. <body>
  176. <div id="page">
  177. <div id="top">
  178. <h1><a href="<?php dcInfo('url'); ?>"><?php dcInfo(); ?></a>:
  179. <span style="font-style: italic; font-weight: lighter ; font-size: smaller; color: blue ;" ><?php dcInfo('desc') ; ?></span></h1>
  180. </div>
  181. <p id="prelude"><a href="#main">Aller au contenu</a> |
  182. <a href="#sidebar">Aller au menu</a> |
  183. <a href="#search">Aller &agrave; la recherche</a></p>
  184. <div id="main">
  185. <div id="content">
  186. <?php if ($err_msg != '') : /* Si on a une quelconque erreur, on l'affiche */?>
  187. <div class="error"><strong>Erreur : </strong>
  188. <?php echo $err_msg; ?></div>
  189. <?php elseif ($preview) : /* Si on demande la pr�visualisation d'un commentaire */?>
  190. <h3>Commentaire pour <?php dcPostTitle(); ?></h3>
  191. <div id="comment-preview">
  192. <blockquote>
  193. <?php dcCommentPreview(); ?>
  194. </blockquote>
  195. </div>
  196. <h3>Changer le commentaire</h3>
  197. <?php include dirname(__FILE__).'/form.php'; ?>
  198. <?php elseif ($mode != 'post') : /* Si aucune erreur et mode != post on affiche une liste de billets */?>
  199. <?php # Phrase affich� en cas de recherche (%s est le mot cherch�)
  200. dcSearchString('<p>R&eacute;sultats de votre recherche de <em>%s</em>.</p>');
  201. ?>
  202. <?php include dirname(__FILE__).'/list.php'; ?>
  203. <?php else : /* Sinon, mode = post, donc billet unique (avec commentaires et tout le reste)*/?>
  204. <?php include dirname(__FILE__).'/post.php'; ?>
  205. <?php endif; ?>
  206. </div>
  207. </div>
  208. <div id="sidebar">
  209. <div id="calendar">
  210. <h2>Calendrier</h2>
  211. <?php #Affichage du calendrier
  212. dcCalendar('<table summary="Calendrier">%s</table>'); ?>
  213. <span></span>
  214. </div>
  215. <div id="search">
  216. <form action="<?php dcInfo('search'); ?>" method="get">
  217. <h2><label for="q">Rechercher</label></h2>
  218. <p class="field"><input name="q" id="q" type="text" size="10"
  219. value="<?php dcSearchString(); ?>" accesskey="4" />
  220. <input type="submit" class="submit" value="ok" /></p>
  221. </form>
  222. </div>
  223. <?php /* Affichage du blog "selection uniquement si des billets sont
  224. pr�sents */ ?>
  225. <?php dcSelection('<div id="selection"><h2>&Agrave; retenir</h2><ul>%s</ul></div>'); ?>
  226. <?php dcLangList('<div id="languages"><h2>Langues</h2><ul>%s</ul></div>'); ?>
  227. <div id="categories">
  228. <h2>Cat&eacute;gories</h2>
  229. <?php dcCatList(); ?>
  230. </div>
  231. <div id="archives">
  232. <h2>Archives</h2>
  233. <?php dcMonthsList(); ?>
  234. </div>
  235. <div id="links">
  236. <h2>Liens</h2>
  237. <?php dcBlogroll::linkList(); ?>
  238. </div>
  239. <div id="syndicate">
  240. <h2>Syndication</h2>
  241. <ul>
  242. <li><a href="<?php dcInfo('rss'); ?>">fil rss</a></li>
  243. <li><a href="<?php dcInfo('rss'); ?>?type=co">fil rss commentaires</a></li>
  244. <li><a href="<?php dcInfo('atom'); ?>">fil atom</a></li>
  245. <li><a href="<?php dcInfo('atom'); ?>?type=co">fil atom commentaires</a></li>
  246. </ul>
  247. </div>
  248. </div>
  249. <p id="footer">
  250. propulsé par <a href="http://www.drupal.org">Drupal</a>
  251. sur un thème de <a href="http://www.dotclear.net/">Dotclear</a></p>.
  252. </div> <!-- end #page -->
  253. <!-- Blocs en plus pour ajouter des images en tout genre si besoin -->
  254. <div id="block1"><span></span></div><div id="block2"><span></span></div>
  255. <div id="block3"><span></span></div><div id="block4"><span></span></div>
  256. <div id="block5"><span></span></div><div id="block6"><span></span></div>
  257. <!-- ?php require( bbclone::counter() ); ?-->
  258. </body>
  259. </html>