Warning: include(../plugins/glossaire/conf_defaut2.inc): Failed to open stream: No such file or directory in /home/freeguppyorg/sites/ghc.freeguppy.org/mobile/inc/inchead/glossaire_mob.inc on line 29

Warning: include(): Failed opening '../plugins/glossaire/conf_defaut2.inc' for inclusion (include_path='.:/opt/cpanel/ea-php80/root/usr/share/pear') in /home/freeguppyorg/sites/ghc.freeguppy.org/mobile/inc/inchead/glossaire_mob.inc on line 29

Warning: Undefined variable $res_group in /home/freeguppyorg/sites/ghc.freeguppy.org/mobile/inc/inchead/glossaire_mob.inc on line 33

Warning: Trying to access array offset on value of type null in /home/freeguppyorg/sites/ghc.freeguppy.org/mobile/inc/inchead/glossaire_mob.inc on line 33

Warning: include(../plugins/glossaire/gloss_inc1.inc): Failed to open stream: No such file or directory in /home/freeguppyorg/sites/ghc.freeguppy.org/mobile/inc/inchead/glossaire_mob.inc on line 36

Warning: include(): Failed opening '../plugins/glossaire/gloss_inc1.inc' for inclusion (include_path='.:/opt/cpanel/ea-php80/root/usr/share/pear') in /home/freeguppyorg/sites/ghc.freeguppy.org/mobile/inc/inchead/glossaire_mob.inc on line 36

Warning: include(../plugins/glossaire/gloss_mob_inc2.inc): Failed to open stream: No such file or directory in /home/freeguppyorg/sites/ghc.freeguppy.org/mobile/inc/inchead/glossaire_mob.inc on line 37

Warning: include(): Failed opening '../plugins/glossaire/gloss_mob_inc2.inc' for inclusion (include_path='.:/opt/cpanel/ea-php80/root/usr/share/pear') in /home/freeguppyorg/sites/ghc.freeguppy.org/mobile/inc/inchead/glossaire_mob.inc on line 37
Centre d aide GuppY

  Accueil 
Ré-écriture d'adresses pour les plugins

La ré-écriture d'adresses est prise en compte dans GuppY 5.0.

Elle s'implémente de cette manière :

- dans le dossier data/config/rules on place un fichier contenant les règles, il sera chargé en même temps que les règles GuppY.


Les règles s'écrivent suivant ce modèle :

RewriteRule ^plugins/mon_plugin/([a-z]{2})-(mon_sigle-1)$ plugins/mon_plugin/mon_script.php?lng=$1 [L]


Par exemple si on souhaite placer un bouton dans le menu, dans plugins/mon_plugin/plugin.inc on déclare l'adresse comme ceci :

$plugin_bar_url = $site['URLR'] == 'on' ? 'plugins/mon_plugin/'.$lng.'-mon_sigle-1' : 'mon_script.php?lng='.$lng;


On ajoute autant de règles que nécessaire en suivant ce principe.


Date de création : 02/03/2015 @ 16:39
Dernière modification : 02/03/2015 @ 16:39
Catégorie : Docs et Tutoriels
Page lue 16704 fois
Haut

© 2004-2024

Document généré en 0.02 seconde