I solve this running in the code (phocagallery.php) and inserting this in the line 779:
EDIT: UPDATING THE CODE (the old one had a bug that disallow you to show total and images on the same article...)
// Code for total number os images on a category, by MDK |
www.mdkcore.da.ru
if ($view == 'total'){
// select all the images from 'catid' category
$queryc = 'SELECT * FROM #__phocagallery WHERE catid = ' .$catid;
$db->setQuery($queryc);
$outcome_data = $db->loadObjectList();
$total_counter = 0; // a simple counter
foreach ($outcome_data as $key => $value) $total_counter++;
$output = '';
$output .= $total_counter; // and the output is the total number of images
}
//
and change the follow:
$output .= '</div>';
if ($float == '')
{
$output .= '<div style="clear:both"> </div>';
}
to
if (!isset($total_counter)){ // added this to prevent '</div>'
$output .= '</div>';
if ($float == '')
{
$output .= '<div style="clear:both"> </div>';
}
}
and now works displaying the images and the total on the same article...
this isn't the best way, but do what I need by now...
I can use it with this line in my articles:
{phocagallery view=total|categoryid=X}
where X is the number of the category that I want to show the total number of pics..
Thanks for the help and thanks a lot for this greatest module/plugins that is PhocaGallery!!!