Update of /cvsroot/php-blog/serendipity/templates/default
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23834/templates/default
Modified Files:
Tag: branch-smarty
index.tpl smarty_layout.php
Added Files:
Tag: branch-smarty
sidebar.tpl
Log Message:
- Turn sidebars into smarty templates
TODO: Add some {if} logic to index.tpl so we don't display the sidebar when there are no plugins in it
- Add process time to index.php, for benchmark during development
Index: smarty_layout.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/templates/default/Attic/smarty_layout.php,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -d -r1.1.2.2 -r1.1.2.3
--- smarty_layout.php 9 Sep 2004 18:50:13 -0000 1.1.2.2
+++ smarty_layout.php 19 Sep 2004 00:31:25 -0000 1.1.2.3
@@ -4,18 +4,6 @@
include_once(S9Y_INCLUDE_PATH . 'serendipity_plugin_api.php');
include_once(S9Y_INCLUDE_PATH . 'serendipity_sidebar_items.php');
-if (!$serendipity['embed'] || $serendipity['embed'] === 'false' || $serendipity['embed'] === false) {
- ob_start();
- serendipity_plugin_api::generate_plugins('left', 'td');
- $serendipity['smarty']->assign('left_sidebar', ob_get_contents());
- ob_end_clean();
-
- ob_start();
- serendipity_plugin_api::generate_plugins('right', 'td');
- $serendipity['smarty']->assign('right_sidebar', ob_get_contents());
- ob_end_clean();
-}
-
if (!isset($serendipity['GET']['range']) || !is_numeric($serendipity['GET']['range'])) {
$serendipity['GET']['range'] = date('Ymd');
}
--- NEW FILE: sidebar.tpl ---
{foreach from=$plugindata item=item}
<div class="serendipitySideBarItem">
<h3 class="serendipitySideBarTitle {$item.class}">{$item.title}</h3>
<div class="serendipitySideBarContent">{$item.content}</div>
</div>
{/foreach}
Index: index.tpl
===================================================================
RCS file: /cvsroot/php-blog/serendipity/templates/default/Attic/index.tpl,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- index.tpl 9 Sep 2004 15:00:45 -0000 1.1.2.1
+++ index.tpl 19 Sep 2004 00:31:25 -0000 1.1.2.2
@@ -39,11 +39,9 @@
<table id="mainpane">
<tr>
- {$left_sidebar}
-
+ <td id="serendipityLeftSideBar" valign="top">{serendipity_sidebar side="left"}</td>
<td id="content" valign="top">{$CONTENT}</td>
-
- {$right_sidebar}
+ <td id="serendipityRightSideBar" valign="top">{serendipity_sidebar side="right"}</td>
</tr>
</table>
{/if}
@@ -53,4 +51,4 @@
{if $is_embedded != true}
</body>
</html>
-{/if}
\ No newline at end of file
+{/if}
|