SPHIDER-PLUS est le moteur de recherche utilisé pour les sites intranets.
Pour les sites internet, rien à faire, PHoCEA utilise Google.
Générer la doc d'installation de SPHIDER-PLUS pour votre site en précisant les champs ci-dessous :
The following settings should be adjusted on the server :
Récupérer SPHIDER-PLUS
Copier/web/lsce/Phocea/sphider-plus
dans/web/lsce/sphider-plus
cd /web/lsce;
cp -r Phocea/sphider-plus .;
chown -R apache sphider-plus;
Créer un user pour écrire dans les tables MySQL
ouvrir le fichier sphider-plus/settings/database.php
et entrer le nom d'un user.
Créer le user dans MySQL
CREATE USER 'sphider'@'localhost' IDENTIFIED BY '***********';
GRANT USAGE ON * . * TO 'sphider'@'localhost' IDENTIFIED BY '***********'
Donner le droit CREATE à sur la base de données
GRANT SELECT, CREATE ON `lsce` . * TO 'sphider'@'localhost';
Ouvrir l'URL suivante à l'aide de votre navigateur
https://www.lsce.ipsl.fr/sphider-plus/admin/admin.php
(admin/admin)
Ce script va créer les tables dans votre base de données.
Ne vous inquiétez pas si il y a des erreurs sur cette page à ce stade.
Aller dans l'onglet Database->Configure. Préciser les paramètres pour le Host, le nom de la base, le préfixe pour le nom des tables.
Aller dans l'onglet Settings. Préciser les paramètres pour le Host, le nom de la base, le préfixe pour le nom des tables.
Ne pas oublier d'appuyer sur le bouton "save"
Donner les droits en écriture sur les tables
GRANT ALL PRIVILEGES ON `lsce`.`sp_addurl` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_banned` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_categories` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_domains` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_keywords` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_links` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_link_details` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_link_keyword0` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_link_keyword1` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_link_keyword2` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_link_keyword3` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_link_keyword4` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_link_keyword5` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_link_keyword6` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_link_keyword7` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_link_keyword8` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_link_keyword9` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_link_keyworda` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_link_keywordb` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_link_keywordc` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_link_keywordd` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_link_keyworde` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_link_keywordf` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_media` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_pending` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_query_log` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_real_log` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_sites` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_site_category` TO 'sphider'@'localhost';
GRANT ALL PRIVILEGES ON `lsce`.`sp_temp` TO 'sphider'@'localhost';
Supprimer ensuite le droit CREATE sur toute la base de données.
Lancer une indexation depuis l'onglet "Sites".
Indexation depuis votre navigateur
Cliquez sur l'onglet "Index
" pour lancer l'indexation.
Indexation avec la CRONTAB
30 18 * * * cd /web/lsce/sphider-plus/admin;php spider.php -u https://www.lsce.ipsl.fr -d 1 -r;
Exemple du formulaire de recherche à placer sur votre page d'accueil
<?php
// ========== SPHIDER-PLUS
$val="";
if( isset($_GET["query_t"]) ){
$val=$_GET["query_t"];
}
echo '
<form action="/sphider-plus/search.php" method="get" >
<div class="input-group">
<input type="text" name="query_t" class="form-control" value="'.$val.'" placeholder="Rechercher">
<div class="input-group-append">
<button class="btn btn-secondary" type="submit" id="button-addon2"><i class="fas fa-search "></i></button>
</div>
</div><!-- /input-group -->
<input type="hidden" name="search" value="1">
<input type="hidden" name="m_only" value="0">
<input type="hidden" name="type" value="and">
</form>';
// ========== /SPHIDER-PLUS
?>
Customiser la page de recherche
/sphider-plus/templates/html/010_html_header.html
: ajouter lien CSS Bootstrap
/sphider-plus/templates/html/020_search-form.html
/sphider-plus/templates/Pure/userstyles.css
#results font-size:150%, remplacer 1em/0.8em par 100%