I'm getting more errors about Undefined index: NAME.
At first it showed up when using the 'download_multi' plugin and when on a page with thumbnails:
Notice: Undefined index: NAME in /var/www/piwigo/plugins/download_multi/include/class.inc.php on line 248
Now when I load the "Most Commented" page from the 'Special' menu - put there by the 'Most Commented' plugin:
Undefined index: NAME in /var/www/piwigo/plugins/MostCommented/most_commented.php on line 59
The error repeats for every thumbnail present on the page.
Bill
Offline
hello
have you chosen to hide the name of thumbnails ?
Offline
Not yet. I can't find an option to do that. Is it in a plugin?
Bill
Offline
No it's in the config file : this file is golden for customization
Btw, have your pics names ?
Also can you copy/paste the code at the lines indicated in php files indicated : not just the lines but also some from before and after (Am I understandable ? sry for my English)
Offline
This message is in two parts:
1) Excuse me for being new to this. I don't know PHP and I don't know what config file to change. Please tell me what config file to change for taking out the display of the thumbnail names and what code to change.
2) This part is in two parts:
a) Code in 'download_multi/include/class.inc.php' around line 248
// Affiche l'entrée HTML du formulaire
function DmFormThumbnail() {
global $template;
$template->concat('PLUGIN_INDEX_CONTENT_BEGIN', '<form id="dl" action="#" name="DmForm" method="post">');
}
// Affiche les cases à cocher derrière le nom de l'image
function DmCategoryThumbnail($tpl_var) {
foreach($tpl_var as $cle=>$valeur) {
(Line 248) $tpl_var[$cle]['NAME'] = $tpl_var[$cle]['NAME'].' <input type="checkbox" name="id_images[]" value="'.$tpl_var[$cle]['ID'].'">';
}
return $tpl_var;
}
b) Code in 'MostCommented/most_commented.php' around line 59
// Affichage du nombre de commentaires si désactivé pour l'utilisateur
if (!$user['show_nb_comments'])
{
foreach ($tpl_thumbnails_var as $key => $row)
{
$query = 'SELECT COUNT(*) AS nb_comments
FROM '.COMMENTS_TABLE.'
WHERE image_id = '.$row['ID'].'
AND validated = "true";';
list($nb_comments) = mysql_fetch_array(pwg_query($query));
(line 59) $tpl_thumbnails_var[$key]['NAME'] = '(' . $nb_comments . ') ' . $tpl_thumbnails_var[$key]['NAME'];
}
}
return $tpl_thumbnails_var;
}
?>
Last edited by Billr (2011-07-20 18:31:50)
Offline
About the config file -which is not part of your problem I think- use the plugin Localfile editor and see the local one with this plugin
Do you have a link to your gallery in private if you want : i'll check your other problem with chrome
About this problem : the plugin works fine even with these errors displayed ?
Offline
I assume that the plugins work fine with the errors displayed.
With the 'download multi' plugin, there are occasional problems where clicking on links like "Select All" sometimes don't work.
Bill
Offline
Thanks to Flop25. He explained how these error notices were not bugs and that my theme, flop_mauve, uses config parameters.
Here's his suggestion:
You know these notice errors are just to prevent problems but there are not bug. So I recommend to put in local config only :
$conf['show_php_errors'] = E_ALL & ~E_NOTICE;
I did that and now I don't see the error messages. Of course, if I need to debug sometime, I will comment that out temporarily.
Bill
Offline