function theme_google_cse_results in Google Custom Search Engine 5
The search results page can be themed/customized.
1 theme call to theme_google_cse_results()
- google_cse_results in ./
google_cse.module - Render the search page and custom title.
File
- ./
google_cse.module, line 319 - Display a Google Custom Search Engine on your site.
Code
function theme_google_cse_results() {
$query = array(
'q' => $_GET['query'],
'cx' => variable_get('google_cse_cx', ''),
'cof' => 'FORID:0',
) + google_cse_advanced_settings();
$output = filter_xss_admin(variable_get('google_cse_results_prefix', ''));
$output .= drupal_get_form('google_cse_results_searchbox_form');
$output .= '<div id="google-cse-results">';
$output .= '<noscript>';
$output .= t('!google, or enable JavaScript to view them here.', array(
'!google' => l(t('View the results at Google'), 'http://www.google.com/cse', NULL, drupal_query_string_encode($query)),
));
$output .= '</noscript></div>
<script type="text/javascript">
//<![CDATA[
var googleSearchIframeName = "google-cse-results";
var googleSearchFormName = "google-cse-results-searchbox-form";
var googleSearchFrameWidth = ' . variable_get('google_cse_results_width', 600) . ';
var googleSearchFrameborder = 0;
var googleSearchDomain = "' . variable_get('google_cse_domain', 'google.com') . '";
var googleSearchPath = "/cse";
var googleSearchQueryString = "query";
//]]>
</script>
<script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script>';
$output .= filter_xss_admin(variable_get('google_cse_results_suffix', ''));
return $output;
}