]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
Interface fix: add link to gsearch/ on normal search page
authormensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>
Thu, 4 Dec 2008 15:30:59 +0000 (15:30 +0000)
committermensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f>
Thu, 4 Dec 2008 15:30:59 +0000 (15:30 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@198 b3834d28-1941-0410-a4f8-b48e95affb8f

api/export_gcs.php
scuttle.css
search.php
templates/top.inc.php

index fd1121e3c5ad8bd192666809c27848f8db93952c..1040dd468eb3c8ba865a2bf855df688654da061d 100644 (file)
@@ -7,6 +7,11 @@
 //require_once('httpauth.inc.php');
 require_once('../header.inc.php');
 
+if($GLOBALS['enableGoogleCustomSearch'] == false) {
+    echo "Google Custom Search disabled. You can enable it into the config.inc.php file.";
+    die;
+}
+
 $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
 $userservice =& ServiceFactory::getServiceInstance('UserService');
 
index 2ab161624e94783209c4d5d3a8c063b4b415e1e0..271416a2934e5637148fcd680561a4d13b452a16 100644 (file)
@@ -45,6 +45,7 @@ select:focus,
 textarea:focus {
     border-color: #666;
 }
+p.tipMsg,
 p.error,
 p.success {
     border: 1px solid;
@@ -53,6 +54,11 @@ p.success {
     padding: 0.5em;
     width: 70%;
 }
+p.tipMsg {
+    background: #FFFF99;
+    border-color: #CC9900;
+    color: #CC9900;
+}
 p.error {
     background: #FCC;
     border-color: #966;
index ff3729ef261a529b2b92c1230d8777900d7186f9..273fc05ae7213122ece7dad45fa47b29e5c286af 100644 (file)
@@ -117,6 +117,9 @@ if (POST_TERMS != '') {
        // Save search
        $searchhistoryservice->addSearch($terms, $range, $bookmarks['total'], $currentUserId);
 
+       if($GLOBALS['enableGoogleCustomSearch']) {
+               $tplVars['tipMsg'] = T_('Unsatisfied? You can also try our ').'<a href="'.createUrl('gsearch/index').'">Google Custom Search page</a>.';
+       }
        $tplVars['rsschannels'] = array();
        $tplVars['page'] = $page;
        $tplVars['start'] = $start;
index 55f0aaae195ea44763b84830033bd3485ebe9f5f..9bce24fb1f84becc76f97a27ec714c7cd9be57e0 100644 (file)
@@ -53,4 +53,7 @@ if (isset($error) && $error!='') {
 if (isset($msg) && $msg!='') {
        echo '<p class="success">'. $msg ."</p>\n";
 }
+if (isset($tipMsg) && $tipMsg!='') {
+       echo '<p class="tipMsg">'. $tipMsg ."</p>\n";
+}
 ?>
\ No newline at end of file