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 originalb2
  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"
  20.     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  21. <html xmlns="http://www.w3.org/1999/xhtml">
  22. <!-- layout credits goto http://bluerobot.com/web/layouts/layout2.html -->
  23.  
  24. <head xml:lang="<?php locale_lang(?>" lang="<?php locale_lang(?>">
  25.     <title><?php $Blog->disp'name''htmlbody' ?><?php single_post_title(' :: ''htmlhead'?><?php single_cat_title(' :: ''htmlhead'?><?php single_month_title(' :: ''htmlhead'?></title>
  26.     <base href="<?php skinbase()// Base URL for this skin. You need this to fix relative links! ?>" />
  27.     <meta http-equiv="Content-Type" content="text/html; charset=<?php locale_charset(?>" />
  28.     <meta http-equiv="imagetoolbar" content="no" />
  29.     <meta content="TRUE" name="MSSmartTagsPreventParsing" />
  30.     <meta name="description" content="<?php $Blog->disp'shortdesc''htmlattr' )?>" />
  31.     <meta name="keywords" content="<?php $Blog->disp'keywords''htmlattr' )?>" />
  32.     <style type="text/css" media="screen">
  33.     @import url(layout2b.css);
  34.     </style>
  35.     <link rel="stylesheet" type="text/css" media="print" href="print.css" />
  36.     <meta name="generator" content="b2evolution <?php echo $b2_version ?>" /> <!-- Please leave this for stats -->
  37.     <link rel="alternate" type="text/xml" title="RDF" href="<?php $Blog->disp'rdf_url''raw' ?>" />
  38.     <link rel="alternate" type="text/xml" title="RSS .92" href="<?php $Blog->disp'rss_url''raw' ?>" />
  39.     <link rel="alternate" type="text/xml" title="RSS 2.0" href="<?php $Blog->disp'rss2_url''raw' ?>" />
  40.     <link rel="alternate" type="application/atom+xml" title="Atom" href="<?php $Blog->disp'atom_url''raw' ?>" />
  41.     <link rel="pingback" href="<?php $Blog->disp'pingback_url''raw' ?>" />
  42.     <?php comments_popup_script(// Include javascript to open pop up windows ?>
  43. </head>
  44. <body>
  45. <?php 
  46.     /**
  47.      * --------------------------- BLOG LIST INCLUDED HERE -----------------------------
  48.      */
  49.     requiredirname(__FILE__).'/_bloglist.php' )
  50.     // ---------------------------------- END OF BLOG LIST --------------------------------- ?>
  51.  
  52. <div id="header"><a href="<?php $Blog->disp'blogurl''raw' ?>" title="<?php $Blog->disp'name''htmlattr' ?>"><?php $Blog->disp'name''htmlbody' ?></a></div>
  53.  
  54. <div id="content">
  55.  
  56.  
  57. <?php    // ----------------------------------- START OF POSTS ------------------------------------
  58.     ifisset($MainList) ) $MainList->display_if_empty();    // Display message if no post
  59.  
  60. ifisset($MainList) ) while$Item $MainList->get_item() )
  61. {
  62.     $MainList->date_if_changed();
  63.     locale_temp_switch$Item->locale )// Temporarily switch to post locale
  64. ?>
  65. <div class="storyTitle">
  66.     <?php $Item->anchor()?>
  67.     <?php locale_flag$Item->locale'h10px' )// Display flag for post locale ?>
  68.     &nbsp;
  69.     <?php $Item->title()?>
  70.     &nbsp;-&nbsp;
  71.     Categories: <?php $Item->categories(?>
  72.     &nbsp;-&nbsp;
  73.     <span class="storyAuthor"><a href="<?php $Blog->disp'blogurl''raw' ?>?author=<?php the_author_ID(?>" title="<?php echo T_('Browse all posts by this author'?>"><?php $Item->Author->prefered_name(?></a></span>
  74.     @ <a href="<?php $Item->permalink(?>"><?php $Item->issue_time(?></a>
  75. </div>
  76.  
  77. <div class="storyContent">
  78. <?php $Item->content()?>
  79.  
  80. <div class="rightFlush">
  81. <?php link_pages(?> 
  82.  
  83. <?php $Item->feedback_link'comments' // Link to comments ?>
  84. <?php $Item->feedback_link'trackbacks'' &bull; ' // Link to trackbacks ?>
  85. <?php $Item->feedback_link'pingbacks'' &bull; ' // Link to trackbacks ?>
  86.  
  87. <?php $Item->edit_link' &bull; ' // Link to backoffice for editing ?>
  88.  
  89. <?php $Item->trackback_rdf(// trackback autodiscovery information ?>
  90.  
  91. <?php
  92.         // THIS is an example of how to display unmixed comments, trackbacks and pingbacks.
  93.         // doing it old b2 style :>>
  94.         
  95.         // this includes the comments and a form to add a new comment
  96.         $disp_comments 1;                    // Display the comments if requested
  97.         $disp_comment_form 1;            // Display the comments form if comments requested
  98.         $disp_trackbacks 0;                // Display the trackbacks if requested
  99.         $disp_trackback_url 0;        // Display the trackbal URL if trackbacks requested
  100.         $disp_pingbacks 0;                // Display the pingbacks if requested
  101.         $disp_title "Comments:";
  102.         requiredirname(__FILE__).'/_feedback.php' );
  103.  
  104.         // this includes the trackbacks
  105.         $disp_comments 0;                    // Display the comments if requested
  106.         $disp_comment_form 0;            // Display the comments form if comments requested
  107.         $disp_trackbacks 1;                // Display the trackbacks if requested
  108.         $disp_trackback_url 1;        // Display the trackbal URL if trackbacks requested
  109.         $disp_pingbacks 0;                // Display the pingbacks if requested
  110.         $disp_title "Trackbacks:";
  111.         requiredirname(__FILE__).'/_feedback.php' );
  112.  
  113.         // this includes the pingbacks
  114.         $disp_comments 0;                    // Display the comments if requested
  115.         $disp_comment_form 0;            // Display the comments form if comments requested
  116.         $disp_trackbacks 0;                // Display the trackbacks if requested
  117.         $disp_trackback_url 0;        // Display the trackbal URL if trackbacks requested
  118.         $disp_pingbacks 1;                // Display the pingbacks if requested
  119.         $disp_title "Pingbacks:";
  120.         requiredirname(__FILE__).'/_feedback.php' );        
  121. ?>
  122.  
  123. </div>
  124.  
  125. </div>
  126.  
  127. <?php    locale_restore_previous();    // Restore previous locale (Blog locale) ?>
  128.  
  129. <?php // ---------------------------------- END OF POSTS ------------------------------------ ?> 
  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.  
  151. </div>
  152. <p class="center">
  153.     powered by<br />
  154.     <a href="http://b2evolution.net/" title="b2evolution home"><img src="../../img/b2evolution_button.png" width="80" height="15" alt="b2evolution" /></a>
  155. </p>
  156.  
  157.  
  158. <div id="menu">
  159.  
  160. <p><?php $Blog->disp'longdesc''htmlbody' )?></p>
  161.  
  162. <h4>categories:</h4>
  163. <?php form_formstart$Blog->dget'blogurl''raw' ) ) ?>
  164. <?php    requiredirname(__FILE__).'/_categories.php' )?>
  165. <input type="submit" value="<?php echo T_('Get selection'?>" />
  166. </form>
  167.  
  168.  
  169. <h4>search:</h4>
  170.  
  171. <?php form_formstart$Blog->dget'blogurl''raw' )'''searchform' ?>
  172.     <input type="text" name="s" size="15" style="width: 100%" />
  173.     <input type="submit" name="submit" value="<?php echo T_('Search'?>" />
  174. </form>
  175.  
  176. <h4><?php echo T_('archives'?>:</h4>
  177. <ul class="compress">
  178. <?php    requiredirname(__FILE__).'/_archives.php' )?>
  179. </ul>
  180.  
  181. <?php if$Blog->get('force_skin') )
  182. {    // Skin switching is allowed for this blog: ?>
  183. <h4>skins:</h4>
  184. <ul>
  185.     <?php // ---------------------------------- START OF SLIN LIST ----------------------------------
  186.     forskin_list_start()skin_list_next()?>
  187.         <li><a href="<?php skin_change_url(?>"><?php skin_list_iteminfo'name' ?></a></li>
  188.     <?php // --------------------------------- END OF SKIN LIST --------------------------------- ?>
  189. </ul>
  190. <?php ?>
  191.  
  192. <h4>other:</h4>
  193. <?php 
  194.     // Administrative links:
  195.     user_login_link'''<br />' )
  196.     user_register_link'''<br />' )
  197.     user_admin_link'''<br />' )
  198.     user_profile_link'''<br />' )
  199.     user_logout_link'''<br />' )
  200. ?>
  201. <br />
  202.  
  203. <a href="<?php $Blog->disp'rss2_url''raw' ?>"><img src="../../img/xml.gif" alt="view this weblog as RSS !" width="36" height="14" /></a><br />
  204. <a href="http://validator.w3.org/check/referer" title="this page validates as XHTML 1.0 Transitional"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a><br />
  205. <a href="http://feedvalidator.org/check.cgi?url=<?php $Blog->disp'rss2_url''raw' ?>"><img src="../../img/valid-rss.png" alt="Valid RSS!" style="border:0;width:88px;height:31px" class="middle" /></a>
  206. </div>
  207. <?php 
  208.     log_hit();    // log the hit on this page
  209.     debug_info();    // output debug info if requested
  210. ?>
  211. </body>
  212. </html>

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