It is just me or is the album pictures code wrong again? (im in the hospital right now on some strong pain meds and havent tested the code was just reading thro it but I believe that currently it only counts how many albums a user has and not how many pictures)
PHP Code:
//Albumpictures
$albumfield="visible";
if ($this->field_exists('album', 'picturecount')) $albumfield="picturecount";
if ($DoDebug==1) echo "<br/>Albumpictures";
if ($vbulletin->options['xperience_points_pc'] > 0)
{
$vmessagesq =$vbulletin->db->query_read("SELECT
COUNT($albumfield) AS cnt_pictures
FROM " . TABLE_PREFIX . "album
WHERE userid=".$user['userid']);
if ($vbulletin->db->num_rows($vmessagesq) > 0)
{
$vmessages = $vbulletin->db->fetch_array($vmessagesq);
$xperience['count_user_albumpictures'] = $vmessages['cnt_pictures']*$vbulletin->options['xperience_points_pc'];
}
}
Correct me if im wrong but shouldnt that be a sum not a count as you just made it now give points for each album instead of each picture (I could be wrong I am calling this from my memory for what I changed last time to fix it originally and I havent slept in 2-3 days). But from what I do remember that should be a SUM if I am remembering the table structure properly.