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 basic
  16.      */
  17. if!defined('DB_USER') ) die'Please, do not access this page directly.' );
  18. ?>
  19. <html>
  20. <head>
  21.     <meta http-equiv="Content-Type" content="text/html; charset=<?php locale_charset(?>" />
  22.     <title><?php
  23.         $Blog->disp('name''htmlhead');
  24.         single_cat_title' - ''htmlhead' );
  25.         single_month_title' - ''htmlhead' );
  26.         single_post_title' - ''htmlhead' );
  27.         arcdir_title' - ''htmlhead' );
  28.         profile_title' - ''htmlhead' );
  29.     ?>
  30.     </title>
  31.     <base href="<?php skinbase()// Base URL for this skin. You need this to fix relative links! ?>" />
  32.     <meta name="generator" content="b2evolution <?php echo $b2_version ?>" /> <!-- Please leave this for stats -->
  33. </head>
  34. <body>
  35.  
  36. <?php
  37.     /**
  38.      * --------------------------- BLOG LIST INCLUDED HERE -----------------------------
  39.      */
  40.     requiredirname(__FILE__).'/_bloglist.php' );
  41.     // ---------------------------------- END OF BLOG LIST --------------------------------- ?>
  42.  
  43.     <?php // ------------------------------- START OF SKIN LIST -------------------------------
  44.     if$Blog->get('force_skin') )
  45.     {    // Skin switching is allowed for this blog:
  46.         echo T_'Select skin:' )' ';
  47.         forskin_list_start()skin_list_next())
  48.         ?>
  49.         [<a href="<?php skin_change_url(?>"><?php skin_list_iteminfo'name''htmlbody' ?></a>]
  50.         <?php
  51.         }
  52.     // ------------------------------ END OF SKIN LIST ------------------------------ ?>
  53.  
  54.     <hr>
  55.     <div align="center">
  56.         <h1><?php $Blog->disp'name''htmlbody' ?></h1>
  57.         <p><?php $Blog->disp'tagline''htmlbody' ?></p>
  58.     </div>    
  59.     <hr>
  60.  
  61.   <small><?php $Blog->disp'longdesc''htmlbody' )?></small>
  62.     
  63.     <hr>
  64.  
  65.     <h2><?php
  66.         single_cat_title();
  67.         single_month_title();
  68.         single_post_title();
  69.         arcdir_title();
  70.         profile_title();
  71.     ?></h2>
  72.  
  73.     <?php    // ---------------------------------- START OF POSTS --------------------------------------
  74.     ifisset($MainList) ) $MainList->display_if_empty();    // Display message if no post
  75.  
  76.     ifisset($MainList) ) while$Item $MainList->get_item() )
  77.     {
  78.         $MainList->date_if_changed();
  79.         $Item->anchor()
  80.         locale_temp_switch$Item->locale )// Temporarily switch to post locale
  81.         ?>
  82.         <h3>
  83.             <?php $Item->issue_time()?>
  84.             <a href="<?php $Item->permalink(?>" title="<?php echo T_('Permanent link to full entry'?>"><img src="img/icon_minipost.gif" alt="Permalink" width="12" height="9" border="0" align="middle" /></a>
  85.             <?php $Item->title()?>
  86.             &nbsp;
  87.             <?php locale_flag$Item->locale'h10px''''middle' )// Display flag for post locale ?>
  88.         </h3>
  89.  
  90.         <blockquote>
  91.  
  92.             <small>
  93.             <?php
  94.                 echo T_('Categories')': ';
  95.                 $Item->categories();
  96.                 echo ', ';
  97.                 $Item->wordcount();
  98.                 echo ' 'T_('words');
  99.             ?>
  100.             </small>
  101.         
  102.             <div>
  103.                 <?php $Item->content'#''#'T_('Read more...') )?>
  104.                 <?php link_pages(?>
  105.             </div>
  106.  
  107.             <small>
  108.  
  109.             <?php $Item->feedback_link'feedbacks'''' &bull; ' // Link to comments, trackback... ?>
  110.  
  111.             <?php $Item->edit_link''' &bull; ' // Link to backoffice for editing ?>
  112.  
  113.             <?php $Item->trackback_rdf(// trackback autodiscovery information ?>
  114.  
  115.             <a href="<?php $Item->permalink(?>" title="<?php echo T_('Permanent link to full entry'?>"><?php echo T_('Permalink'?></a>
  116.             </small>
  117.  
  118.         </blockquote>
  119.  
  120.         <?php    // ------------- START OF INCLUDE FOR COMMENTS, TRACKBACK, PINGBACK, ETC. --------------
  121.         $disp_comments 1;                    // Display the comments if requested
  122.         $disp_comment_form 1;            // Display the comments form if comments requested
  123.         $disp_trackbacks 1;                // Display the trackbacks if requested
  124.  
  125.         $disp_trackback_url 1;        // Display the trackbal URL if trackbacks requested
  126.         $disp_pingbacks 1;                // Display the pingbacks if requested
  127.         requiredirname(__FILE__).'/_feedback.php' );
  128.         // ----------------- END OF INCLUDE FOR COMMENTS, TRACKBACK, PINGBACK, ETC. ----------------- 
  129.  
  130.         locale_restore_previous();    // Restore previous locale (Blog locale)
  131.         ?>
  132.     <?php // --------------------------------- END OF POSTS ----------------------------------- ?> 
  133.  
  134.     <?php // ---------------- START OF INCLUDES FOR LAST COMMENTS, STATS ETC. ----------------
  135.         switch$disp )
  136.         {
  137.             case 'arcdir':
  138.                 // this includes the archive directory if requested
  139.                 requiredirname(__FILE__).'/_arcdir.php');
  140.                 break;
  141.     
  142.             case 'profile':
  143.                 // this includes the profile form if requested
  144.                 requiredirname(__FILE__).'/_profile.php');
  145.                 break;
  146.         }
  147.         // ------------------- END OF INCLUDES FOR LAST COMMENTS, STATS ETC. ------------------- ?>
  148.  
  149.     <hr>
  150.  
  151.     <div align="center">
  152.         <strong>
  153.         <?php posts_nav_link()?>
  154.         ::
  155.         <a href="<?php $Blog->disp'arcdirurl''raw' ?>"><?php echo T_('Archives'?></a>
  156.         </strong>
  157.  
  158.         <p><?php 
  159.             user_login_link' [''] ' )
  160.             user_register_link' [''] ' )
  161.             user_admin_link' [''] ' )
  162.             user_profile_link' [''] ' )
  163.             user_logout_link' [''] ' )
  164.         ?></p>
  165.     </div>
  166.  
  167.     <hr>
  168.     
  169.     <div align="center">Powered by <a href="http://b2evolution.net/" title="b2evolution home"><img src="../../img/b2evolution_button.png" alt="b2evolution" width="80" height="15" border="0" align="middle" /></a> <!-- Please help us promote b2evolution and leave this link on your blog. --></div>
  170.     <?php 
  171.         log_hit();    // log the hit on this page
  172.         debug_info();    // output debug info if requested
  173.     ?>
  174. </body>
  175. </html>

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