From: Jim Hu <ji...@ta...> - 2005-04-13 08:44:45
|
I recently uploaded a semi-functional version of search.php to the CVS, but it wasn't set up to actually show in the calendars. Looking at the code, it looks like Chad had already left hooks in the appropriate places to get it to work. I have it working at: http://dimer.tamu.edu/phpicalendar-2.0a/week.php? cal=all_calendars_combined971&cpath=seminars&getdate=20050413 Try searching for "protein". However, I'm not sure if the way I did it fits with Chad's original vision. The first step clearly does, which is to replace 'show_search' => '' , with 'show_search' => $show_search, in day.php, week.php, and month.php The part I'm less sure about is that I added the following to template.php $search_box .= '<form action="search.php" method="GET">'."\n". '<input type="hidden" name="cpath" value="'.$cpath.'">'."\n". '<input type="hidden" name="cal" value="'.$cal.'">'."\n". '<input type="hidden" name="getdate" value="'.$getdate.'">'."\n". '<input type="text" size="15" name="query" value="'.$query.'">'."\n". '<INPUT type="image" src="templates/'.$template.'/images/search.gif" border=0 height="19" width="18" name="submit" value="Search">'."\n". '</form>'; $this->page = str_replace('{SEARCH_BOX}', $search_box, $this->page); This was placed in function output() near the end (I put it just before the timestamps are generated). Is that a reasonable place to put things? This form HTML was lifted from the original search.php. It seems to me that this HTML code should be in a separate file to make customization easier...but I'm not sure where or how to do that...I'm guessing it would be in the page->replace_files block, but it would have to come after the sidebar. Please advise, and I'll get this into the CVS when it's the way people want. Jim Hu |