[pLog-svn] r1404 - templates/trunk/human_condition

jondaley at devel.plogworld.net jondaley at devel.plogworld.net
Sat Mar 12 19:17:01 GMT 2005


Author: jondaley
Date: 2005-03-12 19:17:00 +0000 (Sat, 12 Mar 2005)
New Revision: 1404

Added:
   templates/trunk/human_condition/searchresults.template
Modified:
   templates/trunk/human_condition/panel.template
Log:
added search

Modified: templates/trunk/human_condition/panel.template
===================================================================
--- templates/trunk/human_condition/panel.template	2005-03-12 18:19:06 UTC (rev 1403)
+++ templates/trunk/human_condition/panel.template	2005-03-12 19:17:00 UTC (rev 1404)
@@ -1,6 +1,16 @@
 
 <div id="menu">
 <ul>
+  <li id="search">
+    {$locale->tr("search")}
+    <form name="search_form" method="post"
+         action="{$url->getIndexUrl()}">
+        <input type="text" name="searchTerms" value="" size="14" /><br/>
+        <input type="hidden" name="op" value="Search" />
+        <input type="hidden" name="blogId" value="{$blog->getId()}"/>
+   </form>
+  </li>
+
     <li id="wordpress">
     {$locale->tr("menu")}
     <ul>

Added: templates/trunk/human_condition/searchresults.template
===================================================================
--- templates/trunk/human_condition/searchresults.template	2005-03-12 18:19:06 UTC (rev 1403)
+++ templates/trunk/human_condition/searchresults.template	2005-03-12 19:17:00 UTC (rev 1404)
@@ -0,0 +1,21 @@
+{include file="$blogtemplate/header.template"}
+
+<div id="content">
+   <h2>{$locale->tr("search_results")}: {foreach from=$searchterms item=term}{$term} {/foreach}</h2>
+   <p>
+    {foreach from=$searchresults item=result}
+     <div class="searchresult">
+      {assign var=article value=$result->getArticle()}
+      <a href="{$url->postPermalink($article)}"><h3><b>{$article->getTopic()}</b></h3></a>
+     {foreach name=categories from=$article->getCategories() item=postcategory}
+       <a href="{$url->categoryLink($postcategory)}">{$postcategory->getName()}</a>{if !$smarty.foreach.categories.last}, {/if}
+     {/foreach}</div>
+      <p>
+      {$article->getText()|strip_tags|truncate:300:"...":false}
+      </p>
+     <br/>
+    {/foreach}
+   </p> 
+</div>
+{include file="$blogtemplate/panel.template"}
+{include file="$blogtemplate/footer.template"}




More information about the pLog-svn mailing list