Im working on postnuke port of a site, and wanted a repository for all the images on the site (well, except design). I found Photoshare to be the closest match, but I wasn't really happy with the image selector (I guess it would do for internal purposes, but we have a lot of users who can edit/add stuff). So I made this hack in pnuser.php:
[php]
/**
* Select image hack
*
* @author Erlend Halvorsen
* @return boolean
**/
function photoshare_user_selectimage( $args ) {
$imageId = pnVarCleanFromInput( 'iid' );
extract( $args );
echo '';
return true;
}
function photoshareGetImageMenu($folderID)
{
$imageDir = 'modules/' . photoshareModGetName() . '/pnimages';
$menu = array( array( 'title' => _PSVIEWIMAGE, 'image' => 'magnify.gif' ),
array( 'title' => _PSEDITIMAGE, 'image' => 'setting.gif' ),
array( 'title' => _PSDELETEIMAGE, 'image' => 'delete.gif' ),
array( 'title' => _PSROTATECIMAGE, 'image' => 'rotatec.gif' ),
array( 'title' => _PSROTATECCIMAGE, 'image' => 'rotatecc.gif' ),
array( 'title' => _PSSETMAINIMAGE, 'image' => 'greendot.gif' ) );
// Menu HTML setup
$menuHTML = "\n";
// Add URL for click action
$viewURL = pnModUrl('photoshare', 'user', 'showimages', array('fid' => $folderID, 'template' => 'slideshow'));
$editURL = pnModUrl('photoshare', 'user', 'editimage', array('fid' => $folderID));
$deleteURL = pnModUrl('photoshare', 'user', 'deleteimage', array('fid' => $folderID));
$rotatecURL = pnModUrl('photoshare', 'user', 'rotateimage', array('fid' => $folderID, 'dir' => 'c'));
$rotateccURL = pnModUrl('photoshare', 'user', 'rotateimage', array('fid' => $folderID, 'dir' => 'cc'));
$setMainURL = pnModUrl('photoshare', 'user', 'setmainimage', array('fid' => $folderID));
// select image hack
$selectImageURL = pnModUrl( 'photoshare', 'user', 'selectimage' );
$menuHTML .= "\n";
return $menuHTML;
}
[/php]
All changes are marked "select image hack".
Note: it seems the [php] funciton fucks up the markup. < and so on should of course be <, etc. Also, when I had the image before the code, the image disappeared, along with half my code. Time to change to PNphpBB? ;)
-Erlend