Fork me on GitHub

Rapport de message :*
 

Re: Editeur Inbetween: tinyMCE est indéfini

Titre du sujet : Re: Editeur Inbetween: tinyMCE est indéfini
par vexin sur 08/03/2006 10:41:47

Salut,

effectivement il y a un problème et je me demande si cela ne vient pas de la bande de pub Lycos...

Il serait bon que quelqu'un qui a un compte Lycos essaye également Inbetween pour voir si cela vient de l'hébergeur.

Quant à mes fichiers les voici (mais pour avoir lu les tiens ça me semble être la même chose).

Fichier xoops_version.php
<?php
// $Id: xoops_version.php,v 1.1.1.1 2005/12/22 22:39:54 Christophe 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 //
//  ------------------------------------------------------------------------ //

$modversion['name'] = _MI_NEWS_NAME;
$modversion['version'] = 1.43;
$modversion['description'] = _MI_NEWS_DESC;
$modversion['credits'] = "The XOOPS Project, Christian, Pilou, Marco, ALL the members of the Newbb Team, GIJOE, Zoullou, Mithrandir, Setec Astronomy, Marcan, Anne";
$modversion['author'] = "The XOOPS Project Module Dev Team";
$modversion['help'] = "news.html";
$modversion['license'] = "GPL see LICENSE";
$modversion['official'] = 1;
$modversion['image'] = "images/news_slogo.png";
$modversion['dirname'] = "news";

$modversion['sqlfile']['mysql'] = "sql/mysql.sql";

// Tables created by sql file (without prefix!)
$modversion['tables'][0] = "stories";
$modversion['tables'][1] = "topics";
$modversion['tables'][2] = "stories_files";
$modversion['tables'][3] = "stories_votedata";

// Admin things
$modversion['hasAdmin'] = 1;
$modversion['adminindex'] = "admin/index.php";
$modversion['adminmenu'] = "admin/menu.php";

// Templates
$modversion['templates'][1]['file'] = 'news_item.html';
$modversion['templates'][1]['description'] = '';
$modversion['templates'][2]['file'] = 'news_archive.html';
$modversion['templates'][2]['description'] = '';
$modversion['templates'][3]['file'] = 'news_article.html';
$modversion['templates'][3]['description'] = '';
$modversion['templates'][4]['file'] = 'news_index.html';
$modversion['templates'][4]['description'] = '';
$modversion['templates'][5]['file'] = 'news_by_topic.html';
$modversion['templates'][5]['description'] = '';
$modversion['templates'][6]['file'] = 'news_by_this_author.html';
$modversion['templates'][6]['description'] = 'Shows a page resuming all the articles of the same author (according to the perms)';
$modversion['templates'][7]['file'] = 'news_ratenews.html';
$modversion['templates'][7]['description'] = 'Template used to rate a news';
$modversion['templates'][8]['file'] = 'news_rss.html';
$modversion['templates'][8]['description'] = 'Used for RSS per topics';

// Blocks
$modversion['blocks'][1]['file'] = "news_topics.php";
$modversion['blocks'][1]['name'] = _MI_NEWS_BNAME1;
$modversion['blocks'][1]['description'] = "Shows news topics";
$modversion['blocks'][1]['show_func'] = "b_news_topics_show";
$modversion['blocks'][1]['template'] = 'news_block_topics.html';

$modversion['blocks'][2]['file'] = "news_bigstory.php";
$modversion['blocks'][2]['name'] = _MI_NEWS_BNAME3;
$modversion['blocks'][2]['description'] = "Shows most read story of the day";
$modversion['blocks'][2]['show_func'] = "b_news_bigstory_show";
$modversion['blocks'][2]['template'] = 'news_block_bigstory.html';

$modversion['blocks'][3]['file'] = "news_top.php";
$modversion['blocks'][3]['name'] = _MI_NEWS_BNAME4;
$modversion['blocks'][3]['description'] = "Shows top read news articles";
$modversion['blocks'][3]['show_func'] = "b_news_top_show";
$modversion['blocks'][3]['edit_func'] = "b_news_top_edit";
$modversion['blocks'][3]['options'] = "counter|10|25|0|0|0|0||1||||||";
$modversion['blocks'][3]['template'] = 'news_block_top.html';

$modversion['blocks'][4]['file'] = "news_top.php";
$modversion['blocks'][4]['name'] = _MI_NEWS_BNAME5;
$modversion['blocks'][4]['description'] = "Shows recent articles";
$modversion['blocks'][4]['show_func'] = "b_news_top_show";
$modversion['blocks'][4]['edit_func'] = "b_news_top_edit";
$modversion['blocks'][4]['options'] = "published|10|25|0|0|0|0||1||||||";
$modversion['blocks'][4]['template'] = 'news_block_top.html';        // news_block_recent.html

$modversion['blocks'][5]['file'] = "news_moderate.php";
$modversion['blocks'][5]['name'] = _MI_NEWS_BNAME6;
$modversion['blocks'][5]['description'] = "Shows a block to moderate articles";
$modversion['blocks'][5]['show_func'] = "b_news_topics_moderate";
$modversion['blocks'][5]['template'] = 'news_block_moderate.html';

$modversion['blocks'][6]['file'] = "news_topicsnav.php";
$modversion['blocks'][6]['name'] = _MI_NEWS_BNAME7;
$modversion['blocks'][6]['description'] = "Shows a block to navigate topics";
$modversion['blocks'][6]['show_func'] = "b_news_topicsnav_show";
$modversion['blocks'][6]['template'] = 'news_block_topicnav.html';
$modversion['blocks'][6]['options'] = "0";
$modversion['blocks'][6]['edit_func'] = "b_news_topicsnav_edit";

$modversion['blocks'][7]['file'] = "news_randomnews.php";
$modversion['blocks'][7]['name'] = _MI_NEWS_BNAME8;
$modversion['blocks'][7]['description'] = "Shows a block where news appears randomly";
$modversion['blocks'][7]['show_func'] = "b_news_randomnews_show";
$modversion['blocks'][7]['template'] = 'news_block_randomnews.html';
$modversion['blocks'][7]['options'] = "published|10|25|0|0";
$modversion['blocks'][7]['edit_func'] = "b_news_randomnews_edit";

// Menu
$modversion['hasMain'] = 1;

$cansubmit 0;

/**
* This part inserts the selected topics as sub items in the Xoops main menu
*/
$module_handler =& xoops_gethandler('module');
$module =& $module_handler->getByDirname($modversion['dirname']);
if (
$module) {
    global 
$xoopsUser;
    if (
is_object($xoopsUser)) {
        
$groups $xoopsUser->getGroups();
    } else {
        
$groups XOOPS_GROUP_ANONYMOUS;
    }
    
$gperm_handler =& xoops_gethandler('groupperm');
    if (
$gperm_handler->checkRight("news_submit"0$groups$module->getVar('mid'))) {
          
$cansubmit 1;
    }
}

// ************
$i 1;
global 
$xoopsDB$xoopsUser$xoopsConfig$xoopsModule$xoopsModuleConfig;
// We try to "win" some time
// 1)  Check to see it the module is the current module
if (is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $modversion['dirname'] && $xoopsModule->getVar('isactive'))
{
    
// 2) If there's no topics to display as sub menus we can go on
    
$sql "SELECT COUNT(*) as cpt FROM ".$xoopsDB->prefix("topics")." WHERE menu=1";
    
$result $xoopsDB->query($sql);
    list(
$count) = $xoopsDB->fetchRow($result);
    if(
$count>0) {
        include_once 
XOOPS_ROOT_PATH."/class/tree.php";
        include_once 
XOOPS_ROOT_PATH."/modules/news/class/class.newstopic.php";
        include_once 
XOOPS_ROOT_PATH."/modules/news/include/functions.php";
        
$xt = new NewsTopic();
        
$allTopics $xt->getAllTopics(getmoduleoption('restrictindex'));
        
$topic_tree = new XoopsObjectTree($allTopics'topic_id''topic_pid');
        
$topics_arr $topic_tree->getAllChild(0);
        if (
$module) {
            foreach (
$topics_arr as $onetopic) {
                if (
$gperm_handler->checkRight('news_view'$onetopic->topic_id(), $groups$xoopsModule->getVar('mid')) && $onetopic->menu()) {
                    
$modversion['sub'][$i]['name'] = $onetopic->topic_title();
                      
$modversion['sub'][$i]['url'] = "index.php?storytopic=" $onetopic->topic_id();
                   }
                   
$i++;
               }
        }
        unset(
$xt);
    }
}

$modversion['sub'][$i]['name'] = _MI_NEWS_SMNAME2;
$modversion['sub'][$i]['url'] = "archive.php";
if (
$cansubmit) {
    
$i++;
    
$modversion['sub'][$i]['name'] = _MI_NEWS_SMNAME1;
    
$modversion['sub'][$i]['url'] = "submit.php";
}
unset(
$cansubmit);

// Search
$modversion['hasSearch'] = 1;
$modversion['search']['file'] = "include/search.inc.php";
$modversion['search']['func'] = "news_search";

// Comments
$modversion['hasComments'] = 1;
$modversion['comments']['pageName'] = 'article.php';
$modversion['comments']['itemName'] = 'storyid';
// Comment callback functions
$modversion['comments']['callbackFile'] = 'include/comment_functions.php';
$modversion['comments']['callback']['approve'] = 'news_com_approve';
$modversion['comments']['callback']['update'] = 'news_com_update';

/**
* Select the number of news items to display on top page
*/
$modversion['config'][1]['name'] = 'storyhome';
$modversion['config'][1]['title'] = '_MI_STORYHOME';
$modversion['config'][1]['description'] = '_MI_STORYHOMEDSC';
$modversion['config'][1]['formtype'] = 'select';
$modversion['config'][1]['valuetype'] = 'int';
$modversion['config'][1]['default'] = 5;
$modversion['config'][1]['options'] = array('5' => 5'10' => 10'15' => 15'20' => 20'25' => 25'30' => 30);

/**
* Format of the date to use in the module, if you don't specify anything then the default date's format will be used
*/
$modversion['config'][2]['name'] = 'dateformat';
$modversion['config'][2]['title'] = '_MI_NEWS_DATEFORMAT';
$modversion['config'][2]['description'] = '_MI_NEWS_DATEFORMAT_DESC';
$modversion['config'][2]['formtype'] = 'texbox';
$modversion['config'][2]['valuetype'] = 'text';
$modversion['config'][2]['default'] = "";

/**
* Display a navigation's box on the pages ?
* This navigation's box enable you to jump from one topic to another
*/
$modversion['config'][3]['name'] = 'displaynav';
$modversion['config'][3]['title'] = '_MI_DISPLAYNAV';
$modversion['config'][3]['description'] = '_MI_DISPLAYNAVDSC';
$modversion['config'][3]['formtype'] = 'yesno';
$modversion['config'][3]['valuetype'] = 'int';
$modversion['config'][3]['default'] = 1;

/*
$modversion['config'][4]['name'] = 'anonpost';
$modversion['config'][4]['title'] = '_MI_ANONPOST';
$modversion['config'][4]['description'] = '';
$modversion['config'][4]['formtype'] = 'yesno';
$modversion['config'][4]['valuetype'] = 'int';
$modversion['config'][4]['default'] = 0;
*/

/**
* Auto approuve submited stories
*/
$modversion['config'][5]['name'] = 'autoapprove';
$modversion['config'][5]['title'] = '_MI_AUTOAPPROVE';
$modversion['config'][5]['description'] = '_MI_AUTOAPPROVEDSC';
$modversion['config'][5]['formtype'] = 'yesno';
$modversion['config'][5]['valuetype'] = 'int';
$modversion['config'][5]['default'] = 0;

/**
* Dispay layout, classic or by topics
*/
$modversion['config'][6]['name'] = 'newsdisplay';
$modversion['config'][6]['title'] = '_MI_NEWSDISPLAY';
$modversion['config'][6]['description'] = '_MI_NEWSDISPLAYDESC';
$modversion['config'][6]['formtype'] = 'select';
$modversion['config'][6]['valuetype'] = 'text';
$modversion['config'][6]['default'] = "Classic";
$modversion['config'][6]['options'] = array('_MI_NEWSCLASSIC' => 'Classic','_MI_NEWSBYTOPIC' => 'Bytopic');

/**
* How to display Author's name, username, full name or nothing ?
*/
$modversion['config'][7]['name'] = 'displayname';
$modversion['config'][7]['title'] = '_MI_NAMEDISPLAY';
$modversion['config'][7]['description'] = '_MI_ADISPLAYNAMEDSC';
$modversion['config'][7]['formtype'] = 'select';
$modversion['config'][7]['valuetype'] = 'int';
$modversion['config'][7]['default'] = 1;
$modversion['config'][7]['options']    = array('_MI_DISPLAYNAME1' => 1'_MI_DISPLAYNAME2' => 2'_MI_DISPLAYNAME3' => 3);

/**
* Number of columns to use to display news
*/
$modversion['config'][8]['name'] = 'columnmode';
$modversion['config'][8]['title'] = '_MI_COLUMNMODE';
$modversion['config'][8]['description'] = '_MI_COLUMNMODE_DESC';
$modversion['config'][8]['formtype'] = 'select';
$modversion['config'][8]['valuetype'] = 'int';
$modversion['config'][8]['default'] = 1;
$modversion['config'][8]['options'] = array(=> 1=> 2=> 3=> 4=> 5);

/**
* Number of news and topics to display in the module's admin part
*/
$modversion['config'][9]['name'] = 'storycountadmin';
$modversion['config'][9]['title'] = '_MI_STORYCOUNTADMIN';
$modversion['config'][9]['description'] = '_MI_STORYCOUNTADMIN_DESC';
$modversion['config'][9]['formtype'] = 'select';
$modversion['config'][9]['valuetype'] = 'int';
$modversion['config'][9]['default'] = 10;
$modversion['config'][9]['options'] = array('5' => 5'10' => 10'15' => 15'20' => 20'25' => 25'30' => 30'35' => 35'40' => 40);

/**
* Authorized groups to upload
*/
$modversion['config'][10]['name'] = 'uploadgroups';
$modversion['config'][10]['title'] = '_MI_UPLOADGROUPS';
$modversion['config'][10]['description'] = '_MI_UPLOADGROUPS_DESC';
$modversion['config'][10]['formtype'] = 'select';
$modversion['config'][10]['valuetype'] = 'int';
$modversion['config'][10]['default'] = 2;
$modversion['config'][10]['options'] = array('_MI_UPLOAD_GROUP1' => 1'_MI_UPLOAD_GROUP2' => 2'_MI_UPLOAD_GROUP3' => 3);

/**
* MAX Filesize Upload in kilo bytes
*/
$modversion['config'][11]['name'] = 'maxuploadsize';
$modversion['config'][11]['title'] = '_MI_UPLOADFILESIZE';
$modversion['config'][11]['description'] = '_MI_UPLOADFILESIZE_DESC';
$modversion['config'][11]['formtype'] = 'texbox';
$modversion['config'][11]['valuetype'] = 'int';
$modversion['config'][11]['default'] = 1048576;

/**
* Restrict Topics on Index Page
*
* This is one of the mot important option in the module.
* If you set it to No, then the users can see the introduction's text of each
* story even if they don't have the right to see the topic attached to the news.
* If you set it to Yes then you can only see what you have the right to see.
* Many of the permissions are based on this option.
*/
$modversion['config'][12]['name'] = 'restrictindex';
$modversion['config'][12]['title'] = '_MI_RESTRICTINDEX';
$modversion['config'][12]['description'] = '_MI_RESTRICTINDEXDSC';
$modversion['config'][12]['formtype'] = 'yesno';
$modversion['config'][12]['valuetype'] = 'int';
$modversion['config'][12]['default'] = 0;

/**
* Do you want to enable your visitors to see all the other articles
* created by the author they are currently reading ?
*/
$modversion['config'][13]['name'] = 'newsbythisauthor';
$modversion['config'][13]['title'] = '_MI_NEWSBYTHISAUTHOR';
$modversion['config'][13]['description'] = '_MI_NEWSBYTHISAUTHORDSC';
$modversion['config'][13]['formtype'] = 'yesno';
$modversion['config'][13]['valuetype'] = 'int';
$modversion['config'][13]['default'] = 0;

/**
* If you set this option to yes then you will see two links at the bottom
* of each article. The first link will enable you to go to the previous
* article and the other link will bring you to the next article
*/
$modversion['config'][14]['name'] = 'showprevnextlink';
$modversion['config'][14]['title'] = '_MI_NEWS_PREVNEX_LINK';
$modversion['config'][14]['description'] = '_MI_NEWS_PREVNEX_LINK_DESC';
$modversion['config'][14]['formtype'] = 'yesno';
$modversion['config'][14]['valuetype'] = 'int';
$modversion['config'][14]['default'] = 0;

/**
* Do you want to see a summary table at the bottom of each article ?
*/
$modversion['config'][15]['name'] = 'showsummarytable';
$modversion['config'][15]['title'] = '_MI_NEWS_SUMMARY_SHOW';
$modversion['config'][15]['description'] = '_MI_NEWS_SUMMARY_SHOW_DESC';
$modversion['config'][15]['formtype'] = 'yesno';
$modversion['config'][15]['valuetype'] = 'int';
$modversion['config'][15]['default'] = 0;

/**
* Do you enable author's to edit their posts ?
*/
$modversion['config'][16]['name'] = 'authoredit';
$modversion['config'][16]['title'] = '_MI_NEWS_AUTHOR_EDIT';
$modversion['config'][16]['description'] = '_MI_NEWS_AUTHOR_EDIT_DESC';
$modversion['config'][16]['formtype'] = 'yesno';
$modversion['config'][16]['valuetype'] = 'int';
$modversion['config'][16]['default'] = 1;

/**
* Do you want to enable your visitors to rate news ?
*/
$modversion['config'][17]['name'] = 'ratenews';
$modversion['config'][17]['title'] = "_MI_NEWS_RATE_NEWS";
$modversion['config'][17]['description'] = "";
$modversion['config'][17]['formtype'] = 'yesno';
$modversion['config'][17]['valuetype'] = 'int';
$modversion['config'][17]['default'] = 0;

/**
* You can set RSS feeds per topic
*/
$modversion['config'][18]['name'] = 'topicsrss';
$modversion['config'][18]['title'] = "_MI_NEWS_TOPICS_RSS";
$modversion['config'][18]['description'] = "_MI_NEWS_TOPICS_RSS_DESC";
$modversion['config'][18]['formtype'] = 'yesno';
$modversion['config'][18]['valuetype'] = 'int';
$modversion['config'][18]['default'] = 0;

/**
* If you set this option to yes then the approvers can type the keyword
* and description's meta datas
*/
$modversion['config'][19]['name'] = 'metadata';
$modversion['config'][19]['title'] = "_MI_NEWS_META_DATA";
$modversion['config'][19]['description'] = "_MI_NEWS_META_DATA_DESC";
$modversion['config'][19]['formtype'] = 'yesno';
$modversion['config'][19]['valuetype'] = 'int';
$modversion['config'][19]['default'] = 0;

/**
* Editor to use
*/
$modversion['config'][20]['name'] = 'form_options';
$modversion['config'][20]['title'] = "_MI_NEWS_FORM_OPTIONS";
$modversion['config'][20]['description'] = '_MI_NEWS_FORM_OPTIONS_DESC';
$modversion['config'][20]['formtype'] = 'select';
$modversion['config'][20]['valuetype'] = 'text';
$modversion['config'][20]['options'] = array(
                                            
_MI_NEWS_FORM_DHTML=>'dhtml',
                                            
_MI_NEWS_FORM_COMPACT=>'textarea',
                                            
_MI_NEWS_FORM_SPAW=>'spaw',
                                            
_MI_NEWS_FORM_HTMLAREA=>'htmlarea',
                                            
_MI_NEWS_FORM_KOIVI=>'koivi',
                                            
_MI_NEWS_FORM_FCK=>'fck',
                                            
'inbetween'=>'InBetween'
                                            
);
$modversion['config'][20]['default'] = 'dhtml';

/**
* If you set this option to Yes then the keywords entered in the
* search will be highlighted in the articles.
*/
$modversion['config'][21]['name'] = 'keywordshighlight';
$modversion['config'][21]['title'] = "_MI_NEWS_KEYWORDS_HIGH";
$modversion['config'][21]['description'] = "_MI_NEWS_KEYWORDS_HIGH_DESC";
$modversion['config'][21]['formtype'] = 'yesno';
$modversion['config'][21]['valuetype'] = 'int';
$modversion['config'][21]['default'] = 0;

/**
* If you have enabled the previous option then with this one
* you can select the color to use to highlight words
*/
$modversion['config'][22]['name'] = 'highlightcolor';
$modversion['config'][22]['title'] = '_MI_NEWS_HIGH_COLOR';
$modversion['config'][22]['description'] = '_MI_NEWS_HIGH_COLOR_DES';
$modversion['config'][22]['formtype'] = 'texbox';
$modversion['config'][22]['valuetype'] = 'text';
$modversion['config'][22]['default'] = "#FFFF80";

/**
* Tooltips, or infotips are some small textes you can see when you
* move your mouse over an article's title. This text contains the
* first (x) characters of the story
*/
$modversion['config'][23]['name'] = 'infotips';
$modversion['config'][23]['title'] = '_MI_NEWS_INFOTIPS';
$modversion['config'][23]['description'] = '_MI_NEWS_INFOTIPS_DES';
$modversion['config'][23]['formtype'] = 'texbox';
$modversion['config'][23]['valuetype'] = 'int';
$modversion['config'][23]['default'] = "0";

/**
* This option is specific to Mozilla/Firefox and Opera
* Both of them can display a toolbar wich contains buttons to
* go from article to article. It can show other information too
*/
$modversion['config'][24]['name'] = 'sitenavbar';
$modversion['config'][24]['title'] = "_MI_NEWS_SITE_NAVBAR";
$modversion['config'][24]['description'] = "_MI_NEWS_SITE_NAVBAR_DESC";
$modversion['config'][24]['formtype'] = 'yesno';
$modversion['config'][24]['valuetype'] = 'int';
$modversion['config'][24]['default'] = 0;

/**
* With this option you can select the skin (apparence) to use for the blocks containing tabs
*/
$modversion['config'][25]['name'] = 'tabskin';
$modversion['config'][25]['title'] = "_MI_NEWS_TABS_SKIN";
$modversion['config'][25]['description'] = "_MI_NEWS_TABS_SKIN_DESC";
$modversion['config'][25]['formtype'] = 'select';
$modversion['config'][25]['valuetype'] = 'int';
$modversion['config'][25]['options'] = array(
                                            
_MI_NEWS_SKIN_1=>1,
                                            
_MI_NEWS_SKIN_2=>2,
                                            
_MI_NEWS_SKIN_3=>3,
                                            
_MI_NEWS_SKIN_4=>4,
                                            
_MI_NEWS_SKIN_5=>5,
                                            
_MI_NEWS_SKIN_6=>6,
                                            
_MI_NEWS_SKIN_7=>7,
                                            
_MI_NEWS_SKIN_8=>8
                                            
);
$modversion['config'][25]['default'] = 6;



// Notification
$modversion['hasNotification'] = 1;
$modversion['notification']['lookup_file'] = 'include/notification.inc.php';
$modversion['notification']['lookup_func'] = 'news_notify_iteminfo';

$modversion['notification']['category'][1]['name'] = 'global';
$modversion['notification']['category'][1]['title'] = _MI_NEWS_GLOBAL_NOTIFY;
$modversion['notification']['category'][1]['description'] = _MI_NEWS_GLOBAL_NOTIFYDSC;
$modversion['notification']['category'][1]['subscribe_from'] = array('index.php''article.php');

$modversion['notification']['category'][2]['name'] = 'story';
$modversion['notification']['category'][2]['title'] = _MI_NEWS_STORY_NOTIFY;
$modversion['notification']['category'][2]['description'] = _MI_NEWS_STORY_NOTIFYDSC;
$modversion['notification']['category'][2]['subscribe_from'] = array('article.php');
$modversion['notification']['category'][2]['item_name'] = 'storyid';
$modversion['notification']['category'][2]['allow_bookmark'] = 1;

$modversion['notification']['event'][1]['name'] = 'new_category';
$modversion['notification']['event'][1]['category'] = 'global';
$modversion['notification']['event'][1]['title'] = _MI_NEWS_GLOBAL_NEWCATEGORY_NOTIFY;
$modversion['notification']['event'][1]['caption'] = _MI_NEWS_GLOBAL_NEWCATEGORY_NOTIFYCAP;
$modversion['notification']['event'][1]['description'] = _MI_NEWS_GLOBAL_NEWCATEGORY_NOTIFYDSC;
$modversion['notification']['event'][1]['mail_template'] = 'global_newcategory_notify';
$modversion['notification']['event'][1]['mail_subject'] = _MI_NEWS_GLOBAL_NEWCATEGORY_NOTIFYSBJ;

$modversion['notification']['event'][2]['name'] = 'story_submit';
$modversion['notification']['event'][2]['category'] = 'global';
$modversion['notification']['event'][2]['admin_only'] = 1;
$modversion['notification']['event'][2]['title'] = _MI_NEWS_GLOBAL_STORYSUBMIT_NOTIFY;
$modversion['notification']['event'][2]['caption'] = _MI_NEWS_GLOBAL_STORYSUBMIT_NOTIFYCAP;
$modversion['notification']['event'][2]['description'] = _MI_NEWS_GLOBAL_STORYSUBMIT_NOTIFYDSC;
$modversion['notification']['event'][2]['mail_template'] = 'global_storysubmit_notify';
$modversion['notification']['event'][2]['mail_subject'] = _MI_NEWS_GLOBAL_STORYSUBMIT_NOTIFYSBJ;

$modversion['notification']['event'][3]['name'] = 'new_story';
$modversion['notification']['event'][3]['category'] = 'global';
$modversion['notification']['event'][3]['title'] = _MI_NEWS_GLOBAL_NEWSTORY_NOTIFY;
$modversion['notification']['event'][3]['caption'] = _MI_NEWS_GLOBAL_NEWSTORY_NOTIFYCAP;
$modversion['notification']['event'][3]['description'] = _MI_NEWS_GLOBAL_NEWSTORY_NOTIFYDSC;
$modversion['notification']['event'][3]['mail_template'] = 'global_newstory_notify';
$modversion['notification']['event'][3]['mail_subject'] = _MI_NEWS_GLOBAL_NEWSTORY_NOTIFYSBJ;

$modversion['notification']['event'][4]['name'] = 'approve';
$modversion['notification']['event'][4]['category'] = 'story';
$modversion['notification']['event'][4]['invisible'] = 1;
$modversion['notification']['event'][4]['title'] = _MI_NEWS_STORY_APPROVE_NOTIFY;
$modversion['notification']['event'][4]['caption'] = _MI_NEWS_STORY_APPROVE_NOTIFYCAP;
$modversion['notification']['event'][4]['description'] = _MI_NEWS_STORY_APPROVE_NOTIFYDSC;
$modversion['notification']['event'][4]['mail_template'] = 'story_approve_notify';
$modversion['notification']['event'][4]['mail_subject'] = _MI_NEWS_STORY_APPROVE_NOTIFYSBJ;
?>


et le fichier functions.php
<?php
// $Id: functions.php,v 1.5 2004/09/02 17:04:08 hthouzard 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 //
//  ------------------------------------------------------------------------ //
if (!defined('XOOPS_ROOT_PATH')) {
    die(
"XOOPS root path not defined");
}

/**
 * Returns a module's option
 *
 * Return's a module's option (for the news module)
 *
 * @package News
 * @author Hervé Thouzard (www.herve-thouzard.com)
 * @copyright    (c) The Xoops Project - www.xoops.org
 * @param string $option    module option's name
 */
function getmoduleoption($option$repmodule='news')
{
    global 
$xoopsModuleConfig$xoopsModule;
    static 
$tbloptions= Array();
    if(
is_array($tbloptions) && array_key_exists($option,$tbloptions)) {
        return 
$tbloptions[$option];
    }

    
$retval=false;
    if (isset(
$xoopsModuleConfig) && (is_object($xoopsModule) && $xoopsModule->getVar('dirname') == $repmodule && $xoopsModule->getVar('isactive'))) {
        if(isset(
$xoopsModuleConfig[$option])) {
            
$retval$xoopsModuleConfig[$option];
        }
    } else {
        
$module_handler =& xoops_gethandler('module');
        
$module =& $module_handler->getByDirname($repmodule);
        
$config_handler =& xoops_gethandler('config');
        if (
$module) {
            
$moduleConfig =& $config_handler->getConfigsByCat(0$module->getVar('mid'));
            if(isset(
$moduleConfig[$option])) {
                
$retval$moduleConfig[$option];
            }
        }
    }
    
$tbloptions[$option]=$retval;
    return 
$retval;
}


/**
 * Updates rating data in item table for a given item
 *
 * @package News
 * @author Hervé Thouzard (www.herve-thouzard.com)
 * @copyright (c) The Xoops Project - www.xoops.org
*/
function news_updaterating($storyid)
{
    global 
$xoopsDB;
    
$query "SELECT rating FROM ".$xoopsDB->prefix("stories_votedata")." WHERE storyid = ".$storyid."";
    
$voteresult $xoopsDB->query($query);
    
$votesDB $xoopsDB->getRowsNum($voteresult);
    
$totalrating 0;
    while(list(
$rating)=$xoopsDB->fetchRow($voteresult)){
        
$totalrating += $rating;
    }
    
$finalrating $totalrating/$votesDB;
    
$finalrating number_format($finalrating4);
    
$sql sprintf("UPDATE %s SET rating = %u, votes = %u WHERE storyid = %u"$xoopsDB->prefix("stories"), $finalrating$votesDB$storyid);
    
$xoopsDB->queryF($sql);
}



/**
 * Internal function for permissions
 *
 * Returns a list of all the permitted topics Ids for the current user
 *
 * @return array $topics    Permitted topics Ids
 *
 * @package News
 * @author Hervé Thouzard (www.herve-thouzard.com)
 * @copyright (c) The Xoops Project - www.xoops.org
*/
function MygetItemIds($permtype='news_view')
{
    global 
$xoopsUser;
    static 
$tblperms= Array();
    if(
is_array($tblperms) && array_key_exists($permtype,$tblperms)) {
        return 
$tblperms[$permtype];
    }

       
$module_handler =& xoops_gethandler('module');
       
$newsModule =& $module_handler->getByDirname('news');
       
$groups is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
       
$gperm_handler =& xoops_gethandler('groupperm');
       
$topics $gperm_handler->getItemIds($permtype$groups$newsModule->getVar('mid'));
       
$tblperms[$permtype] = $topics;
    return 
$topics;
}

function 
news_html2text($document)
{
    
// PHP Manual:: function preg_replace
    // $document should contain an HTML document.
    // This will remove HTML tags, javascript sections
    // and white space. It will also convert some
    // common HTML entities to their text equivalent.

    
$search = array ("'<script[^>]*?>.*?</script>'si",  // Strip out javascript
                     
"'<[/!]*?[^<>]*?>'si",          // Strip out HTML tags
                     
"'([rn])[s]+'",                // Strip out white space
                     
"'&(quot|#34);'i",                // Replace HTML entities
                     
"'&(amp|#38);'i",
                     
"'&(lt|#60);'i",
                     
"'&(gt|#62);'i",
                     
"'&(nbsp|#160);'i",
                     
"'&(iexcl|#161);'i",
                     
"'&(cent|#162);'i",
                     
"'&(pound|#163);'i",
                     
"'&(copy|#169);'i",
                     
"'&#(d+);'e");                    // evaluate as php

    
$replace = array ("",
                     
"",
                     
"\1",
                     
""",
                     "
&",
                     "
<",
                     "
>",
                     " ",
                     chr(161),
                     chr(162),
                     chr(163),
                     chr(169),
                     "
chr(\1)");

    
$text = preg_replace($search$replace$document);
    return 
$text;
}


/**
 * Retreive an editor according to the module's option "
form_options"
 */
function &news_getWysiwygForm(
$caption$name$value = "", $width = '100%', $height = '400px', $supplemental='')
{
    
$editor = false;
    
$x22=false;
    
$xv=str_replace('XOOPS ','',XOOPS_VERSION);
    if(substr(
$xv,2,1)=='2') {
        
$x22=true;
    }
    
$editor_configs=array();
    
$editor_configs["name"] =$name;
    
$editor_configs["value"] = $value;
    
$editor_configs["rows"] = 35;
    
$editor_configs["cols"] = 60;
    
$editor_configs["width"] = "100%";
    
$editor_configs["height"] = "400px";


    switch(strtolower(getmoduleoption('form_options'))){
    case "
spaw":
        if(!
$x22) {
            if (is_readable(XOOPS_ROOT_PATH . "
/class/spaw/formspaw.php"))    {
                include_once(XOOPS_ROOT_PATH . "
/class/spaw/formspaw.php");
                
$editor = new XoopsFormSpaw($caption$name$value);
            }
        } else {
            
$editor = new XoopsFormEditor($caption, "spaw", $editor_configs);
        }
        break;

    case "
fck":
        if(!
$x22) {
            if ( is_readable(XOOPS_ROOT_PATH . "
/class/fckeditor/formfckeditor.php"))    {
                include_once(XOOPS_ROOT_PATH . "
/class/fckeditor/formfckeditor.php");
                
$editor = new XoopsFormFckeditor($caption$name$value);
            }
        } else {
            
$editor = new XoopsFormEditor($caption, "fckeditor", $editor_configs);
        }
        break;

    case "
htmlarea":
        if(!
$x22) {
            if ( is_readable(XOOPS_ROOT_PATH . "
/class/htmlarea/formhtmlarea.php"))    {
                include_once(XOOPS_ROOT_PATH . "
/class/htmlarea/formhtmlarea.php");
                
$editor = new XoopsFormHtmlarea($caption$name$value);
            }
        } else {
            
$editor = new XoopsFormEditor($caption, "htmlarea", $editor_configs);
        }
        break;

    case "
dhtml":
        if(!
$x22) {
            
$editor = new XoopsFormDhtmlTextArea($caption$name$value, 10, 50, $supplemental);
        } else {
            
$editor = new XoopsFormEditor($caption, "dhtmltextarea", $editor_configs);
        }
        break;

    case "
textarea":
        
$editor = new XoopsFormTextArea($caption$name$value);
        break;

    case "
koivi":
        if(!
$x22) {
            if ( is_readable(XOOPS_ROOT_PATH . "
/class/wysiwyg/formwysiwygtextarea.php"))    {
                include_once(XOOPS_ROOT_PATH . "
/class/wysiwyg/formwysiwygtextarea.php");
                
$editor = new XoopsFormWysiwygTextArea($caption$name$value, '100%', '400px', '');
            }
        } else {
            
$editor = new XoopsFormEditor($caption, "koivi", $editor_configs);
        }
        break;

    case "
inbetween":
            if ( is_readable(XOOPS_ROOT_PATH . "
/class/xoopseditor/inbetween/forminbetweentextarea.php"))
            {
                include_once(XOOPS_ROOT_PATH . "
/class/xoopseditor/inbetween/forminbetweentextarea.php");
                
$editor = new XoopsFormInbetweenTextArea(array('caption'=>$caption, 'name'=>$name, 'value'=>$value, 'width'=>'100%', 'height'=>'400px'));
            }
         else
         {
            
$editor = new XoopsFormEditor($caption, "koivi", $editor_configs);
         }
        break;
    }
    return 
$editor;
}

/**
 * Creates, for Mozilla/Netscape and Opera the site navigation's bar
 *
 * @package News
 * @author Hervé Thouzard (www.herve-thouzard.com)
 * @copyright (c) The Xoops Project - www.xoops.org
*/
function CreateSiteNavBar()
{
    global 
$xoopsConfig;
    
$content='';
    
$myts =& MyTextSanitizer::getInstance();
    include_once XOOPS_ROOT_PATH."
/modules/news/class/class.newstopic.php";
    
$content=sprintf("<link rel="Home" title="%s" href="%s/" />n",$xoopsConfig['sitename'],XOOPS_URL);
    
$content.=sprintf("<link rel="Contents" href="%s" />n",XOOPS_URL.'/modules/news/index.php');
    
$content.=sprintf("<link rel="Search" href="%s" />n",XOOPS_URL.'/search.php');
    
$content.=sprintf("<link rel="Glossary" href="%s" />n",XOOPS_URL.'/modules/news/archive.php');
    
$content.=sprintf("<link rel="%s" href="%s" />n",$myts->htmlSpecialChars(_NW_SUBMITNEWS),XOOPS_URL.'/modules/news/submit.php');
    
$content.=sprintf("<link rel="alternate" type="application/rss+xml" title="%s" href="%s/" />n",$xoopsConfig['sitename'],XOOPS_URL.'/backend.php');

    // create chapters
    include_once XOOPS_ROOT_PATH."
/class/tree.php";
    include_once XOOPS_ROOT_PATH."
/modules/news/class/class.newstopic.php";
    
$xt = new NewsTopic();
    
$allTopics = $xt->getAllTopics(getmoduleoption('restrictindex'));
    
$topic_tree = new XoopsObjectTree($allTopics, 'topic_id', 'topic_pid');
    
$topics_arr = $topic_tree->getAllChild(0);
    foreach (
$topics_arr as $onetopic) {
        
$content.=sprintf("<link rel="Chapter" title="%s" href="%s" />n",$onetopic->topic_title(),XOOPS_URL.'/modules/news/index.php?storytopic='.$onetopic->topic_id());
    }
    return(
$content);
}


/**
 * Create the meta keywords based on the content
 *
 * @package News
 * @author Hervé Thouzard (www.herve-thouzard.com)
 * @copyright (c) The Xoops Project - www.xoops.org
*/
function news_createmeta_keywords(
$content)
{
    
$tmp=array();
    // Search for the "
Minimum keyword length"
    if(isset(
$_SESSION['news_keywords_limit'])) {
        
$limit = $_SESSION['news_keywords_limit'];
    } else {
        
$config_handler =& xoops_gethandler('config');
        
$xoopsConfigSearch =& $config_handler->getConfigsByCat(XOOPS_CONF_SEARCH);
        
$limit=$xoopsConfigSearch['keyword_min'];
        
$_SESSION['news_keywords_limit']=$limit;
    }
    
$myts =& MyTextSanitizer::getInstance();
    
$content = str_replace ("<br />", " ", $content);
    
$content$myts->undoHtmlSpecialChars($content);
    
$content= strip_tags($content);
    
$content=strtolower($content);
    
$search_pattern=array("&nbsp;","t","rn","r","n",",",".","'",";",":",")","(",'"','?','!','{','}','[',']','<','>','/','+','-','_','\','*');
    
$replace_pattern=array(' ',' ',' ',' ',' ',' ',' ',' ','','','','','','','','','','','','','','','','','','','');
    
$content = str_replace($search_pattern$replace_pattern$content);
    
$keywords=explode(' ',$content);
    
$keywords=array_unique($keywords);

// Here is another method (if you use this method, remove the previous line 
$keywords=array_unique($keywords); ) :
//        the keywords order is made according to the reverse keywords frequency (so the less frequent words appear in first in the list)
/*
    
$keywords=array_count_values($keywords);
    //arsort(
$keywords);    // If you want to see the most frequent words to appear in first in the list, replace the following line with this one
    asort(
$keywords);
    
$keywords=array_keys($keywords);
*/
    foreach(
$keywords as $keyword) {
        if(strlen(
$keyword)>=$limit && !is_numeric($keyword)) {
            
$tmp[]=$keyword;
        }
    }
    
$tmp=array_slice($tmp,0,20);    // If you want to change the limit of keywords, change this number from 20 to what you want
    if(count(
$tmp)>0) {
        return implode(',',
$tmp);
    } else {
        if(!isset(
$config_handler) || !is_object($config_handler)) {
            
$config_handler =& xoops_gethandler('config');
        }
        
$xoopsConfigMetaFooter =& $config_handler->getConfigsByCat(XOOPS_CONF_METAFOOTER);
        return 
$xoopsConfigMetaFooter['meta_keywords'];
    }
}


/**
 * Remove module's cache
 *
 * @package News
 * @author Hervé Thouzard (www.herve-thouzard.com)
 * @copyright (c) The Xoops Project - www.xoops.org
*/
function updateCache() {
    global 
$xoopsModule;
    
$tpllist=array('news_item.html','news_archive.html','news_article.html','news_index.html','news_by_topic.html','news_by_this_author.html','news_ratenews.html','news_rss.html');
    include_once XOOPS_ROOT_PATH."
/class/xoopsblock.php";
    include_once XOOPS_ROOT_PATH.'/class/template.php';
    // Clear blocks cache
    xoops_template_clear_module_cache(
$xoopsModule->getVar('mid'));
    // Clear pages cache
    
$xoopsTpl = new XoopsTpl();
    foreach (
$tpllist as $onetemplate) {
        
$xoopsTpl->clear_cache('db:'.$onetemplate);
    }
}

/**
 * Verify that a mysql table exists
 *
 * @package News
 * @author Hervé Thouzard (www.herve-thouzard.com)
 * @copyright (c) The Xoops Project - www.xoops.org
*/
function TableExists(
$tablename)
{
    global 
$xoopsDB;
    
$result=$xoopsDB->queryF("SHOW TABLES LIKE '$tablename'");
    return(
$xoopsDB->getRowsNum($result) > 0);
}

/**
 * Verify that a field exists inside a mysql table
 *
 * @package News
 * @author Hervé Thouzard (www.herve-thouzard.com)
 * @copyright (c) The Xoops Project - www.xoops.org
*/
function FieldExists(
$fieldname,$table)
{
    global 
$xoopsDB;
    
$result=$xoopsDB->queryF("SHOW COLUMNS FROM    $table LIKE '$fieldname'");
    return(
$xoopsDB->getRowsNum($result) > 0);
}

/**
 * Add a field to a mysql table
 *
 * @package News
 * @author Hervé Thouzard (www.herve-thouzard.com)
 * @copyright (c) The Xoops Project - www.xoops.org
*/
function AddField(
$field$table)
{
    global 
$xoopsDB;
    
$result=$xoopsDB->queryF("ALTER TABLE " . $table . " ADD $field;");
    return 
$result;
}

/**
 * Verify that the current user is a member of the Admin group
 */
function is_admin_group()
{
    global 
$xoopsUser$xoopsModule;
    if(is_object(
$xoopsUser)) {
        if(in_array("
1",$xoopsUser->getGroups())) {
            return true;
        } else {
            if(
$xoopsUser->isAdmin($xoopsModule->mid())) {
                return true;
            } else {
                return false;
            }
        }
    } else {
        return false;
    }
}


/**
 * Verify if the current "
user" is a bot or not
 *
 * If you have a problem with this function, insert the folowing code just before the line if(isset(
$_SESSION['news_cache_bot'])) { :
 * return false;
 *
 * @package News
 * @author Hervé Thouzard (www.herve-thouzard.com)
 * @copyright (c) The Xoops Project - www.xoops.org
*/
function news_isbot()
{
    if(isset(
$_SESSION['news_cache_bot'])) {
        return 
$_SESSION['news_cache_bot'];
    } else {
        // Add here every bot you know separated by a pipe | (not matter with the upper or lower cases)
        // If you want to see the result for yourself, add your navigator's user agent at the end (mozilla for example)
        
$botlist="AbachoBOT|Arachnoidea|ASPSeek|Atomz|cosmos|crawl25-public.alexa.com|CrawlerBoy Pinpoint.com|Crawler|DeepIndex|EchO!|exabot|Excalibur Internet Spider|FAST-WebCrawler|Fluffy the spider|GAIS Robot/1.0B2|GaisLab data gatherer|Google|Googlebot-Image|googlebot|Gulliver|ia_archiver|Infoseek|Links2Go|Lycos_Spider_(modspider)|Lycos_Spider_(T-Rex)|MantraAgent|Mata Hari|Mercator|MicrosoftPrototypeCrawler|Mozilla@somewhere.com|MSNBOT|NEC Research Agent|NetMechanic|Nokia-WAPToolkit|nttdirectory_robot|Openfind|Oracle Ultra Search|PicoSearch|Pompos|Scooter|Slider_Search_v1-de|Slurp|Slurp.so|SlySearch|Spider|Spinne|SurferF3|Surfnomore Spider|suzuran|teomaagent1|TurnitinBot|Ultraseek|VoilaBot|vspider|W3C_Validator|Web Link Validator|WebTrends|WebZIP|whatUseek_winona|WISEbot|Xenu Link Sleuth|ZyBorg";
        
$botlist=strtoupper($botlist);
        
$currentagent=strtoupper(xoops_getenv('HTTP_USER_AGENT'));
        
$retval=false;
        
$botarray=explode('|',$botlist);
        foreach(
$botarray as $onebot) {
            if(strstr(
$currentagent,$onebot)) {
                
$retval=true;
                break;
            }
        }
    }
    
$_SESSION['news_cache_bot']=$retval;
    return 
$retval;
}


/**
 * Create an infotip
 *
 * @package News
 * @author Hervé Thouzard (www.herve-thouzard.com)
 * @copyright (c) The Xoops Project - www.xoops.org
*/
function make_infotips(
$text)
{
    
$infotips = getmoduleoption('infotips');
    if(
$infotips>0) {
        
$myts =& MyTextSanitizer::getInstance();
        return 
$myts->htmlSpecialChars(xoops_substr(strip_tags($text),0,$infotips));
    }
}
?>


Mais je crains fort que cela ne résolve pas ton problème
Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

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