Forum PHPBoost
• Support des modules » Galerie » [Réglé] Image aleatoire mini galerie disparues idem titre
1 2 »
Bonjourplus d'images aléatoires ds le mini galerie d'un seul coup
j'ai vide le cache FF et phpb essayer plusieures config ds la galerie rien , nada regenerer le cache ds galerie tjrs rien
en désespoir de cause j'ai recharge et écrasé le module galerie rien n'y fait je suis chez 1&1 pas de probleme jusqu present
ça m'était arrivé une fois il y a pas mal de temps et tout est revenu normal comme par enchantement
qq a une explication amis surtout une solution ?
cdlt
pat
Edité par patgame Le 17/02/11 à 15h37
j'ai vide le cache FF et phpb essayer plusieures config ds la galerie rien , nada regenerer le cache ds galerie tjrs rien
en désespoir de cause j'ai recharge et écrasé le module galerie rien n'y fait je suis chez 1&1 pas de probleme jusqu present
ça m'était arrivé une fois il y a pas mal de temps et tout est revenu normal comme par enchantement
qq a une explication amis surtout une solution ?
cdlt
pat
Edité par patgame Le 17/02/11 à 15h37
Je crois savoir quel est le problème.
Si par hasard tu enlève les ' à tout tes titres d'images, ça donne quoi ? Ça marche non ?
Si par hasard tu enlève les ' à tout tes titres d'images, ça donne quoi ? Ça marche non ?
euh pas d'accent j'ai déja été attrapé avec ça et j'ai trouvé tout seul ,si , si je progresse moqueur que tu es lol
par contre j'ai des tirets bas de ce genre lalal _ lalal mais normalement ça ne joue pas ?
pour être sérieux ce que je ne comprends pas c'est que j'ai rechargé a tout hasard le module galerie tout neuf de chez phpb aux grands maux les grands remèdes mais ça n'a pas changé le blème bizarre non ? comme panne
j'ai essayé de changer la config de la galerie vider le cache phpb et firefox régénerer les miniatures enfin tout comme indiqué quoi mais pas plus de résultats
par contre pas de probleme je vois les photos ds la galerie c'est juste le mini menu qui fait des siennes
Edité par patgame Le 17/02/11 à 19h30
par contre j'ai des tirets bas de ce genre lalal _ lalal mais normalement ça ne joue pas ?
pour être sérieux ce que je ne comprends pas c'est que j'ai rechargé a tout hasard le module galerie tout neuf de chez phpb aux grands maux les grands remèdes mais ça n'a pas changé le blème bizarre non ? comme panne
j'ai essayé de changer la config de la galerie vider le cache phpb et firefox régénerer les miniatures enfin tout comme indiqué quoi mais pas plus de résultats
par contre pas de probleme je vois les photos ds la galerie c'est juste le mini menu qui fait des siennes
Edité par patgame Le 17/02/11 à 19h30
Non je parle pas d'accents, je parle des ' du genre dans "Maria Luisa notre femme de caractère au rock et c'est tant mieux"
ça c'est ds le commentaire de la photo c'est pas le titre prorement dit qui lui est sur le ftp pics et thumbails:
maria luisa detoure.png
et je n'ai rien changé tout marchait tel que tu le vois en ce moment j'essaie de voir ça
et sur l'exemple que tu viens de donner moi je n 'ai pas de '
Edité par patgame Le 17/02/11 à 19h34
maria luisa detoure.png
et je n'ai rien changé tout marchait tel que tu le vois en ce moment j'essaie de voir ça
et sur l'exemple que tu viens de donner moi je n 'ai pas de '
Edité par patgame Le 17/02/11 à 19h34
A chaque endroit ou il y as un ' le script JS repère une erreur, essaye donc de ne pas en mettre pour voir (test).
ben non j'ai enlevé tous les accents les : les ' des titres que dalle , nada rien alors que tout marchait en l'état avant ???,
j 'aoi dit une connerie ça marche ????? alors comment se fait il qu avant ça marchait avec les accents etc ....
vider cache un coup de f5 et roulez jeunesse bizarre quand meme on passe en régle merci reidlos je vais finir par etre un expert du cms lol ( quoi il y a du chemin a faire ,! j'aime pas ton réalisme mdr)
cdlt
bonne soirée
pat
Edité par patgame Le 17/02/11 à 20h41
j 'aoi dit une connerie ça marche ????? alors comment se fait il qu avant ça marchait avec les accents etc ....
vider cache un coup de f5 et roulez jeunesse bizarre quand meme on passe en régle merci reidlos je vais finir par etre un expert du cms lol ( quoi il y a du chemin a faire ,! j'aime pas ton réalisme mdr)
cdlt
bonne soirée
pat
Edité par patgame Le 17/02/11 à 20h41
Fait voir ton fichier gallery_mini.php par contre s'il te plait. Parce que sur le fichier original il y as bien la protection.
ok je te poste ça
<?php
/*##################################################
* gallery_mini.php
* -------------------
* begin : August 03, 2005
* copyright : (C) 2005 Viarre Régis
* email : crowkait@phpboost.com
*
*
###################################################
*
* 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.
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
###################################################*/
if (defined('PHPBOOST') !== true) exit;
function gallery_mini($position, $block)
{
global $Cache, $User, $CAT_GALLERY, $CONFIG_GALLERY, $LANG, $_array_random_pics, $Sql;
$tpl = new Template('gallery/gallery_mini.tpl');
import('core/menu_service');
MenuService::assign_positions_conditions($tpl, $block);
//Chargement de la langue du module.
load_module_lang('gallery');
$Cache->load('gallery'); //Requête des configuration générales (gallery), $CONFIG_ALBUM variable globale.
//Affichage des miniatures disponibles
$i = 0;
$array_pics_mini = 'var array_pics_mini = new Array();' . "\n";
list($nbr_pics, $sum_height, $sum_width, $scoll_mode, $height_max, $width_max) = array(0, 0, 0, 0, 142, 142);
if (isset($_array_random_pics) && $_array_random_pics !== array())
{
if (!defined('READ_CAT_GALLERY'))
define('READ_CAT_GALLERY', 0x01);
$gallery_mini = array();
shuffle($_array_random_pics); //On mélange les éléments du tableau.
//Autorisations de la racine.
$CAT_GALLERY[0]['auth'] = $CONFIG_GALLERY['auth_root'];
//Vérification des autorisations.
$break = 0;
foreach ($_array_random_pics as $key => $array_pics_info)
{
if ($User->check_auth($CAT_GALLERY[$array_pics_info['idcat']]['auth'], READ_CAT_GALLERY))
{
$gallery_mini[] = $array_pics_info;
$break++;
}
if ($break == $CONFIG_GALLERY['nbr_pics_mini'])
break;
}
//Aucune photo ne correspond, on fait une requête pour vérifier.
if (count($gallery_mini) == 0)
{
$result = $Sql->query_while("SELECT g.id, g.name, g.path, g.width, g.height, g.idcat, gc.auth
FROM " . PREFIX . "gallery g
LEFT JOIN " . PREFIX . "gallery_cats gc on gc.id = g.idcat
WHERE g.aprob = 1 AND gc.aprob = 1
ORDER BY RAND()
" . $Sql->limit(0, $CONFIG_GALLERY['nbr_pics_mini']), __LINE__, __FILE__);
$_array_random_pics = $Sql->fetch_assoc($result);
//Vérification des autorisations.
$break = 0;
foreach ($_array_random_pics as $key => $array_pics_info)
{
if ($User->check_auth($CAT_GALLERY[$array_pics_info['idcat']]['auth'], READ_CAT_GALLERY))
{
$gallery_mini[] = $array_pics_info;
$break++;
}
if ($break == $CONFIG_GALLERY['nbr_pics_mini'])
break;
}
}
switch ($CONFIG_GALLERY['scroll_type'])
{
case 0:
$tpl->assign_vars(array(
'C_FADE' => true
));
break;
case 1:
$tpl->assign_vars(array(
'C_VERTICAL_SCROLL' => true
));
break;
case 2:
$tpl->assign_vars(array(
'C_HORIZONTAL_SCROLL' => true
));
break;
case 3:
$tpl->assign_vars(array(
'C_STATIC' => true
));
break;
}
include_once(PATH_TO_ROOT . '/gallery/gallery.class.php');
$Gallery = new Gallery;
foreach ($gallery_mini as $key => $row)
{
//Si la miniature n'existe pas (cache vidé) on regénère la miniature à partir de l'image en taille réelle.
if (!is_file(PATH_TO_ROOT . '/gallery/pics/thumbnails/' . $row['path']))
$Gallery->Resize_pics(PATH_TO_ROOT . '/gallery/pics/' . $row['path']); //Redimensionnement + création miniature
// On recupère la hauteur et la largeur de l'image.
if ($row['width'] == 0 || $row['height'] == 0)
list($row['width'], $row['height']) = @getimagesize(PATH_TO_ROOT . '/gallery/pics/thumbnails/' . $row['path']);
if ($row['width'] == 0 || $row['height'] == 0)
list($row['width'], $row['height']) = array(142, 142);
$tpl->assign_block_vars('pics_mini', array(
'ID' => $i,
'PICS' => TPL_PATH_TO_ROOT . '/gallery/pics/thumbnails/' . $row['path'],
'NAME' => $row['name'],
'HEIGHT' => $row['height'],
'WIDTH' => $row['width'],
'U_PICS' => TPL_PATH_TO_ROOT . '/gallery/gallery' . url('.php?cat=' . $row['idcat'] . '&id=' . $row['id'], '-' . $row['idcat'] . '-' . $row['id'] . '.php')
));
$sum_height += $row['height'] + 5;
$sum_width += $row['width'] + 5;
$i++;
if ($CONFIG_GALLERY['scroll_type'] == 3)
break;
}
}
$tpl->assign_vars(array(
'SID' => SID,
'MODULE_DATA_PATH' => $tpl->get_module_data_path('gallery'),
'ARRAY_PICS' => $array_pics_mini,
'HEIGHT_DIV' => $CONFIG_GALLERY['height'],
'SUM_HEIGHT' => $sum_height + 10,
'HIDDEN_HEIGHT' => $CONFIG_GALLERY['height'] + 10,
'WIDTH_DIV' => $CONFIG_GALLERY['width'],
'SUM_WIDTH' => $sum_width + 30,
'HIDDEN_WIDTH' => ($CONFIG_GALLERY['width'] * 3) + 30,
'SCROLL_DELAY' => 0.2 * (11 - $CONFIG_GALLERY['speed_mini_pics']),
'L_RANDOM_PICS' => $LANG['random_img'],
'L_NO_RANDOM_PICS' => ($i == 0) ? '
' . $LANG['no_random_img'] . '
' : '',
'L_GALLERY' => $LANG['gallery']
));
return $tpl->parse(TEMPLATE_STRING_MODE);
}
?>
<?php
/*##################################################
* gallery_mini.php
* -------------------
* begin : August 03, 2005
* copyright : (C) 2005 Viarre Régis
* email : crowkait@phpboost.com
*
*
###################################################
*
* 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.
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
###################################################*/
if (defined('PHPBOOST') !== true) exit;
function gallery_mini($position, $block)
{
global $Cache, $User, $CAT_GALLERY, $CONFIG_GALLERY, $LANG, $_array_random_pics, $Sql;
$tpl = new Template('gallery/gallery_mini.tpl');
import('core/menu_service');
MenuService::assign_positions_conditions($tpl, $block);
//Chargement de la langue du module.
load_module_lang('gallery');
$Cache->load('gallery'); //Requête des configuration générales (gallery), $CONFIG_ALBUM variable globale.
//Affichage des miniatures disponibles
$i = 0;
$array_pics_mini = 'var array_pics_mini = new Array();' . "\n";
list($nbr_pics, $sum_height, $sum_width, $scoll_mode, $height_max, $width_max) = array(0, 0, 0, 0, 142, 142);
if (isset($_array_random_pics) && $_array_random_pics !== array())
{
if (!defined('READ_CAT_GALLERY'))
define('READ_CAT_GALLERY', 0x01);
$gallery_mini = array();
shuffle($_array_random_pics); //On mélange les éléments du tableau.
//Autorisations de la racine.
$CAT_GALLERY[0]['auth'] = $CONFIG_GALLERY['auth_root'];
//Vérification des autorisations.
$break = 0;
foreach ($_array_random_pics as $key => $array_pics_info)
{
if ($User->check_auth($CAT_GALLERY[$array_pics_info['idcat']]['auth'], READ_CAT_GALLERY))
{
$gallery_mini[] = $array_pics_info;
$break++;
}
if ($break == $CONFIG_GALLERY['nbr_pics_mini'])
break;
}
//Aucune photo ne correspond, on fait une requête pour vérifier.
if (count($gallery_mini) == 0)
{
$result = $Sql->query_while("SELECT g.id, g.name, g.path, g.width, g.height, g.idcat, gc.auth
FROM " . PREFIX . "gallery g
LEFT JOIN " . PREFIX . "gallery_cats gc on gc.id = g.idcat
WHERE g.aprob = 1 AND gc.aprob = 1
ORDER BY RAND()
" . $Sql->limit(0, $CONFIG_GALLERY['nbr_pics_mini']), __LINE__, __FILE__);
$_array_random_pics = $Sql->fetch_assoc($result);
//Vérification des autorisations.
$break = 0;
foreach ($_array_random_pics as $key => $array_pics_info)
{
if ($User->check_auth($CAT_GALLERY[$array_pics_info['idcat']]['auth'], READ_CAT_GALLERY))
{
$gallery_mini[] = $array_pics_info;
$break++;
}
if ($break == $CONFIG_GALLERY['nbr_pics_mini'])
break;
}
}
switch ($CONFIG_GALLERY['scroll_type'])
{
case 0:
$tpl->assign_vars(array(
'C_FADE' => true
));
break;
case 1:
$tpl->assign_vars(array(
'C_VERTICAL_SCROLL' => true
));
break;
case 2:
$tpl->assign_vars(array(
'C_HORIZONTAL_SCROLL' => true
));
break;
case 3:
$tpl->assign_vars(array(
'C_STATIC' => true
));
break;
}
include_once(PATH_TO_ROOT . '/gallery/gallery.class.php');
$Gallery = new Gallery;
foreach ($gallery_mini as $key => $row)
{
//Si la miniature n'existe pas (cache vidé) on regénère la miniature à partir de l'image en taille réelle.
if (!is_file(PATH_TO_ROOT . '/gallery/pics/thumbnails/' . $row['path']))
$Gallery->Resize_pics(PATH_TO_ROOT . '/gallery/pics/' . $row['path']); //Redimensionnement + création miniature
// On recupère la hauteur et la largeur de l'image.
if ($row['width'] == 0 || $row['height'] == 0)
list($row['width'], $row['height']) = @getimagesize(PATH_TO_ROOT . '/gallery/pics/thumbnails/' . $row['path']);
if ($row['width'] == 0 || $row['height'] == 0)
list($row['width'], $row['height']) = array(142, 142);
$tpl->assign_block_vars('pics_mini', array(
'ID' => $i,
'PICS' => TPL_PATH_TO_ROOT . '/gallery/pics/thumbnails/' . $row['path'],
'NAME' => $row['name'],
'HEIGHT' => $row['height'],
'WIDTH' => $row['width'],
'U_PICS' => TPL_PATH_TO_ROOT . '/gallery/gallery' . url('.php?cat=' . $row['idcat'] . '&id=' . $row['id'], '-' . $row['idcat'] . '-' . $row['id'] . '.php')
));
$sum_height += $row['height'] + 5;
$sum_width += $row['width'] + 5;
$i++;
if ($CONFIG_GALLERY['scroll_type'] == 3)
break;
}
}
$tpl->assign_vars(array(
'SID' => SID,
'MODULE_DATA_PATH' => $tpl->get_module_data_path('gallery'),
'ARRAY_PICS' => $array_pics_mini,
'HEIGHT_DIV' => $CONFIG_GALLERY['height'],
'SUM_HEIGHT' => $sum_height + 10,
'HIDDEN_HEIGHT' => $CONFIG_GALLERY['height'] + 10,
'WIDTH_DIV' => $CONFIG_GALLERY['width'],
'SUM_WIDTH' => $sum_width + 30,
'HIDDEN_WIDTH' => ($CONFIG_GALLERY['width'] * 3) + 30,
'SCROLL_DELAY' => 0.2 * (11 - $CONFIG_GALLERY['speed_mini_pics']),
'L_RANDOM_PICS' => $LANG['random_img'],
'L_NO_RANDOM_PICS' => ($i == 0) ? '
' . $LANG['no_random_img'] . '
' : '',
'L_GALLERY' => $LANG['gallery']
));
return $tpl->parse(TEMPLATE_STRING_MODE);
}
?>
jz viens d'aller sur ton site moi les images aléatoires sur ta page d'accueil défilent bien...
oui oui explications sur un des posts plus haut il fallait enlever des ' et des accents alors qu'avant cela marchait comme ça
c'est pour cela que l'on m a demandé je suppose le code du gallery mini php
mais c'est vrai tout est redevenu normal
merci de ton interet pour ce post
cordialement
pat
Edité par patgame Le 23/02/11 à 18h11
c'est pour cela que l'on m a demandé je suppose le code du gallery mini php
mais c'est vrai tout est redevenu normal
merci de ton interet pour ce post
cordialement
pat
Edité par patgame Le 23/02/11 à 18h11
C'est bizarre tu n'as pas le même fichier que sur le serveur.
Remplace ton fichier par :
http://phpboost.googlecode.com/hg/gallery/gallery_mini.php?r=3.0
Remplace ton fichier par :
http://phpboost.googlecode.com/hg/gallery/gallery_mini.php?r=3.0
Bonjour, j'ai exactement le même problème mais je ne peux pas modifier le titre des images... (Je ne peux le modifier qu'en passant directement dans la bdd).
Même en ayant retiré les ', ça bug encore.
Edité par zNoobs Le 02/04/11 à 17h53
Même en ayant retiré les ', ça bug encore.
Edité par zNoobs Le 02/04/11 à 17h53
Personne pour m'aider?
Pourquoi tu ne peux pas les modifier autrement ?
• Support des modules » Galerie » [Réglé] Image aleatoire mini galerie disparues idem titre
1 2 »
2 Utilisateurs en ligne :: 0 Administrateur, 0 Modérateur, 0 Membre et 2 Visiteurs
Utilisateurs en ligne: Aucun membre connecté
Utilisateurs en ligne: Aucun membre connecté
Répondre
Vous n'êtes pas autorisé à écrire dans cette catégorie





PHPBoost

Support
Téléchargements
Développement
Communauté















