Hi! I upgraded to cpg 1.5.44. Now, too much file information is exposed like file name, album name, file size and so on. I found a plugin to filter the file information exposed but that plugin is written for cpg 1.4.x. Can I still use that plugin?
Thanks for your response, Mathew
Assuming that you are referring to cpg1.4.x_plugin_display-fields_v1.3, it would need to be modified for GPG 1.5.
Thanks for your response! Yes, That's the one. Which modifications are needed? Is there another way to filter file information?
Add the following to the theme.php file for your theme:
function theme_html_picinfo(&$info)
{
global $lang_picinfo, $CONFIG, $CURRENT_PIC_DATA, $LINEBREAK;
$filter = array('Dimensions','Filesize'); //titles of fields that you don't want
if ($CONFIG['picinfo_movie_download_link']) {
$path_to_pic = $CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename'];
$mime_content = cpg_get_type($CURRENT_PIC_DATA['filename']);
if ($mime_content['content']=='movie') {
$info[$lang_picinfo['download_URL']] = '<a href="' . $CONFIG["ecards_more_pic_target"] . (substr($CONFIG["ecards_more_pic_target"], -1) == '/' ? '' : '/') . $path_to_pic.'">'. $lang_picinfo['movie_player'] .'</a>';
}
}
$html = '';
$html .= ' <tr><td colspan="2" class="tableh2">'.$lang_picinfo['title'].'</td></tr>' . $LINEBREAK;
$template = ' <tr><td class="tableb tableb_alternate" valign="top" >%s:</td><td class="tableb tableb_alternate">%s</td></tr>' . $LINEBREAK;
foreach ($info as $key => $value) {
if (in_array($key, $filter)) continue;
$html .= sprintf($template, $key, $value);
}
return $html;
}
Add titles to $filter for the items that you don't want displayed.