<?php
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');

$thisplugin->add_filter('picture_url', 'custom_nopic_override');

function custom_nopic_override($pic_row) {
    global $CONFIG;

    if (!isset($pic_row['url']) || !$pic_row['system_icon']) {
        return $pic_row;
    }

    switch ($pic_row['mode']) {
        case 'thumb':
            $pic_row['url'] = 'plugins/custom_nopic/images/custom_thumb_nopic.png';
            $pic_row['pwidth']  = (int)$CONFIG['thumb_width'];
            $pic_row['pheight'] = (int)$CONFIG['thumb_height'];
            break;

      case 'normal':
    $pic_row['url']    = 'plugins/custom_nopic/images/custom_normal_nopic.png';
    break;
    
        case 'fullsize':
        default:
            $pic_row['url'] = 'plugins/custom_nopic/images/custom_full_nopic.png';
            break;
    }

    return $pic_row;
}
?>
