I've created a quick and dirty hack to the Zoom Media Gallery to allow the admins to create new galleries and assign them to a user on the system other than themselves, based on userIDs (UID). This saves a lot of time if you have back-end restrictions that make it cumbersome to change rights, create galleries in the user's account, then change rights back.
Line references here are for ZMG v2.5.1 RC1, as installed on my systems. I run CB and Joomla.
Hack the file <siteinstallationdir>/components/com_zoom/www/admin/new.php in these two places:
1. On or near line 71 you should see the uid assignment, which defines the user account that the gallery will be created for:
$uid = $zoom->_CurrUID;
REPLACE that line with this code:
[code:1]
<!
/>
// if admin, allow choice of user gallery belongs to, otherwise, use current user
if ($zoom->_isAdmin) {
$uid = $uidx;
}else{
$uid = $zoom->_CurrUID;
}
<!
/>
[/code:1]
2. After making that change, you will need to put a new text entry box on the page to enter the new uid. After (now) line 160, which is the table definition for the entry boxes, INSERT this code, which adds a table row for the new uid entry (I chose to put it as the first entry box in my table - move it anywhere you want it):
[code:1]
<!
/>
<?php if ($zoom->_isAdmin) {
echo "<tr><td>" . "Assign to UserID: " . "</td><td>";
echo "<input class='inputbox' type='text' name='uidx' value='" . $zoom->_CurrUID . "' size='4'></td></tr>";
} ?>
<!
/>
[/code:1]
Now, this is a HACK and is not set up for language files, etc... but it gets the job done. To easily see your userIDs, (UID), usr the Members tab and find the user to whom you want assign the new gallery, and the number in the front of their name is their UID.
Works here. Good luck!!
Post edited by: huggy59, at: 2006/03/26 01:04