Fork me on GitHub






Interference News-Smartmedia
Aspirant
Inscrit: 11/05/2006 00:29
Messages: 57
quand je clique sur les liens figurant dans les bloc top articles et articles recent il m'affiche une page blanche,
de meme quand je clique sur module videos , page blanche

message erreur news :

Citation :
Fatal error: Cannot redeclare class keyhighlighter in /homepages/4/d166270541/htdocs/modules/smartmedia/class/keyhighlighter.class.php on line 26


solution de christian :

Citation :
Il semble que les deux modules ne peuvent fonctionner en étant tous les deux activés car ils appellent tous les deux un fichier identiques présents dans les deux modules.

il faudrait désactiver l'appel à cette class (class/keyhighlighter.class.php) dans l'un des deux modules en mettant la ligne concernée en commentaire (la faire précéder de //)


ce que je fais :

Citation :
<?php
/**
* This file contains the keyhighlighter class that highlight the chosen keyword in the current output buffer.
*
* @license GNU
* @author marcan <marcan@smartfactory.ca>
* @version $Id: keyhighlighter.class.php,v 1.3 2005/06/02 13:33:37 malanciault Exp $
* @link http://www.smartfactory.ca The SmartFactory
* @package SmartMedia
* @subpackage Search
*/

/**
* keyhighlighter class
*
* This class highlight the chosen keywords in the current output buffer
*
* @package SmartMedia
* @author Setec Astronomy
* @version 1.0
* @abstract Highlight specific keywords.
* @copyright 2004
* @link http://setecastronomy.stufftoread.com
*/

//class keyhighlighter {

/**
* @access private
*/
var $preg_keywords = '';
/**
* @access private
*/
var $keywords = '';
/**
* @access private
*/
var $singlewords = false;
/**
* @access private
*/
var $replace_callback = null;

var $content;

/**
* Main constructor
*
* This is the main constructor of keyhighlighter class. <br />
* It's the only public method of the class.
* @param string $keywords the keywords you want to highlight
* @param bool $singlewords specify if it has to highlight also the single words.
* @param callback $replace_callback a custom callback for keyword highlight.
* <code>
* <?php
* require ('keyhighlighter.class.php');
*
* function my_highlighter ($matches) {
* return '<span style="font-weight: bolder; color: #FF0000;">' . $matches[0] . '</span>';
* }
*
* new keyhighlighter ('W3C', false, 'my_highlighter');
* readfile ('http://www.w3c.org/');
* ?>
* </code>
*/
// public function __construct ()
function keyhighlighter ($keywords, $singlewords = false, $replace_callback = null ) {
$this->keywords = $keywords;
$this->singlewords = $singlewords;
$this->replace_callback = $replace_callback;
}

/**
* @access private
*/
function replace ($replace_matches) {

$patterns = array ();
if ($this->singlewords) {
$keywords = explode (' ', $this->preg_keywords);
foreach ($keywords as $keyword) {
$patterns[] = '/' . '>' . $keyword . '+)/si';
}
} else {
$patterns[] = '/' . '>' . $this->preg_keywords . '+)/si';
}

$result = $replace_matches[0];

foreach ($patterns as $pattern) {
if (!is_null ($this->replace_callback)) {
$result = preg_replace_callback ($pattern, $this->replace_callback, $result);
} else {
$result = preg_replace ($pattern, '<span class="highlightedkey">\\0</span>', $result);
}
}

return $result;
}

/**
* @access private
*/
function highlight ($buffer) {
$buffer = '>' . $buffer . '<';
$this->preg_keywords = preg_replace ('/[^\w ]/si', '', $this->keywords);
$buffer = preg_replace_callback ("/(\>((" . ">[^><]+)|R))*)\<)/is", array (&$this, 'replace'), $buffer);
$buffer = substr ($buffer, 1, -1);
return $buffer;
}
}

?>


donc ok pour les news mais le smartmedia de marche toujours pas.

message d'erreur :

Citation :
Fatal error: Call to a member function on a non-object in /homepages/4/d166270541/htdocs/modules/smartmedia/blocks/clips_recent.php on line 22


Avez vous une solution ??? :-o

Posté le : 17/07/2006 14:40

:xfsuper: www.riderz.eu :xfsuper:
Partager Twitter Partagez cette article sur GG+
Re: Interference News-Smartmedia
Guest_
La solution qui consiste à avoir fait cela génère une erreur fatale :
//class keyhighlighter {


Je vais voir avec Marcan si nous pouvons faire quelque chose.

Hervé

Posté le : 18/07/2006 11:43
Partager Twitter Partagez cette article sur GG+
Re: Interference News-Smartmedia
Aspirant
Inscrit: 11/05/2006 00:29
Messages: 57
merci à toi hervé

Posté le : 18/07/2006 12:44

Edité par yoann64 sur 19/07/2006 20:37:26
Edité par yoann64 sur 19/07/2006 20:38:18

:xfsuper: www.riderz.eu :xfsuper:
Partager Twitter Partagez cette article sur GG+
Re: Interference News-Smartmedia
Aspirant
Inscrit: 11/05/2006 00:29
Messages: 57
notez que ça a marché pendant 1 mois et sans raison ça ne marche plus

Posté le : 19/07/2006 20:38

:xfsuper: www.riderz.eu :xfsuper:
Partager Twitter Partagez cette article sur GG+
Re: Interference News-Smartmedia
Aspirant
Inscrit: 11/05/2006 00:29
Messages: 57
plz je n'arrive pas a regler ce pb j'ai desactiver puis reactiver mais sans resultats

Posté le : 22/07/2006 23:21

:xfsuper: www.riderz.eu :xfsuper:
Partager Twitter Partagez cette article sur GG+
Re: Interference News-Smartmedia
Aspirant
Inscrit: 11/05/2006 00:29
Messages: 57
:up:

Posté le : 30/07/2006 06:35

:xfsuper: www.riderz.eu :xfsuper:
Partager Twitter Partagez cette article sur GG+
Re: Interference News-Smartmedia
Guest_
Salut,

Je viens de faire un message sur le forum de Marcan :
http://smartfactory.ca/modules/newbb/ ... 252&start=0#forumpost5512

A+
Hervé

Posté le : 04/08/2006 10:28
Partager Twitter Partagez cette article sur GG+

 Haut   Précédent   Suivant



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

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