b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (0.9.x) [ class tree: evoskins ] [ index: evoskins ] [ all elements ]

Source for file _main.php

Documentation is available at _main.php

  1. <?php
  2.     /**
  3.      * This is the main template. It displays the blog.
  4.      *
  5.      * However this file is not meant to be called directly.
  6.      * It is meant to be called automagically by b2evolution.
  7.      * To display a blog, you should call a stub file instead, for example:
  8.      * /blogs/index.php or /blogs/blog_b.php
  9.      *
  10.      * b2evolution - {@link http://b2evolution.net/}
  11.      * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
  12.      * @copyright (c)2003-2005 by Francois PLANQUE - {@link http://fplanque.net/}
  13.      *
  14.      * @package evoskins
  15.      * @subpackage custom
  16.      */
  17. if!defined('DB_USER') ) die'Please, do not access this page directly.' );
  18. ?>
  19. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  20. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php locale_lang(?>" lang="<?php locale_lang(?>">
  21. <head>
  22. <meta http-equiv="Content-Type" content="text/html; charset=<?php locale_charset(?>" />
  23. <title><?php
  24.     $Blog->disp('name''htmlhead');
  25.     single_cat_title' - ''htmlhead' );
  26.     single_month_title' - ''htmlhead' );
  27.     single_post_title' - ''htmlhead' );
  28.     arcdir_title' - ''htmlhead' );
  29.     last_comments_title' - ''htmlhead' );
  30. ?>
  31. </title>
  32. <base href="<?php skinbase()// Base URL for this skin. You need this to fix relative links! ?>" />
  33. <meta name="description" content="<?php $Blog->disp'shortdesc''htmlattr' )?>" />
  34. <meta name="keywords" content="<?php $Blog->disp'keywords''htmlattr' )?>" />
  35. <meta name="generator" content="b2evolution <?php echo $b2_version ?>" /> <!-- Please leave this for stats -->
  36. <link rel="alternate" type="text/xml" title="RDF" href="<?php $Blog->disp'rdf_url''raw' ?>" />
  37. <link rel="alternate" type="text/xml" title="RSS .92" href="<?php $Blog->disp'rss_url''raw' ?>" />
  38. <link rel="alternate" type="text/xml" title="RSS 2.0" href="<?php $Blog->disp'rss2_url''raw' ?>" />
  39. <link rel="alternate" type="application/atom+xml" title="Atom" href="<?php $Blog->disp'atom_url''raw' ?>" />
  40. <link rel="pingback" href="<?php $Blog->disp'pingback_url''raw' ?>" />
  41. <link rel="stylesheet" href="rsc/styles.css" type="text/css" />
  42. </head>
  43. <body>
  44. <div id="wrapper">
  45.  
  46. <?php 
  47.     /**
  48.      * --------------------------- BLOG LIST INCLUDED HERE -----------------------------
  49.      */
  50.     requiredirname(__FILE__).'/_bloglist.php' );
  51.     // ----------------------------- END OF BLOG LIST ---------------------------- ?>
  52.  
  53. <div class="pageHeader">
  54.  
  55. <h1 id="pageTitle"><?php $Blog->disp'name''htmlbody' ?></h1>
  56.  
  57. <div class="pageSubTitle"><?php $Blog->disp'tagline''htmlbody' ?></div>
  58.  
  59. </div>
  60.  
  61. <div class="bPosts">
  62. <h2><?php
  63.     single_cat_title();
  64.     arcdir_title();
  65.     profile_title();
  66. ?></h2>
  67.  
  68. <!-- =================================== START OF MAIN AREA =================================== -->
  69.  
  70. <?php // ------------------------------------ START OF POSTS ----------------------------------------
  71.     ifisset($MainList) ) $MainList->display_if_empty()// Display message if no post
  72.  
  73.     ifisset($MainList) ) while$Item $MainList->get_item() )
  74.     {
  75.         $MainList->date_if_changed();
  76.     ?>
  77.     <div class="bPost" lang="<?php $Item->lang(?>">
  78.         <?php
  79.             locale_temp_switch$Item->locale )// Temporarily switch to post locale
  80.             $Item->anchor()// Anchor for permalinks to refer to
  81.         ?>
  82.         <div class="bSmallHead">
  83.         <a href="<?php $Item->permalink(?>" title="<?php echo T_('Permanent link to full entry'?>"><img src="rsc/img/icon_minipost.gif" alt="Permalink" width="12" height="9" class="middle" /></a>
  84.         <?php
  85.             $Item->issue_time();
  86.             echo ', 'T_('Categories')': ';
  87.             $Item->categories();
  88.             echo ' &nbsp; ';
  89.         ?>
  90.         </div>
  91.         <h3 class="bTitle"><?php $Item->title()?></h3>
  92.         <div class="bText">
  93.             <?php $Item->content()?>
  94.             <?php link_pages(?>
  95.         </div>
  96.         <div class="bSmallPrint">
  97.             <a href="<?php $Item->permalink(?>" title="<?php echo T_('Permanent link to full entry'?>"><?php echo T_('Permalink'?></a>
  98.             &bull;
  99.             <?php $Item->feedback_link'comments' // Link to comments ?>
  100.             <?php $Item->feedback_link'trackbacks'' &bull; ' // Link to trackbacks ?>
  101.             <?php $Item->feedback_link'pingbacks'' &bull; ' // Link to trackbacks ?>
  102.  
  103.             <?php $Item->edit_link' &bull; ' // Link to backoffice for editing ?>
  104.  
  105.             <?php $Item->trackback_rdf(// trackback autodiscovery information ?>
  106.         </div>
  107.             <?php // ------------- START OF INCLUDE FOR COMMENTS, TRACKBACK, PINGBACK, ETC. -------------
  108.             $disp_comments 1;                    // Display the comments if requested
  109.             $disp_comment_form 1;            // Display the comments form if comments requested
  110.             $disp_trackbacks 1;                // Display the trackbacks if requested
  111.  
  112.             $disp_trackback_url 1;        // Display the trackbal URL if trackbacks requested
  113.             $disp_pingbacks 1;                // Display the pingbacks if requested
  114.             requiredirname(__FILE__).'/_feedback.php' );
  115.             // ---------------- END OF INCLUDE FOR COMMENTS, TRACKBACK, PINGBACK, ETC. ----------------
  116.  
  117.             locale_restore_previous();    // Restore previous locale (Blog locale)
  118.             ?>
  119.     </div>
  120.     <div class="separator" ><img src="rsc/img/separator.gif" width="265" height="14" /></div>
  121. <?php // ---------------------------------- END OF POSTS ------------------------------------ ?>
  122.  
  123.     <p class="center"><strong>
  124.         <?php posts_nav_link()?>
  125.         <?php 
  126.             // previous_post( '<p class="center">%</p>' );
  127.             // next_post( '<p class="center">%</p>' );
  128.         ?>
  129.     </strong></p>
  130.  
  131. <?php // ---------------- START OF INCLUDES FOR LAST COMMENTS, STATS ETC. ----------------
  132.     switch$disp )
  133.     {
  134.         case 'comments':
  135.             // this includes the last comments if requested:
  136.             requiredirname(__FILE__).'/_lastcomments.php' );
  137.             break;
  138.  
  139.         case 'arcdir':
  140.             // this includes the archive directory if requested
  141.             requiredirname(__FILE__).'/_arcdir.php');
  142.             break;
  143.  
  144.         case 'profile':
  145.             // this includes the profile form if requested
  146.             requiredirname(__FILE__).'/_profile.php');
  147.             break;
  148.     }
  149. // ------------------- END OF INCLUDES FOR LAST COMMENTS, STATS ETC. ------------------- ?>
  150. </div>
  151. <!-- =================================== START OF SIDEBAR =================================== -->
  152.  
  153. <div class="bSideBar">
  154.  
  155.     <div class="bSideItem">
  156.         <?php // -------------------------- CALENDAR INCLUDED HERE -----------------------------
  157.             requiredirname(__FILE__).'/_calendar.php' );
  158.             // -------------------------------- END OF CALENDAR ---------------------------------- ?>
  159.     </div>
  160.  
  161.     <div class="bSideItem">
  162.         <h3><?php $Blog->disp'name''htmlbody' ?></h3>
  163.         <p><?php $Blog->disp'longdesc''htmlbody' )?></p>
  164.         <ul>
  165.             <li><a href="<?php $Blog->disp'dynurl''raw' ?>"><strong><?php echo T_('Recently'?></strong></a></li>
  166.             <li><a href="<?php $Blog->disp'arcdirurl''raw' ?>"><strong><?php echo T_('Archives'?></strong></a></li>
  167.             <li><a href="<?php $Blog->disp'lastcommentsurl''raw' ?>"><strong><?php echo T_('Last comments'?></strong></a></li>
  168.         </ul>
  169.     </div>
  170.  
  171.     <div class="bSideItem">
  172.         <h3 class="sideItemTitle"><?php echo T_('Search'?></h3>
  173.         <?php form_formstart$Blog->dget'blogurl''raw' )'search''SearchForm' ?>
  174.             <p><input type="text" name="s" size="30" value="<?php echo htmlspecialchars($s?>" class="SearchField" /><br />
  175.             <input type="radio" name="sentence" value="AND" id="sentAND" <?php if$sentence=='AND' echo 'checked="checked" ' ?>/><label for="sentAND"><?php echo T_('All Words'?></label><br />
  176.             <input type="radio" name="sentence" value="OR" id="sentOR" <?php if$sentence=='OR' echo 'checked="checked" ' ?>/><label for="sentOR"><?php echo T_('Some Word'?></label><br />
  177.             <input type="radio" name="sentence" value="sentence" id="sentence" <?php if$sentence=='sentence' echo 'checked="checked" ' ?>/><label for="sentence"><?php echo T_('Entire phrase'?></label></p>
  178.             <input type="submit" name="submit" class="submit" value="<?php echo T_('Search'?>" />
  179.         </form>
  180.     </div>
  181.  
  182.     <div class="bSideItem">
  183.         <h3><?php echo T_('Categories'?></h3>
  184.         <?php // -------------------------- CATEGORIES INCLUDED HERE -----------------------------
  185.             requiredirname(__FILE__).'/_categories.php' );
  186.             // -------------------------------- END OF CATEGORIES ---------------------------------- ?>
  187.     </div>
  188.  
  189.     <div class="bSideItem">
  190.         <h3><?php echo T_('Archives'?></h3>
  191.         <ul>
  192.             <?php // -------------------------- ARCHIVES INCLUDED HERE -----------------------------
  193.                 requiredirname(__FILE__).'/_archives.php' );
  194.                 // -------------------------------- END OF ARCHIVES ---------------------------------- ?>
  195.                 <li><a href="<?php $Blog->disp'arcdirurl''raw' ?>"><?php echo T_('more...'?></a></li>
  196.         </ul>
  197.     </div>
  198.  
  199.     <?php if$Blog->get('force_skin') )
  200.     {    // Skin switching is allowed for this blog: ?>
  201.         <div class="bSideItem">
  202.             <h3><?php echo T_('Choose skin'?></h3>
  203.             <ul>
  204.                 <?php // ------------------------------- START OF SKIN LIST -------------------------------
  205.                 forskin_list_start()skin_list_next()?>
  206.                     <li><a href="<?php skin_change_url(?>"><?php skin_list_iteminfo'name''htmlbody' ?></a></li>
  207.                 <?php // ------------------------------ END OF SKIN LIST ------------------------------ ?>
  208.             </ul>
  209.         </div>
  210.     <?php ?>
  211.     
  212.     <div class="bSideItem">
  213.         <h3><?php echo T_('Misc'?></h3>
  214.         <ul>
  215.             <?php
  216.                 user_login_link'<li>''</li>' );
  217.                 user_register_link'<li>''</li>' );
  218.                 user_admin_link'<li>''</li>' );
  219.                 user_profile_link'<li>''</li>' );
  220.                 user_logout_link'<li>''</li>' );
  221.             ?>
  222.         </ul>
  223.     </div>
  224.  
  225.     <div class="bSideItem">
  226.         <h3><?php echo T_('Syndicate this blog'?></h3>
  227.             <ul>
  228.                 <li>
  229.                     RSS 0.92:
  230.                     <a href="<?php $Blog->disp'rss_url''raw' ?>"><?php echo T_('Posts'?></a>,
  231.                     <a href="<?php $Blog->disp'comments_rss_url''raw' ?>"><?php echo T_('Comments'?></a>
  232.                 </li>
  233.                 <li>
  234.                     RSS 1.0:
  235.                     <a href="<?php $Blog->disp'rdf_url''raw' ?>"><?php echo T_('Posts'?></a>,
  236.                     <a href="<?php $Blog->disp'comments_rdf_url''raw' ?>"><?php echo T_('Comments'?></a>
  237.                 </li>
  238.                 <li>
  239.                     RSS 2.0:
  240.                     <a href="<?php $Blog->disp'rss2_url''raw' ?>"><?php echo T_('Posts'?></a>,
  241.                     <a href="<?php $Blog->disp'comments_rss2_url''raw' ?>"><?php echo T_('Comments'?></a>
  242.                 </li>
  243.                 <li>
  244.                     Atom:
  245.                     <a href="<?php $Blog->disp'atom_url''raw' ?>"><?php echo T_('Posts'?></a>,
  246.                     <a href="<?php $Blog->disp'comments_atom_url''raw' ?>"><?php echo T_('Comments'?></a>
  247.                 </li>
  248.             </ul>
  249.             <img src="../../img/xml.gif" alt="XML" width="36" height="14" class="top" />
  250.             <a href="http://fplanque.net/Blog/itTrends/2004/01/10/rss_rdf_and_atom_in_a_nutshell" title="External - English">What is this?</a>
  251.  
  252.     </div>
  253. <p class="center">powered by<br />
  254. <a href="http://b2evolution.net/" title="b2evolution home"><img src="../../img/b2evolution_logo_80.gif" alt="b2evolution" width="80" height="17" border="0" class="middle" /></a></p>
  255.  
  256. </div>
  257.  
  258. <div class="clear"><img src="../../img/blank.gif" width="1" height="1" /></div>
  259.  
  260. <div id="pageFooter">
  261.     <p class="baseline">
  262.         Original <a href="http://b2evolution.net/">b2evolution</a> template design by <a href="http://severinelandrieu.com/">S&eacute;verine LANDRIEU</a> &amp; <a href="http://fplanque.net/">Fran&ccedil;ois PLANQUE</a>.
  263.     </p>
  264.     <?php
  265.         log_hit();    // log the hit on this page
  266.         debug_info()// output debug info if requested
  267.     ?>
  268. </div>
  269. </div>
  270. </body>
  271. </html>

Documentation generated on Tue, 20 May 2008 01:55:33 +0200 by phpDocumentor 1.4.2