This is the PHP code for the new search.php using Smarty =============================================================== wwsr_register_css('wwsrSearch.css'); $smarty->wwsr_set_section_title('Search'); $smarty->wwsr_set_page_title('Search WWSR'); $smarty->wwsr_register_facet('search_wwsr.tpl'); $smarty->display('searchPage'); if(isset($_REQUEST['searchSelection']) ) { $smarty->wwsr_register_facet('search.tpl'); switch($_REQUEST['searchSelection']) { case "people": $searchString = $_GET['searchQuery']; $searchPeople = new WWSR_Search(WWSR_DB_DB,WWSR_DB_US,WWSR_DB_PA,"$searchString","people",WWSR_DB_HOST); // Validate the search string, if nothing is entered, show a message and exit. $resultSet = array(); $resultSet = $searchPeople->validateSearch(); if( count($resultSet) > 0 ) { $smarty->assign('searchClass', 'noRecord' ); $smarty->assign('searchResult', '$resultSet'); break; } // User has entered a search string, perform the search. $resultSet = array(); $searchPeople->doBasicSearch('long','0','10'); $resultSet = $searchPeople->getResult(); if(count($resultSet) == 0 ) .... .... This is the code of the template search.tpl (residing in templates directory) ================================================================================ <%* main WWSR frame template $Id: search.tpl 130 2006-06-02 22:09:16Z rajib $ *%> <% if $searchClass eq "noRecord" %>



Too many results returned, please enter keywords to narrow down your search

<%/if%> <% if $searchClass eq "people" %>

Search Results for "<%$searchstring%>" | Search executed in <%$timetaken%> seconds

People Search Find more >>>



<% if $numRecs > 0 %> <%foreach from=$searchresult item=searchResult %> <% $searchResult.middlename:captitalize %><% $searchResult.lastname:capitalize %>
<%/foreach> <%else%>


No results found for <% searchString %>




<%/if%> <%if $searchClass eq "organizations" %>

Search Results for "<%$searchstring%>" | Search executed in <%$timetaken%> seconds

Organization Search Find more >>>



<%if $numRecs > 0 %> <%foreach from=$searchresult item=searchResult %> (<% $searchResult.org_acronym:captitalize %>)
<%/foreach> <%else%>


No results found for <% searchString %>




<%if $searchClass eq "events" %>

Search Results for "<%$searchstring%>" | Search executed in <%$timetaken%> seconds

Events Search Find more >>>



.... .... This is the error message I'm getting (when I set $debug = true in WWSR_Smarty.class.php) ============================================================================================ Warning: Smarty error: unable to read resource: "searchPage" in /var/www/html/rsarkar/wwsr/include/Smarty/Smarty.class.php on line 1095 Notice: Undefined index: wwsr_css_files in /var/www/html/rsarkar/wwsr/templates_c/%%72^72D^72DAF6E8%%main.tpl.php on line 12 Notice: Undefined index: wwsr_js_libs in /var/www/html/rsarkar/wwsr/templates_c/%%72^72D^72DAF6E8%%main.tpl.php on line 17 Notice: Undefined index: wwsr_menu_facets in /var/www/html/rsarkar/wwsr/templates_c/%%72^72D^72DAF6E8%%main.tpl.php on line 42 Search WWSR Notice: Undefined index: wwsr_facets in /var/www/html/rsarkar/wwsr/templates_c/%%72^72D^72DAF6E8%%main.tpl.php on line 83 © Copyright 2006 WWSR