| [ Index ] |
|
Code source de b2evolution 2.1.0-beta |
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-2007 by Francois PLANQUE - {@link http://fplanque.net/} 11 * 12 * @package evoskins 13 * @subpackage noskin 14 */ 15 16 /** 17 * Check this: we are requiring _main.inc.php INSTEAD of _blog_main.inc.php because we are not 18 * trying to initialize any particular blog 19 */ 20 require_once dirname(__FILE__).'/conf/_config.php'; 21 22 require_once $inc_path.'_main.inc.php'; 23 24 load_funcs( 'skins/_skin.funcs.php' ); 25 26 header( 'Content-type: text/html; charset='.$io_charset ); 27 ?> 28 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 29 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php locale_lang() ?>" lang="<?php locale_lang() ?>"><!-- InstanceBegin template="/Templates/Standard.dwt" codeOutsideHTMLIsLocked="false" --> 30 <head> 31 <!-- InstanceBeginEditable name="doctitle" --> 32 <title><?php echo T_('Summary Demo'); ?></title> 33 <!-- InstanceEndEditable --> 34 <link rel="stylesheet" href="rsc/css/fp02.css" type="text/css" /> 35 <!-- InstanceBeginEditable name="head" --> 36 <!-- InstanceEndEditable --> 37 </head> 38 <body> 39 <!-- InstanceBeginEditable name="ToolBar" --> 40 <?php 41 // ---------------------------- TOOLBAR INCLUDED HERE ---------------------------- 42 require $skins_path.'_toolbar.inc.php'; 43 // ------------------------------- END OF TOOLBAR -------------------------------- 44 ?> 45 <!-- InstanceEndEditable --> 46 47 <div class="pageHeader"> 48 <div class="pageHeaderContent"> 49 50 <!-- InstanceBeginEditable name="NavBar2" --> 51 <?php 52 // --------------------------------- START OF BLOG LIST -------------------------------- 53 skin_widget( array( 54 // CODE for the widget: 55 'widget' => 'colls_list_public', 56 // Optional display params 57 'block_start' => '<div class="NavBar">', 58 'block_end' => '</div>', 59 'block_display_title' => false, 60 'list_start' => '', 61 'list_end' => '', 62 'item_start' => '', 63 'item_end' => '', 64 'item_selected_start' => '', 65 'item_selected_end' => '', 66 'link_selected_class' => 'NavButton2', 67 'link_default_class' => 'NavButton2', 68 ) ); 69 // ---------------------------------- END OF BLOG LIST --------------------------------- 70 ?> 71 <!-- InstanceEndEditable --> 72 73 <div class="NavBar"> 74 <div class="pageTitle"> 75 <h1 id="pageTitle"><!-- InstanceBeginEditable name="PageTitle" --><?php echo T_('Summary Demo') ?><!-- InstanceEndEditable --></h1> 76 </div> 77 </div> 78 79 <div class="pageHeaderEnd"></div> 80 81 </div> 82 </div> 83 84 85 <div class="pageSubTitle"><!-- InstanceBeginEditable name="SubTitle" --><?php echo T_('This demo template displays a summary of last posts in all blogs') ?><!-- InstanceEndEditable --></div> 86 87 88 <div class="main"><!-- InstanceBeginEditable name="Main" --> 89 90 <!-- =================================== START OF MAIN AREA =================================== --> 91 92 93 <?php // --------------------------- BLOG LIST ----------------------------- 94 95 load_class('items/model/_itemlist.class.php'); 96 97 $BlogCache = & get_Cache( 'BlogCache' ); 98 99 $blog_array = $BlogCache->load_public( 'ID' ); 100 101 foreach( $blog_array as $blog ) 102 { // Loop through all public blogs: 103 # by uncommenting the following lines you can hide some blogs 104 // if( $blog == 2 ) continue; // Hide blog 2... 105 106 /** 107 * @var Blog 108 */ 109 $l_Blog = & $BlogCache->get_by_ID( $blog ); 110 111 ?> 112 <h3><a href="<?php echo $l_Blog->gen_blogurl(); ?>" title="<?php $l_Blog->disp( 'shortdesc', 'htmlattr' ); ?>"><?php $l_Blog->disp( 'name', 'htmlattr' ); ?></a></h3> 113 <ul> 114 <?php // Get the 3 last posts for each blog: 115 116 $BlogBList = & new ItemList2( $l_Blog, NULL, 'now', 3 ); 117 118 $BlogBList->set_filters( array( 119 'order' => 'DESC', 120 'unit' => 'posts', 121 ) ); 122 123 // Run the query: 124 $BlogBList->query(); 125 126 while( $Item = & $BlogBList->get_item() ) 127 { 128 ?> 129 <li lang="<?php $Item->lang() ?>"> 130 <?php 131 $Item->issue_date( array( 132 'before' => ' ', 133 'after' => ' ', 134 'date_format' => '#', 135 ) ); 136 137 $Item->title( array( 138 'link_type' => 'permalink', 139 ) ); 140 ?> 141 <span class="small">[<?php $Item->lang() ?>]</span> 142 </li> 143 <?php 144 } 145 ?> 146 <li><a href="<?php echo $l_Blog->gen_blogurl(); ?>"><?php echo T_('More posts...') ?></a></li> 147 </ul> 148 <?php 149 } 150 // ---------------------------------- END OF BLOG LIST --------------------------------- ?> 151 <!-- InstanceEndEditable --></div> 152 <table cellspacing="3" class="wide"> 153 <tr> 154 <td class="cartouche">Original page design by <a href="http://fplanque.net/">François PLANQUE</a> </td> 155 156 <td class="cartouche" align="right"> <a href="http://b2evolution.net/" title="b2evolution home"><img src="rsc/img/b2evolution_button.png" alt="b2evolution" width="80" height="15" class="middle" /></a></td> 157 </tr> 158 </table> 159 <!-- InstanceBeginEditable name="Baseline" --> 160 <?php 161 debug_info(); 162 ?> 163 <!-- InstanceEndEditable --> 164 </body> 165 <!-- InstanceEnd --></html>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Thu Nov 29 23:58:50 2007 | par Balluche grâce à PHPXref 0.7 |
|