Fork me on GitHub




(1) 2 »


Impossible de créer un article sur SmartSection lorsque TinyEditor est installé
Semi pro
Inscrit: 05/02/2006 23:34
De Ile-de-France
Messages: 523
Bonjour à tous.

Je viens d’installer SmartSection et je n’arrivais pas à créer un article

Il n’y avait pas de zone de saisie sous le message :
Création d'un nouvel article
Remplissez le formulaire suivant pour créer un nouvel article.

Le problème se produit si l’on utilise TinyEditor


En supprimant

Class/xoopseditor

SmartSection Fonctionne

(Bien sûr à ce moment là on ne peut plus utiliser TinyEditor)

Quelqu’un a-t-il trouvé une solution pour utiliser SmartSection avec TinyEditor ?

@+
Z

Posté le : 16/04/2008 18:06
Partager Twitter Partagez cette article sur GG+
Re: Impossible de créer un article sur SmartSection lorsque TinyEditor est installé
Xoops accro
Inscrit: 25/11/2004 12:53
De 48400 Florac - France
Messages: 3370
Est-ce que tu as installé smartobject ?
Quel message en mode debug ?
Version de smartsection ?

Philippe.

Posté le : 16/04/2008 18:45
Partager Twitter Partagez cette article sur GG+
Re: Impossible de créer un article sur SmartSection lorsque TinyEditor est installé
Régulier
Inscrit: 14/06/2004 13:20
Messages: 374
Le problème est le même avec CBB 3.08.

En installant le framework et xoopseditor, tu écrases justement la class.

Donc c'est soit l'un, soit l'autre.

1. j'ai parié un carambar à celui qui réussi à faire fonctionner ensemble les différents editor de xoops (dont évidemment tinyeditor) avec : news et CBB 3.08, on peut donc rajouter smartsection.

2. je me demande comment cela sera pris en compte pour les prochaines versions puisque c'est le pack qui a été choisi. Quel avenir pour tinyeditor.

A l'écoute.

Posté le : 16/04/2008 21:32

Baronxoops d'accord, mais loin d'être le roi
Partager Twitter Partagez cette article sur GG+
Re: Impossible de créer un article sur SmartSection lorsque TinyEditor est installé
Xoops accro
Inscrit: 25/11/2004 12:53
De 48400 Florac - France
Messages: 3370
Je ne suis pas sûr d'avoir tout suivi !

Moi j'ai un (des) xoops 2.0.18 qui fonctionne avec Smartsection 2.13 et News 1.56 avec TinyEditor et Cbb 3.08 avec xoopseditor.

Philippe.

Posté le : 16/04/2008 22:11
Partager Twitter Partagez cette article sur GG+
Re: Impossible de créer un article sur SmartSection lorsque TinyEditor est installé
Régulier
Inscrit: 14/06/2004 13:20
Messages: 374
C'est une bonne nouvelle.

class/xoopseditor/xoopseditor.php

C'est lui qui pose problème.

Dans le package de tinyeditor, il pèse 4,693 Ko et voila le contenu :


<?php
// $Id: xoopseditor.php,v 1.1.2.4 2005/07/15 22:55:57 phppp Exp $
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
//                       <http://www.xoops.org/>   ... nbsp;   //
//  ------------------------------------------------------------------------ //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //
/**
 * XOOPS editor handler
 *
 * @author        phppp (D.J.)
 * @copyright    copyright (c) 2005 XOOPS.org
 *
 */
class XoopsEditorHandler
{
    var 
$root_path="";
    var 
$nohtml=false;

    function 
XoopsEditorHandler()
    {
        
$current_path __FILE__;
        if ( 
DIRECTORY_SEPARATOR != "/" $current_path str_replacestrpos$current_path"\\") ? "\\" DIRECTORY_SEPARATOR"/"$current_path);
        
$this->root_path dirname($current_path);
    }
    
    
/**
     * @param    string    $name  Editor name
     * @param    array     $options  editor options: $key=>$val
     * @param    string    $OnFailure  a pre-validated editor that will be used if the required editor is failed to create
     * @param    bool    $noHtml  dohtml disabled
     */
    
function &get($name ""$options null$noHtml=false$OnFailure "")
    {
        
$editor null;
        
$list =array_keys($this->getList($noHtml));
        if(!empty(
$name) && in_array($name$list)){
            
$editor = & $this->_loadEditor($name$options);
        }
        if(!
is_object($editor)){
            if(empty(
$OnFailure) || !in_array($OnFailure$list)){
                
$OnFailure $list[0];
            }
            
$editor = & $this->_loadEditor($OnFailure$options);
        }
        return 
$editor;
    }

    function &
getList($noHtml=false)
    {
        static 
$editors;
        if(!isset(
$editors)) {
            
$order = array();
            
$list XoopsLists::getDirListAsArray($this->root_path.'/');
            foreach(
$list as $item){
                if(
is_readable($this->root_path.'/'.$item.'/editor_registry.php')){
                    include(
$this->root_path.'/'.$item.'/editor_registry.php');
                    if(empty(
$config['order'])) continue;
                    
$editors[$config['name']] = $config;
                    
$order[] = $config['order'];
                }
            }
            
array_multisort($order$editors);
        }
        
$_list = array();
        foreach(
$editors as $name=>$item){
            if(!empty(
$noHtml)&&empty($item['nohtml'])) continue;
            
$_list[$name] = $item['title'];
        }
        return 
$_list;
    }

    function 
render(&$editor)
    {
        return 
$editor->render();
    }

    function 
setConfig(&$editor$options)
    {
        if(
method_exists($editor'setConfig')) {
            
$editor->setConfig($options);
        }else{
            foreach(
$options as $key=>$val){
                
$editor->$key $val;
            }
        }
    }

    function &
_loadEditor($name=""$options=null)
    {
        
$editor_path $this->root_path."/".$name;
        if(!
is_readable($editor_path."/editor_registry.php")) return false;
        include(
$editor_path."/editor_registry.php");
        if(empty(
$config['order'])) return null;
        include_once(
$config['file']);
        
$editor =& new $config['class']($options);
        return 
$editor;
    }
}
?>


Dans le package de xoopseditor (avec tinymce etc...), il pèse 3,669Ko et voila le contenu :
<?php
/**
 * Editor framework for XOOPS
 *
 * @copyright    The XOOPS project http://www.xoops.org/
 * @license        http://www.fsf.org/copyleft/gpl.html& ...  public license
 * @author        Taiwen Jiang (phppp or D.J.) <php_pp@hotmail.com>
 * @since        1.00
 * @version        $Id$
 * @package        xoopseditor
 */
class XoopsEditorHandler
{
    var 
$root_path "";
    var 
$nohtml false;
    var 
$allowed_editors = array();
    
    function 
XoopsEditorHandler()
    {
        include_once 
dirname(__FILE__)."/xoopseditor.inc.php";
        
$this->root_path xoopseditor_get_rootpath();
    }
    
    
/**
     * Access the only instance of this class
     *
     * @return    object
     *
     * @static
     * @staticvar   object
     */
    
function &getInstance()
    {
        static 
$instance;
        if (!isset(
$instance)) {
            
$instance = new XoopsEditorHandler();
        }
        return 
$instance;
    }
    
    
/**
     * @param    string    $name        Editor name which is actually the folder name
     * @param    array     $options    editor options: $key => $val
     * @param    string    $OnFailure  a pre-validated editor that will be used if the required editor is failed to create
     * @param    bool    $noHtml        dohtml disabled
     */
    
function &get($name ""$options null$noHtml false$OnFailure "")
    {
        if(
$editor $this->_loadEditor($name$options)) {
            return 
$editor;
        }
        
$list array_keys($this->getList($noHtml));
        
/*
        if(!empty($name) && in_array($name, $list)){
            $editor = $this->_loadEditor($name, $options);
        }
        */
        //if(!is_object($editor)){
            
if(empty($OnFailure) || !in_array($OnFailure$list)){
                
$OnFailure $list[0];
            }
            
$editor $this->_loadEditor($OnFailure$options);
        
//}
        
return $editor;
    }

    function &
getList($noHtml false)
    {
        if(@ include_once 
XOOPS_ROOT_PATH."/Frameworks/art/functions.ini.php") {
            
load_functions("cache");
            
$list mod_loadCacheFile("list""xoopseditor");
        }

        if(empty(
$list)) {
            
$list = array();
            
$order = array();
            require_once 
XOOPS_ROOT_PATH."/class/xoopslists.php";
            
$_list XoopsLists::getDirListAsArray($this->root_path.'/');
            foreach(
$_list as $item){
                if(@include 
$this->root_path.'/'.$item.'/editor_registry.php'){
                    if(empty(
$config['order'])) continue;
                    
$order[] = $config['order'];
                    
$list[$item] = array("title" => $config["title"], "nohtml" => @$config["nohtml"]);
                }
            }
            
array_multisort($order$list);
            if(
function_exists("mod_createCacheFile")) {
                
mod_createCacheFile($list"list""xoopseditor");
            }
        }
        
$editors array_keys($list);
        if(!empty(
$this->allowed_editors)) {
            
$editors array_intersect($editors$this->allowed_editors);
        }
        
$_list = array();
        foreach(
$editors as $name){
            if(!empty(
$noHtml) && empty($list[$name]['nohtml'])) continue;
            
$_list[$name] = $list[$name]['title'];
        }
        return 
$_list;
    }

    function 
render(&$editor)
    {
        return 
$editor->render();
    }

    function 
setConfig(&$editor$options)
    {
        if(
method_exists($editor'setConfig')) {
            
$editor->setConfig($options);
        }else{
            foreach(
$options as $key => $val){
                
$editor->$key $val;
            }
        }
    }

    function &
_loadEditor($name$options null)
    {
        
$editor null;
        if(empty(
$name)) return $editor;
        
$editor_path $this->root_path."/".$name;
        if(!include 
$editor_path."/editor_registry.php") return $editor;
        if(empty(
$config['order'])) return null;
        include_once 
$config['file'];
        
$editor =& new $config['class']($options);
        return 
$editor;
    }
}
?>


Moi c'est soit le package fonctionne avec CBB 3.08 mais pas tinyeditor, soit tiny marche mais j'ai une page blanche pour CBB.

Quel est le code de ton fichier phmo ?

Posté le : 17/04/2008 10:23

Baronxoops d'accord, mais loin d'être le roi
Partager Twitter Partagez cette article sur GG+
Re: Impossible de créer un article sur SmartSection lorsque TinyEditor est installé
Xoops accro
Inscrit: 25/11/2004 12:53
De 48400 Florac - France
Messages: 3370
A priori j'ai ça :

<?php
// $Id: xoopseditor.php,v 1.1.2.4 2005/07/15 22:55:57 phppp Exp $
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
//                       <http://www.xoops.org/>   ... nbsp;   //
//  ------------------------------------------------------------------------ //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //
/**
 * XOOPS editor handler
 *
 * @author        phppp (D.J.)
 * @copyright    copyright (c) 2005 XOOPS.org
 *
 */
class XoopsEditorHandler
{
    var 
$root_path="";
    var 
$nohtml=false;

    function 
XoopsEditorHandler()
    {
        
$current_path __FILE__;
        if ( 
DIRECTORY_SEPARATOR != "/" $current_path str_replacestrpos$current_path"\\") ? "\\" DIRECTORY_SEPARATOR"/"$current_path);
        
$this->root_path dirname($current_path);
    }
    
    
/**
     * @param    string    $name  Editor name
     * @param    array     $options  editor options: $key=>$val
     * @param    string    $OnFailure  a pre-validated editor that will be used if the required editor is failed to create
     * @param    bool    $noHtml  dohtml disabled
     */
    
function &get($name ""$options null$noHtml=false$OnFailure "")
    {
        
$editor null;
        
$list =array_keys($this->getList($noHtml));
        if(!empty(
$name) && in_array($name$list)){
            
$editor = & $this->_loadEditor($name$options);
        }
        if(!
is_object($editor)){
            if(empty(
$OnFailure) || !in_array($OnFailure$list)){
                
$OnFailure $list[0];
            }
            
$editor = & $this->_loadEditor($OnFailure$options);
        }
        return 
$editor;
    }

    function &
getList($noHtml=false)
    {
        static 
$editors;
        if(!isset(
$editors)) {
            
$order = array();
            
$list XoopsLists::getDirListAsArray($this->root_path.'/');
            foreach(
$list as $item){
                if(
is_readable($this->root_path.'/'.$item.'/editor_registry.php')){
                    include(
$this->root_path.'/'.$item.'/editor_registry.php');
                    if(empty(
$config['order'])) continue;
                    
$editors[$config['name']] = $config;
                    
$order[] = $config['order'];
                }
            }
            
array_multisort($order$editors);
        }
        
$_list = array();
        foreach(
$editors as $name=>$item){
            if(!empty(
$noHtml)&&empty($item['nohtml'])) continue;
            
$_list[$name] = $item['title'];
        }
        return 
$_list;
    }

    function 
render(&$editor)
    {
        return 
$editor->render();
    }

    function 
setConfig(&$editor$options)
    {
        if(
method_exists($editor'setConfig')) {
            
$editor->setConfig($options);
        }else{
            foreach(
$options as $key=>$val){
                
$editor->$key $val;
            }
        }
    }

    function &
_loadEditor($name=""$options=null)
    {
        
$editor_path $this->root_path."/".$name;
        if(!
is_readable($editor_path."/editor_registry.php")) return false;
        include(
$editor_path."/editor_registry.php");
        if(empty(
$config['order'])) return null;
        include_once(
$config['file']);
        
$editor =& new $config['class']($options);
        return 
$editor;
    }
}
?>


mais comme je n'ai pas de problème je ne me suis pas trop posé de questions.

Philippe.

Posté le : 17/04/2008 13:39
Partager Twitter Partagez cette article sur GG+
Re: Impossible de créer un article sur SmartSection lorsque TinyEditor est installé
Régulier
Inscrit: 14/06/2004 13:20
Messages: 374
Merci philippe,

à une ligne près, tu as le fichier qui va avec l'install de tinyeditor.

celle de tinyeditor :
if(!empty($noHtml)&&empty($item['nohtml'])) continue;


edit : il ne prend pas dans l'affichage du code mais il y a "§empty" à la place de "Obarré"

la tienne :
if(!empty($noHtml)&Ø($item['nohtml'])) continue;


Mais je pense que tu as du installer d'abord le package xoopseditor puis tu a écrasé par la suite avec tinyeditor.

Dés que j'aurais le temps, (pas avant une semaine), j'essaie d'installer en gardant le fichier de tiny.

En tout cas merci pour cette lueur d'espoir.

Posté le : 17/04/2008 14:24

Baronxoops d'accord, mais loin d'être le roi
Partager Twitter Partagez cette article sur GG+
Re: Impossible de créer un article sur SmartSection lorsque TinyEditor est installé
Semi pro
Inscrit: 05/02/2006 23:34
De Ile-de-France
Messages: 523
Merci de vos réponses :

@philippe

1) Je n'avais pas installé smartobject framework.
à quoi sert ce module ?

2) voici ce que me donne le mode debug
Fatal errorCannot redeclare getcurrentusersgroups() (previously declared in d:monsitemodulestinyeditorincludeinitcode.php:39in d:monsitemodulestinyeditorincludeinitcode.php on line 38
All errors 
(0queries (19blocks (0extra (0timers (3)


3) C'est la version 2.13 de Smart section que j'ai installée


@baronxoops

J'ai effectivement les mêmes fichiers que les tiens.
Cependant je viens de télécharger TinyeEditor_rc1 et...
Le fichier class/xoopseditor.php est maintenant le même que celui de xoopseditor.

J'utilise donc une version plus ancienne de TinyEditor et probablement toi aussi.
La version que j'utilise apparait comme étant une V1 mais...
si toutes les deux sont appelées version : v 1.15
(non visible en cliquant sur le (i) du module mais en comparant les fichiers module/tinyeditor/xoops_version.php)
On remarque que
$Id: xoops_version.php est différent
1.7 ou 1.8

la 1.7 est datée du 28/06/06
et la 1.8 du 11/07/06

la dernière version est la 1.8 alors que j'avais installé une 1.7

Ce qui m'embête c'est qu'il semblerait que Philippe ait lui aussi installé une 1.7 puisqu'il a la première version de xoopseditor.php
dans class/xoopseditor/

@tous
Je vais installer une 2.0.18 toute neuve avec la dernière version de TinyEditor et je vous dirai ce que ça donne...

Merci en tout cas.

@+
Z

Posté le : 17/04/2008 15:12
Partager Twitter Partagez cette article sur GG+
Re: Impossible de créer un article sur SmartSection lorsque TinyEditor est installé
Xoops accro
Inscrit: 25/11/2004 12:53
De 48400 Florac - France
Messages: 3370
J'ai ça :

* $Id: xoops_version.php,v 1.8 2006/07/11 15:19:21 frankblacksf Exp $
* Module: tinyeditor
* Version: v 1.15
* Author: ralf57
* tinyeditor-author: frankblack

Posté le : 17/04/2008 19:05
Partager Twitter Partagez cette article sur GG+
Re: Impossible de créer un article sur SmartSection lorsque TinyEditor est installé
Semi pro
Inscrit: 05/02/2006 23:34
De Ile-de-France
Messages: 523
Merci Philippe pour ta réactivité !

Tu as donc la version 1.8 !
Ce que je ne comprends pas c'est que j'ai téléchargé cette version tout à l'heure et que le fichier

/class/xoopseditor/xoopseditor.php

Correspond au second fichier que baronxoops nous à montré...

Je n'y comprends plus rien...

@+
Z

Posté le : 17/04/2008 19:19
Partager Twitter Partagez cette article sur GG+

 Haut   Précédent   Suivant
(1) 2 »



Vous pouvez voir les sujets.
Vous ne pouvez pas débuter de nouveaux sujets.
Vous ne pouvez pas répondre aux contributions.
Vous ne pouvez pas éditer vos contributions.
Vous ne pouvez pas effacez vos contributions.
Vous ne pouvez pas ajouter de nouveaux sondages.
Vous ne pouvez pas voter en sondage.
Vous ne pouvez pas attacher des fichiers à vos contributions.
Vous ne pouvez pas poster sans approbation.

Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

28 Personne(s) en ligne (23 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 28 | Plus ...