set_prefilter('picture_modify', 'addpayadminT');
}
function addpayadminT($content) {
$search = '#
#';
$replacement = '
{if $PABA}
{\'Photo added by\'|@translate} {$PABA}
{/if}
';
return preg_replace($search, $replacement, $content);
}
function addpayadminA() {
if (isset($_GET['image_id'])){
global $conf, $page, $template;
load_language('plugin.lang', PAB_PATH);
load_language('lang', PHPWG_ROOT_PATH.PWG_LOCAL_DIR, array('no_fallback'=>true, 'local'=>true) );
$query = 'select added_by FROM ' . IMAGES_TABLE . ' WHERE id = \''.$_GET['image_id'].'\';';
$result = pwg_query($query);
$row = pwg_db_fetch_assoc($result);
$userab=$row['added_by'];
$query = 'select '.$conf['user_fields']['username'].' AS username FROM ' . USERS_TABLE . ' WHERE '.$conf['user_fields']['id'].' = \''.$userab.'\';';
$result = pwg_query($query);
$row = pwg_db_fetch_assoc($result);
$pab=$row['username'];
$template->assign(array('PABA' => $pab,));
}
}
?>