diff --git a/gss.module b/gss.module index 959d87b..e19dd14 100644 --- a/gss.module +++ b/gss.module @@ -114,6 +114,11 @@ function gss_settings() { '#description' => t('Let the user filter the search result by labels. Click here to read more about search labels.', array('@link' => url('https://developers.google.com/custom-search/docs/ref_prebuiltlabels'))), '#default_value' => variable_get('gss_labels', TRUE), ); + $form['gss']['miscellaneous']['gss_number_of_results'] = array( + '#title' => t('Show number of results'), + '#type' => 'checkbox', + '#default_value' => variable_get('gss_number_of_results', TRUE), + ); $form['gss']['miscellaneous']['gss_info'] = array( '#title' => t('Show extra information for each search result'), '#type' => 'checkbox', diff --git a/includes/GoogleSiteSearch.inc b/includes/GoogleSiteSearch.inc index e4d8593..a5f3d88 100644 --- a/includes/GoogleSiteSearch.inc +++ b/includes/GoogleSiteSearch.inc @@ -417,7 +417,7 @@ class GoogleSiteSearch { $html .= ''; } - if($totalResults !== 0) { + if(variable_get('gss_number_of_results', TRUE) == 1 && $totalResults !== 0) { $html .= t('Shows @show_start to @show_end of approximately @totalResults hits', array('@show_start' => $show_start, '@show_end' => $show_end, '@totalResults' => $totalResults)); }