Raccourcis : Contenu - rubriques - sous rubriques
FR

Piste : erreurs-1.1 hall-of-fame 1.2.1 download 1.5 faq action-creation 1.2 1.4.x 1.1

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
Dernière révisionLes deux révisions suivantes
tutoriels:fckeditor [2007/08/30 08:36] – créée laurentfr:tutoriels:fckeditor [2008/12/08 22:07] – modification externe 127.0.0.1
Ligne 18: Ligne 18:
 <code bash> <code bash>
   php jelix.php --tutorfck createapp   php jelix.php --tutorfck createapp
-  php jelix.php --tutorfck createmodule tutorfck 
 </code> </code>
 Votre fichier de configuration defaultconfig.ini.php devrait avoir les valeurs suivantes: Votre fichier de configuration defaultconfig.ini.php devrait avoir les valeurs suivantes:
  
 <code ini> <code ini>
-  defaultModule = "tutorfck" +  startModule = "tutorfck" 
-  defaultAction = "default_index"+  startAction = "default:index" 
 + 
 +  [urlengine]
   engine        = simple   engine        = simple
   multiview     = off   multiview     = off
-  basePath      = "/tutorfck/www" 
-</code> 
- 
-Si il s'agit de Jelix 1.0beta2 ou précédente, vous devez modifier le basePath selon votre configuration.  Dans ce tutoriel Jelix à été installé dans le répertoire /jelix. Donc le basePath sera égale à  
-<code ini> 
-  basePath = "/jelix/tutorfck/www" 
 </code> </code>
  
Ligne 38: Ligne 33:
 Téléchargez le logiciel [[http://www.fckeditor.net/|FCKeditor]] Téléchargez le logiciel [[http://www.fckeditor.net/|FCKeditor]]
 Décompressez l'archive dans le répertoire /jelix/tutorfck/www/ Décompressez l'archive dans le répertoire /jelix/tutorfck/www/
 +
  
 ===== Création du plugin de template ===== ===== Création du plugin de template =====
-Dans le répertoire /jelix/tutorfck/plugins/ créez le répertoire "html"+  * Dans le répertoire /jelix/tutorfck/plugins/ créez le répertoire "tpl/html"
-Dans ce répertoire créez un fichier nommé function.fckeditor.php.+  Dans ce répertoire créez un fichier nommé //function.fckeditor.php//. 
 <code php> <code php>
   <?php   <?php
   require_once (JELIX_APP_WWW_PATH.'fckeditor/fckeditor.php');   require_once (JELIX_APP_WWW_PATH.'fckeditor/fckeditor.php');
      
-  function jtpl_function_fckeditor( $tpl, $contenu="aucun contenu" ) {+  function jtpl_function_html_fckeditor( $tpl, $contenu="aucun contenu" ) {
     $oFCKeditor = new FCKeditor('FCKeditor1') ;     $oFCKeditor = new FCKeditor('FCKeditor1') ;
-  +    $oFCKeditor->BasePath = $GLOBALS['gJConfig']->urlengine['basePath'] .'fckeditor/';    
-    /* Vous devez choisir et l'adapter à votre plate-forme l'un de ces 2 BasePath +
-    * En absolu, style : http://localhost/jelix/tutorfck/www/ +
-    *    pour un site local (localhost)  +
-    *    pour les moteurs d'url simple ou significant +
-    */ +
-    $oFCKeditor->BasePath = '/jelix/tutorfck/www/fckeditor/';    +
-    /* +
-    * En relatif, style : http://www.fck1.net/ +
-    *    pour un site virtual +
-    *    pour les moteurs d'url simple ou significant +
-    */ +
-    //$oFCKeditor->BasePath = '/fckeditor/';  +
-  +
     $oFCKeditor->Value = $contenu;     $oFCKeditor->Value = $contenu;
     $oFCKeditor->Create();      $oFCKeditor->Create();
Ligne 67: Ligne 51:
   ?>   ?>
 </code> </code>
-Il faut également modifier la ligne tplpluginsPath du fichier defaultconfig.ini.php. À la ligne tplpluginsPath __ajoutez__  
-  ,app:plugins/ 
  
-Pour en savoir plus sur les templates lisez l'article [[manuel:templates|"Le moteur de template jTpl"]] et sa section "Les plugins de templates".+Pour en savoir plus sur les templates lisez l'article [[fr:manuel-1.0:templates|"Le moteur de template jTpl"]] et sa section "Les plugins de templates".
  
  
 ===== Création du template ===== ===== Création du template =====
 +
 Créez un template demofck.tpl dans jelix/tutorfck/modules/tutorfck/templates/ Créez un template demofck.tpl dans jelix/tutorfck/modules/tutorfck/templates/
 <code php> <code php>
   <p>Intégration de FCKeditor module : tutorfck</p>   <p>Intégration de FCKeditor module : tutorfck</p>
      
-  <form action="{jurl 'tutorfck~default_index'}" method="post"> +  <form action="{formurl 'tutorfck~default:index'}" method="post"> 
-   +  <div>{formurlparam 'tutorfck~default:index'}</div> 
-  {fckeditor $mytext} +  <div>  {fckeditor $mytext} </div
-   +  <div> <input type="submit" value="Submit" /></div>
-  <br /> +
-  <input type="submit" value="Submit" />+
   </form>   </form>
 </code> </code>
Ligne 108: Ligne 89:
 ===== Comment appeler la page de démonstration de FCKeditor? ===== ===== Comment appeler la page de démonstration de FCKeditor? =====
 Dans la barre d'adresse : Dans la barre d'adresse :
-  http://localhost/jelix/tutorfck/www/index.php?module=tutorfck&action=default_index+  http://localhost/jelix/tutorfck/www/index.php?module=tutorfck&action=default:index
  
 Dans un template : Dans un template :
-  {jurl 'tutorfck~default_index'}+  {jurl 'tutorfck~default:index'}
  
  
Ligne 117: Ligne 98:
  
 ---- ----
-   * [[tutoriels:|Retour au sommaire des tutoriels]]+   * [[fr:tutoriels:|Retour au sommaire des tutoriels]]
  

fr/tutoriels/fckeditor.txt · Dernière modification : 2012/04/14 19:41 de laurent

Fils rss des changements récents dans le wiki Creative Commons License