Theme layout
-
Hi
I have now got my site almost done apart from this search plugin ( sphider )
Sphider tells you to replace search.php with the Sphider search file ( your_search.php ) then remane to search.php
when I do a standard search for ( beach ) the page is like so http://www.rockinghamgateway.com/?s=beach
its missing the rest of the theme ??? where is black.How can I edit the new search.php to get to load the rest of the style
old search.php is like so<?php get_header(); ?> <?php get_sidebar(); ?> <div id="content"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post"> <h2 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2> <div class="meta"><?php _e("Posted by"); ?> <?php the_author() ?> | <?php the_category(',') ?> | <?php the_time('l j F Y'); ?> <?php the_time() ?> <?php edit_post_link(__('Edit This')); ?></div> <div class="storycontent"> <?php the_content(__('(more...)')); ?> </div> <div class="feedback"> <?php wp_link_pages(); ?> <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?> </div> <?php comments_template(); // Get wp-comments.php template ?> <?php endwhile; else: ?> <h2 align="center">Not Found</h2> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?> <?php posts_nav_link(' — ', __('« Previous Page'), __('Next Page »')); ?> </div> <?php get_footer(); ?>
here is the new search.php which has the sphider settings as well
<?php get_header(); ?> <div id="content" class="narrowcolumn"> <?php if (!isset($_GET['query'])&&have_posts()) : ?> <h2 class="pagetitle">Search Results</h2> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div> <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div> </div> <?php while (have_posts()) : the_post(); ?> <div class="post"> <h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> <small><?php the_time('l, F jS, Y') ?></small> <p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div> <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div> </div> <?php else : ?> <?php // Provided for you to replace as your theme's search.php /******************************************* * Sphider Version 1.3.x * This program is licensed under the GNU GPL. * By Ando Saabas ando(a t)cs.ioc.ee ********************************************/ $searchFile = $_SERVER['REQUEST_URI']; $searchFile = explode('?',$searchFile); $searchFile = $searchFile[0]; $searchFileAppend = '?s=1&'; //error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING); error_reporting(E_ALL); $dir_path = "wp-content/plugins/sphider"; $include_dir = $dir_path."/include"; include ("$include_dir/commonfuncs.php"); //extract(getHttpVars()); $search = 1; if (isset($_GET['query'])) $query = $_GET['query']; if (isset($_GET['search'])) $search = $_GET['search']; if (isset($_GET['domain'])) $domain = $_GET['domain']; if (isset($_GET['type'])) $type = $_GET['type']; if (isset($_GET['catid'])) $catid = $_GET['catid']; if (isset($_GET['category'])) $category = $_GET['category']; if (isset($_GET['results'])) $results = $_GET['results']; if (isset($_GET['start'])) $start = $_GET['start']; if (isset($_GET['adv'])) $adv = $_GET['adv']; $include_dir = $dir_path."/include"; $template_dir = $dir_path."/templates"; $settings_dir = $dir_path."/settings"; $language_dir = $dir_path."/languages"; require_once("$settings_dir/database.php"); require_once("$language_dir/en-language.php"); require_once("$include_dir/searchfuncs.php"); require_once("$include_dir/categoryfuncs.php"); include "$settings_dir/conf.php"; ?> <link type="text/css" rel="stylesheet" href="<?php echo $template_dir.'/'.$template; ?>/search.css"> <!-- suggest script --> <style type="text/css">@import url("<?php echo $include_dir; ?>/js_suggest/SuggestFramework.css");</style> <script type="text/javascript" src="<?php echo $include_dir; ?>/js_suggest/SuggestFramework.js"></script> <script type="text/javascript">window.onload = initializeSuggestFramework;</script> <!-- /suggest script --> <?php include "$language_dir/$language-language.php"; if ($type != "or" && $type != "and" && $type != "phrase") { $type = "and"; } if (preg_match("/[^a-z0-9-.]+/", $domain)) { $domain=""; } if ($results != "") { $results_per_page = $results; } if (get_magic_quotes_gpc()==1) { $query = stripslashes($query); } if (!is_numeric($catid)) { $catid = ""; } if (!is_numeric($category)) { $category = ""; } if ($catid && is_numeric($catid)) { $tpl_['category'] = sql_fetch_all('SELECT category FROM '.$mysql_table_prefix.'categories WHERE category_id='.(int)$_REQUEST['catid']); } $count_level0 = sql_fetch_all('SELECT count(*) FROM '.$mysql_table_prefix.'categories WHERE parent_num=0'); $has_categories = 0; if ($count_level0) { $has_categories = $count_level0[0][0]; } require_once("$template_dir/$template/search_form.html"); function getmicrotime(){ list($usec, $sec) = explode(" ",microtime()); return ((float)$usec + (float)$sec); } function poweredby(){ // removed } function saveToLog ($query, $elapsed, $results) { global $mysql_table_prefix; if ($results =="") { $results = 0; } $query = "insert into ".$mysql_table_prefix."query_log (query, time, elapsed, results) values ('$query', now(), '$elapsed', '$results')"; mysql_query($query); echo mysql_error(); } switch ($search) { case 1: if (!isset($results)) { $results = ""; } $search_results = get_search_results($query, $start, $category, $type, $results, $domain); require("$template_dir/$template/search_results.html"); break; default: if ($show_categories) { if ($_REQUEST['catid'] && is_numeric($catid)) { $cat_info = get_category_info($catid); } else { $cat_info = get_categories_view(); } require("$template_dir/$template/categories.html"); } break; } ?> <?php endif; ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
Can any one please help me out, I’m really lost
TT
`
- The topic ‘Theme layout’ is closed to new replies.