b2evolution

Multilingual multiuser multiblog engine

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

Source for file summary.php

Documentation is available at summary.php

  1. <?php
  2. /**
  3.  * This is a demo template displaying a summary of the last posts in each blog
  4.  *
  5.  * If you're new to b2evolution templates or skins, you should not start with this file
  6.  * It will be easier to start examining blog_a.php or noskin_a.php for instance...
  7.  *
  8.  * b2evolution - {@link http://b2evolution.net/}
  9.  * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
  10.  * @copyright (c)2003-2005 by Francois PLANQUE - {@link http://fplanque.net/}
  11.  *
  12.  * @package evoskins
  13.  * @subpackage noskin
  14.  */
  15.  
  16. /**
  17.  * Check this: we are requiring _main.php INSTEAD of _blog_main.php because we are not
  18.  * trying to initialize any particular blog
  19.  */
  20. require(dirname(__FILE__).'/b2evocore/_main.php');
  21. ?>
  22. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  23. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php locale_lang(?>" lang="<?php locale_lang(?>"><!-- InstanceBegin template="/Templates/Standard.dwt" codeOutsideHTMLIsLocked="false" -->
  24. <head>
  25. <!-- InstanceBeginEditable name="doctitle" -->
  26. <meta http-equiv="Content-Type" content="text/html; charset=<?php locale_charset(?>" />
  27. <title>Summary Demo</title>
  28. <!-- InstanceEndEditable --> 
  29. <!-- InstanceBeginEditable name="head" -->
  30.  <!-- InstanceEndEditable --> 
  31. <link rel="stylesheet" href="rsc/fp02.css" type="text/css" />
  32. </head>
  33. <body>
  34. <div class="pageHeader">
  35. <div class="pageHeaderContent">
  36.  
  37. <!-- InstanceBeginEditable name="NavBar2" -->
  38. <?php // --------------------------- BLOG LIST INCLUDED HERE -----------------------------
  39.     $display_blog_list 1// forced
  40.     
  41.     # this is what will start and end your blog links
  42.     $blog_list_start '<div class="NavBar">';                
  43.     $blog_list_end '</div>';                
  44.     # this is what will separate your blog links
  45.     $blog_item_start '';                
  46.     $blog_item_end '';
  47.     # This is the class of for the selected blog link:
  48.     $blog_selected_link_class 'NavButton2';
  49.     # This is the class of for the other blog links:
  50.     $blog_other_link_class 'NavButton2';
  51.     # This is additionnal markup before and after the selected blog name
  52.     $blog_selected_name_before '<span class="small">';                
  53.     $blog_selected_name_after '</span>';
  54.     # This is additionnal markup before and after the other blog names
  55.     $blog_other_name_before '<span class="small">';                
  56.     $blog_other_name_after '</span>';
  57.     // Include the bloglist
  58.     requireget_path('skins').'/_bloglist.php')
  59.     // ---------------------------------- END OF BLOG LIST --------------------------------- ?>
  60. <!-- InstanceEndEditable -->
  61.  
  62. <div class="NavBar">
  63. <div id="Logo">&nbsp;</div>
  64. <div class="pageTitle">
  65. <h1 id="pageTitle"><!-- InstanceBeginEditable name="PageTitle" --><?php echo T_('Summary demo'?><!-- InstanceEndEditable --></h1>
  66. </div>
  67. </div>
  68.  
  69. <div class="pageHeaderEnd"></div>
  70.       
  71. </div>
  72. </div>
  73.  
  74.  
  75. <div class="pageSubTitle"><!-- InstanceBeginEditable name="SubTitle" --><?php echo T_('This demo template displays a summary of last posts in all blogs'?><!-- InstanceEndEditable --></div>
  76.  
  77.  
  78. <div class="main"><!-- InstanceBeginEditable name="Main" -->
  79.  
  80. <!-- =================================== START OF MAIN AREA =================================== -->
  81.  
  82.  
  83. <?php // --------------------------- BLOG LIST -----------------------------
  84.     for$blog=blog_list_start('stub');
  85.                 $blog!=false;
  86.                  $blog=blog_list_next('stub') )
  87.     # by uncommenting the following lines you can hide some blogs
  88.         // if( $blog == 1 ) continue; // Hide blog 1...
  89.         ?>
  90. <h3><a href="<?php blog_list_iteminfo('blogurl''raw' ?>" title="<?php blog_list_iteminfo'shortdesc''htmlattr')?>"><?php blog_list_iteminfo'name''htmlbody')?></a></h3>
  91.         <ul>
  92.         <?php    // Get the 3 last posts for each blog:
  93.             $BlogBList new ItemList$blog,  ''''''''''array()'''DESC''''''''''''''''''''3''posts' );
  94.  
  95.             while$Item $BlogBList->get_item() )
  96.             {
  97.             ?>
  98.             <li lang="<?php $Item->lang(?>">
  99.                 <?php $Item->issue_date(?>:
  100.                 <a href="<?php $Item->permalink(?>" title="<?php echo T_('Permanent link to full entry'?>"><?php $Item->title''''false )?></a>
  101.                 <span class="small">[<?php $Item->lang(?>]</span>
  102.             </li>
  103.             <?php
  104.             }
  105.             ?>
  106.             <li><a href="<?php blog_list_iteminfo('blogurl''raw' ?>"><?php echo T_('More posts...'?></a></li>
  107.         </ul>
  108.         <?php
  109.     }
  110.     // ---------------------------------- END OF BLOG LIST --------------------------------- ?>
  111. <!-- InstanceEndEditable --></div>
  112. <table cellspacing="3" class="wide">
  113.   <tr> 
  114.   <td class="cartouche">Original page design by <a href="http://fplanque.net/">Fran&ccedil;ois PLANQUE</a> </td>
  115.     
  116.     <td class="cartouche" align="right"> <a href="http://b2evolution.net/" title="b2evolution home"><img src="img/b2evolution_button.png" alt="b2evolution" width="80" height="15" border="0" class="middle" /></a></td>
  117.   </tr>
  118. </table>
  119. <p class="baseline">
  120.  
  121.     <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> 
  122.   
  123.     <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>
  124.     
  125.     <?php ifisset($Blog) ) 
  126.     ?>
  127.     
  128.     <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>
  129.  
  130.     <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>
  131.     
  132.     <?php ?>
  133.     
  134.     &nbsp;<!-- InstanceBeginEditable name="Baseline" -->
  135. <?php 
  136.     if ($debug==1)
  137.     {
  138.         echo "Debug: $querycount queries - ".number_format(timer_stop(),3)." seconds";
  139.     }
  140. ?>
  141. <!-- InstanceEndEditable --></p>
  142. </body>
  143. <!-- InstanceEnd --></html>

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