Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

Little Help with my google search.

Aloittaja schmiesus, lokakuu 23, 2013, 12:22:21 IP

« edellinen - seuraava »

schmiesus

This will probably be simple.


<?php
error_reporting
(E_ALL);

// Which Theme are we using?
// Layers to be utilized
$ssi_layers = array('html''body');
// Change "true" to "false" to disable Gzip if not supported on your server
$ssi_gzip true;
//This is the SSI.php file in the Board dir.
require('SSI.php');
?>


<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script>
<div id="cse-search-results"></div>
<script type="text/javascript">
  var googleSearchIframeName = "cse-search-results";
  var googleSearchFormName = "cse-search-box";
  var googleSearchFrameWidth = 800;
  var googleSearchDomain = "www.google.com";
  var googleSearchPath = "/cse";
</script>
<script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script>

<?php

ssi_shutdown
();

?>





The problem is I'm getting this:

schmiesus

Fixed it by doing this in the results.php

<?php require("SSI.php"); 
$context['page_title_html_safe'] = 'Results';
template_header(); 
echo
'
<br />


<div id="cse-search-results"></div>
<script type="text/javascript">
  var googleSearchIframeName = "cse-search-results";
  var googleSearchFormName = "cse-search-box";
  var googleSearchFrameWidth = 800;
  var googleSearchDomain = "www.google.com";
  var googleSearchPath = "/cse";
</script>
<script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script>'
;

template_footer(); ?>

Advertisement: