georgjaehnig / serchilo-drupal

Drupal profile running FindFind.it (previously: Serchilo)
https://www.findfind.it
GNU Affero General Public License v3.0
11 stars 3 forks source link
command-line drupal drupal-7 mysql php shortcuts

Serchilo / FindFind.it will be discontinued, presumably on December 31 2023.

Please migrate to its successor www.trovu.net

serchilo-drupal

Drupal profile running FindFind.it.

Install

Requirements

Preparations

# create a new directory, for instance serchilo/
# and change into it

mkdir serchilo
cd serchilo

# Download drupal with drush
drush dl --drupal-project-rename

# Change to profiles/
cd drupal/profiles/

# Get the Serchilo Drupal profile with submodules
git clone https://github.com/georgjaehnig/serchilo-drupal.git serchilo_profile
cd serchilo_profile
git submodule init
git submodule update
cd ../..

Your directory structure should now look like this:

serchilo/
  drupal/
    profiles/
      serchilo_profile/
      ...
    ...

Run Drupal installer

After installing Drupal


# Enable the theme
drush dl bootstrap
drush pm-enable bootstrap_serchilo -y

# Download Clone module manually because of its Namespace inconsistency
drush dl node_clone -y

# First Enable Serchilo features module
drush pm-enable serchilo_features -y

# ... then the module itself.
drush pm-enable serchilo -y
drush features-revert-all -y

To drupal/.htaccess, add:

# Console call
# must have 'query' parameter
RewriteCond %{QUERY_STRING} (^|&)query=
RewriteCond %{QUERY_STRING} !(^|&)status=not_found
RewriteCond %{REQUEST_URI} ^\/(n|u)\/.*
RewriteRule ^.*$ profiles/serchilo_profile/modules/serchilo/process/?page_type=console&call_type=%1 [L,QSA]

# Non-console call
RewriteCond %{QUERY_STRING} (^|&)(query|term|keyword)=
RewriteCond %{REQUEST_URI} ^\/(ajax|opensearch-suggestions|api|url)\/(n|u)\/.*
RewriteRule ^.*$ profiles/serchilo_profile/modules/serchilo/process/?page_type=%1&call_type=%2 [L,QSA]

# Send out Safari extension
AddType application/octet-stream .safariextz

# Apache Log settings
# Do not log command queries.
RewriteCond %{QUERY_STRING} query=
RewriteRule  (.*)   $1 [E=nolog:yes]
# Do not log autocomplete queries.
RewriteCond %{REQUEST_URI} ^/ajax/
RewriteCond %{QUERY_STRING} term=
RewriteRule  (.*)   $1 [E=nolog:yes]

That's it. You should now be able to see Serchilo in your browser at http://l.serchilo/.

Update

If you already have Serchilo installed and want to update the code and Serchilo's settings:

git pull
drush cache-clear all
drush pm-disable serchilo
drush pm-enable serchilo

Mailing list:

https://groups.google.com/d/forum/serchilo