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="custom.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="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 ', ';
  89.             $Item->wordcount();
  90.             echo ' 'T_('words')' &nbsp; ';
  91.             locale_flag$Item->locale'h10px' );
  92.         ?>
  93.         </div>
  94.         <h3 class="bTitle"><?php $Item->title()?></h3>
  95.         <div class="bText">
  96.             <?php $Item->content()?>
  97.             <?php link_pages(?>
  98.         </div>
  99.         <div class="bSmallPrint">
  100.             <a href="<?php $Item->permalink(?>" title="<?php echo T_('Permanent link to full entry'?>" class="permalink_right"><img src="img/chain_link.gif" alt="<?php echo T_('Permalink'?>" width="14" height="14" border="0" class="middle" /></a>
  101.  
  102.             <?php $Item->feedback_link'comments' // Link to comments ?>
  103.             <?php $Item->feedback_link'trackbacks'' &bull; ' // Link to trackbacks ?>
  104.             <?php $Item->feedback_link'pingbacks'' &bull; ' // Link to trackbacks ?>
  105.  
  106.             <?php $Item->edit_link' &bull; ' // Link to backoffice for editing ?>
  107.  
  108.             <?php $Item->trackback_rdf(// trackback autodiscovery information ?>
  109.         </div>
  110.             <?php // ------------- START OF INCLUDE FOR COMMENTS, TRACKBACK, PINGBACK, ETC. -------------
  111.             $disp_comments 1;                    // Display the comments if requested
  112.             $disp_comment_form 1;            // Display the comments form if comments requested
  113.             $disp_trackbacks 1;                // Display the trackbacks if requested
  114.  
  115.             $disp_trackback_url 1;        // Display the trackbal URL if trackbacks requested
  116.             $disp_pingbacks 1;                // Display the pingbacks if requested
  117.             requiredirname(__FILE__).'/_feedback.php' );
  118.             // ---------------- END OF INCLUDE FOR COMMENTS, TRACKBACK, PINGBACK, ETC. ----------------
  119.  
  120.             locale_restore_previous();    // Restore previous locale (Blog locale)
  121.             ?>
  122.     </div>
  123. <?php // ---------------------------------- END OF POSTS ------------------------------------ ?>
  124.  
  125.     <p class="center"><strong>
  126.         <?php posts_nav_link()?>
  127.         <?php 
  128.             // previous_post( '<p class="center">%</p>' );
  129.             // next_post( '<p class="center">%</p>' );
  130.         ?>
  131.     </strong></p>
  132.  
  133. <?php // ---------------- START OF INCLUDES FOR LAST COMMENTS, STATS ETC. ----------------
  134.     switch$disp )
  135.     {
  136.         case 'comments':
  137.             // this includes the last comments if requested:
  138.             requiredirname(__FILE__).'/_lastcomments.php' );
  139.             break;
  140.  
  141.         case 'arcdir':
  142.             // this includes the archive directory if requested
  143.             requiredirname(__FILE__).'/_arcdir.php');
  144.             break;
  145.  
  146.         case 'profile':
  147.             // this includes the profile form if requested
  148.             requiredirname(__FILE__).'/_profile.php');
  149.             break;
  150.     }
  151. // ------------------- END OF INCLUDES FOR LAST COMMENTS, STATS ETC. ------------------- ?>
  152. </div>
  153. <!-- =================================== START OF SIDEBAR =================================== -->
  154.  
  155. <div class="bSideBar">
  156.  
  157.     <div class="bSideItem">
  158.         <h3><?php $Blog->disp'name''htmlbody' ?></h3>
  159.         <p><?php $Blog->disp'longdesc''htmlbody' )?></p>
  160.         <p class="center"><strong><?php posts_nav_link' | ''< '.T_('Previous')T_('Next').' >' )?></strong></p>
  161.         <!--?php next_post(); // activate this if you want a link to the next post in single page mode ?-->
  162.         <!--?php previous_post(); // activate this if you want a link to the previous post in single page mode ?-->
  163.         <ul>
  164.             <li><a href="<?php $Blog->disp'staticurl''raw' ?>"><strong><?php echo T_('Recently'?></strong></a> <span class="dimmed"><?php echo T_('(cached)'?></span></li>
  165.             <li><a href="<?php $Blog->disp'dynurl''raw' ?>"><strong><?php echo T_('Recently'?></strong></a> <span class="dimmed"><?php echo T_('(no cache)'?></span></li>
  166.         </ul>
  167.         <?php // -------------------------- CALENDAR INCLUDED HERE -----------------------------
  168.             requiredirname(__FILE__).'/_calendar.php' );
  169.             // -------------------------------- END OF CALENDAR ---------------------------------- ?>
  170.         <ul>
  171.             <li><a href="<?php $Blog->disp'lastcommentsurl''raw' ?>"><strong><?php echo T_('Last comments'?></strong></a></li>
  172.         </ul>
  173.     </div>
  174.  
  175.     <div class="bSideItem">
  176.         <h3 class="sideItemTitle"><?php echo T_('Search'?></h3>
  177.         <?php form_formstart$Blog->dget'blogurl''raw' )'search''SearchForm' ?>
  178.             <p><input type="text" name="s" size="30" value="<?php echo htmlspecialchars($s?>" class="SearchField" /><br />
  179.             <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 />
  180.             <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 />
  181.             <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>
  182.             <input type="submit" name="submit" class="submit" value="<?php echo T_('Search'?>" />
  183.         </form>
  184.     </div>
  185.  
  186.     <div class="bSideItem">
  187.         <h3><?php echo T_('Categories'?></h3>
  188.         <?php form_formstart$Blog->dget'blogurl''raw' ) ) ?>
  189.         <?php // -------------------------- CATEGORIES INCLUDED HERE -----------------------------
  190.             requiredirname(__FILE__).'/_categories.php' );
  191.             // -------------------------------- END OF CATEGORIES ---------------------------------- ?>
  192.         <br />
  193.         <input type="submit" class="submit" value="<?php echo T_('Get selection'?>" />
  194.         </form>
  195.     </div>
  196.  
  197.     <div class="bSideItem">
  198.         <h3><?php echo T_('Archives'?></h3>
  199.         <ul>
  200.             <?php // -------------------------- ARCHIVES INCLUDED HERE -----------------------------
  201.                 requiredirname(__FILE__).'/_archives.php' );
  202.                 // -------------------------------- END OF ARCHIVES ---------------------------------- ?>
  203.                 <li><a href="<?php $Blog->disp'arcdirurl''raw' ?>"><?php echo T_('more...'?></a></li>
  204.         </ul>
  205.     </div>
  206.  
  207.     <?php if$Blog->get('force_skin') )
  208.     {    // Skin switching is allowed for this blog: ?>
  209.         <div class="bSideItem">
  210.             <h3><?php echo T_('Choose skin'?></h3>
  211.             <ul>
  212.                 <?php // ------------------------------- START OF SKIN LIST -------------------------------
  213.                 forskin_list_start()skin_list_next()?>
  214.                     <li><a href="<?php skin_change_url(?>"><?php skin_list_iteminfo'name''htmlbody' ?></a></li>
  215.                 <?php // ------------------------------ END OF SKIN LIST ------------------------------ ?>
  216.             </ul>
  217.         </div>
  218.     <?php ?>
  219.  
  220.  
  221.     <?php // -------------------------- LINKBLOG INCLUDED HERE -----------------------------
  222.         requiredirname(__FILE__).'/_linkblog.php' );
  223.         // -------------------------------- END OF LINKBLOG ---------------------------------- ?>
  224.  
  225.  
  226.     <div class="bSideItem">
  227.         <h3><?php echo T_('Misc'?></h3>
  228.         <ul>
  229.             <?php
  230.                 user_login_link'<li>''</li>' );
  231.                 user_register_link'<li>''</li>' );
  232.                 user_admin_link'<li>''</li>' );
  233.                 user_profile_link'<li>''</li>' );
  234.                 user_logout_link'<li>''</li>' );
  235.             ?>
  236.         </ul>
  237.     </div>
  238.  
  239.     <div class="bSideItem">
  240.         <h3><?php echo T_('Syndicate this blog'?> <img src="../../img/xml.gif" alt="XML" width="36" height="14" class="middle" /></h3>
  241.             <ul>
  242.                 <li>
  243.                     RSS 0.92:
  244.                     <a href="<?php $Blog->disp'rss_url''raw' ?>"><?php echo T_('Posts'?></a>,
  245.                     <a href="<?php $Blog->disp'comments_rss_url''raw' ?>"><?php echo T_('Comments'?></a>
  246.                 </li>
  247.                 <li>
  248.                     RSS 1.0:
  249.                     <a href="<?php $Blog->disp'rdf_url''raw' ?>"><?php echo T_('Posts'?></a>,
  250.                     <a href="<?php $Blog->disp'comments_rdf_url''raw' ?>"><?php echo T_('Comments'?></a>
  251.                 </li>
  252.                 <li>
  253.                     RSS 2.0:
  254.                     <a href="<?php $Blog->disp'rss2_url''raw' ?>"><?php echo T_('Posts'?></a>,
  255.                     <a href="<?php $Blog->disp'comments_rss2_url''raw' ?>"><?php echo T_('Comments'?></a>
  256.                 </li>
  257.                 <li>
  258.                     Atom:
  259.                     <a href="<?php $Blog->disp'atom_url''raw' ?>"><?php echo T_('Posts'?></a>,
  260.                     <a href="<?php $Blog->disp'comments_atom_url''raw' ?>"><?php echo T_('Comments'?></a>
  261.                 </li>
  262.             </ul>
  263.             <a href="http://fplanque.net/Blog/itTrends/2004/01/10/rss_rdf_and_atom_in_a_nutshell" title="External - English">What is RSS?</a>
  264.  
  265.     </div>
  266. <p class="center">powered by<br />
  267. <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>
  268.  
  269. </div>
  270. <div id="pageFooter">
  271.     <p class="baseline">
  272.         Original template design by <a href="http://fplanque.net/">François PLANQUE</a>.
  273.     </p>
  274.     <div class="center">
  275.         <a href="http://validator.w3.org/check/referer"><img style="border:0;width:88px;height:31px" src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" class="middle" /></a>
  276.     
  277.         <a href="http://jigsaw.w3.org/css-validator/"><img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" class="middle" /></a>
  278.     
  279.         <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>
  280.     
  281.         <a href="http://feedvalidator.org/check.cgi?url=<?php $Blog->disp'atom_url''raw' ?>"><img src="../../img/valid-atom.png" alt="Valid Atom!" style="border:0;width:88px;height:31px" class="middle" /></a>
  282.     </div>
  283.     
  284.     <?php
  285.         log_hit();    // log the hit on this page
  286.         debug_info()// output debug info if requested
  287.     ?>
  288. </div>
  289. </div>
  290. </body>
  291. </html>

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