tommytomato Posted November 26, 2009 Share Posted November 26, 2009 Hi all Any one worked with Wordpress and Sphider before I have a problem, un able to get Sphider to load nicely with in my new theme. I was able to get Sphider to load correctly using my old theme ok ( Screenshot-2.jpg ) but when I load it in the new theme it throws out the page ( Screenshot.jpg ) Any ideas on how to get it to load with in the light blue area where the weather charts are ? ( Screenshot-1.jpg ) The weather charts are loaded in a frame.php <?php if ( is_home() ) { ?> <div id="frame"> <div id="framecenter"> <ul id="framebar"> <li><h2>Local Forecast</h2> <!--Weatherzone current weather button--> <center><script type="text/javascript" src="http://www.weatherzone.com.au/woys/graphic_current.jsp?postcode=6168"></script> <br /><a href="http://www.weatherzone.com.au/radar.jsp">weather radar</a> <script type="text/javascript" src="http://www.weatherzone.com.au/woys/graphic_forecast.jsp?postcode=6168&locality=Rockingham"></script> <br /><a href="http://www.weatherzone.com.au/radar.jsp">lightning tracker</a> <br /><a href="http://www.rockinghamgateway.com/wordpress/?page_id=27">Local Weather</a></center> <!--end Weatherzone current weather button--> </li> <li><h2>Perth Forecast</h2> <!-- BEGIN WIDGET --> <script type="text/javascript"> var sbLoc=1; // Location ID var sbLocFixed=1; // 0=user can change location var sbSize='m'; // m=mini,l=large var sbRedHigh=0; // 0=green high wind, 1=red high wind document.write('<scr'+'ipt src="'+document.location.protocol+'//'+( document.location.protocol.toLowerCase()=='https' ? 'secure' : 'www') + '.seabreeze.com.au/members/weather/widget.aspx?size='+sbSize+'&loc='+sbLoc+'&rev='+sbRedHigh+'&fixed='+sbLocFixed+'"></scr'+'ipt>'); </script> <!-- END WIDGET --> </li> <li><h2>Rockingham W.A Video's</h2> <ul> <object width="301" height="233"><param name="movie" value="http://www.youtube.com/v/O2cTvV4MlMQ&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/O2cTvV4MlMQ&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="301" height="233"></embed></object> </ul> </li> </ul> </div></div> <?php } ?> <?php if ( is_home() ) { ?> <div id="frame"> <div id="framecenter"> <ul id="framebar"> <li><h2>Latest Post</h2> <ul> <?php $my_query = new WP_Query('showposts=10'); ?> <?php while ($my_query->have_posts()) : $my_query->the_post(); $shorttitle = substr(the_title('','',FALSE),0,39); ?> <li><a title="<?php echo the_title() ?>" href="<?php the_permalink() ?>"> <?php echo $shorttitle; if (strlen($shorttitle) >38){ echo '...'; } ?> </a></li> <?php endwhile; ?> </ul> </li> <li><h2>Latest Links</h2> <ul><?php get_links('-1', '<li>', '</li>', '<br />'); ?></ul> </li> <li><h2>Rockingham W.A Video's</h2> <ul> <object width="301" height="233"><param name="movie" value="http://www.youtube.com/v/O2cTvV4MlMQ&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/O2cTvV4MlMQ&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="301" height="233"></embed></object> </ul> </li> </ul> </div></div> <?php } ?> Here is the search.php I'm using now <?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(); ?> <?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_footer(); ?> Can any one help me out please TT [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
tommytomato Posted November 26, 2009 Author Share Posted November 26, 2009 here's some more details, I hope some one can help me out I'm using the HostingPlatino theme on the latest word press with Sphider Version 1.3.x I'm having trouble getting the Sphider to work in the frame.php here is the code for the frame.php <?php if ( is_home() ) { ?> <div id="frame"> <div id="framecenter"> <ul id="framebar"> <li><h2>Web Hosting News</h2> <ul> <?php $my_query = new WP_Query('showposts=10'); ?> <?php while ($my_query->have_posts()) : $my_query->the_post(); $shorttitle = substr(the_title('','',FALSE),0,39); ?> <li><a title="<?php echo the_title() ?>" href="<?php the_permalink() ?>"> <?php echo $shorttitle; if (strlen($shorttitle) >38){ echo '...'; } ?> </a></li> <?php endwhile; ?> </ul> </li> <li><h2>Web Hosting Resources</h2> <ul><?php get_links('-1', '<li>', '</li>', '<br />'); ?></ul> </li> <li><h2>SQL SERVER Tutorial</h2> <ul> <object width="301" height="233"><param name="movie" value="http://www.youtube.com/v/Sfi6gYSc9os&autoplay=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Sfi6gYSc9os&autoplay=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="301" height="233"></embed></object> </ul> </li> </ul> </div></div> <?php } ?> I'm able to get this in the frame.php ok <!--To search through Sphider--> <form method="get" id="searchform" action="<?php bloginfo('url'); ?>"> <label class="hidden" for="query"><?php _e('Search site for:'); ?></label> <div><input type="text" value="<?php the_search_query(); ?>" name="query" id="query" /> <input type="hidden" name="s" value="1" /> <input type="submit" id="searchsubmit" value="Search" /> </div> </form> <!--To search through WordPress--> <form method="get" id="searchform" action="<?php bloginfo('url'); ?>"> <label class="hidden" for="s"><?php _e('Search blog for:'); ?></label> <div><input type="text" value="<?php the_search_query(); ?>" name="s" id="s" /> <input type="submit" id="searchsubmit" value="Search" /> </div> </form> But I'm not able to get the your_search.php to work with the frame.php <?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(); ?> My frame.php is below <?php if ( is_home() ) { ?> <div id="frame"> <div id="framecenter"> <ul id="framebar"> <li><h2>Web Hosting News</h2> <form method="get" id="searchform" action="<?php bloginfo('url'); ?>"> <label class="hidden" for="query"><?php _e('Search site for:'); ?></label> <div><input type="text" value="<?php the_search_query(); ?>" name="query" id="query" /> <input type="hidden" name="s" value="1" /> <input type="submit" id="searchsubmit" value="Search" /> </div> </form> </li> <li><h2>Web Hosting Resources</h2> <form method="get" id="searchform" action="<?php bloginfo('url'); ?>"> <label class="hidden" for="s"><?php _e('Search blog for:'); ?></label> <div><input type="text" value="<?php the_search_query(); ?>" name="s" id="s" /> <input type="submit" id="searchsubmit" value="Search" /> </div> </form> </li> <li><h2>SQL SERVER Tutorial</h2> <ul> <object width="301" height="233"><param name="movie" value="http://www.youtube.com/v/Sfi6gYSc9os&autoplay=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Sfi6gYSc9os&autoplay=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="301" height="233"></embed></object> </ul> </li> </ul> </div></div> <?php } ?> This brings up the search boxes OK, but I have no Search results with in the frame.php, it only loads out side the frame and when it does it throws the whole site out of place. Any ideas on how I can get this to work with in the frame.php TT Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.