 includes/usercp_viewprofile.php  
$template->assign_vars(array( 
  
$sql = "SELECT count(*) AS total 
FROM " . ALBUM_TABLE . " 
WHERE pic_user_id = ".$profiledata['user_id']." 
AND pic_cat_id = 0"; 
$result = $db->sql_query($sql); 
if (!$result) 
{ 
message_die(GENERAL_ERROR, 'Unable to get attachment information.', '', __LINE__, __FILE__, $sql); 
} 
$rowfoto = $db->sql_fetchrow($result); 
if ( $rowfoto['total'] > 0 ) 
{ 
$totalfoto = '' . $rowfoto['total'] . ''; 
} else { 
$totalfoto = 0; 
} 

  
$template->assign_vars(array( 
  
'TOTAL_FOTO' => $totalfoto, 

  profile_view_body.tpl 
 
<a href="{U_PERSONAL_GALLERY}">{L_PERSONAL_GALLERY}</a> 
 [{TOTAL_FOTO}]
==========================================
BY Fantom / =WsW= 
     http://Sd.MiReX.Su :)  !!!!!!!!  