Quote:
Originally Posted by JulienT
Hi,
I'm trying to use that mod to provide a personal storage area for each members, managed by their moderators. That way, I can use it as corporate internal tool to store e.g. salary slip for each employees.
To do that, I have been thinking of the following.
- John is a member of group blue, with moderator Jack
- Pam is a member of group red, with moderator Sam
John pay slip will be located in <path to download folder>/blue/salary/john/
Pam pay slip will be located in <path to download folder>/red/salary/pam/
blue and red are actually the group name
salary is a category name
john and pam are username
Do you think this is feasible and which files should i look at modifying to do such a thing (dynamically generate the path)?
Thanks
|
All files probably, mostly downloads.php, but this isn't how DownloadsII is designed. It's a downloads manager, not a salary tool.
Quote:
Originally Posted by Davey-UK
This is one BIG thread to read through.
Is there a way to show the main page, ie with the downloads categories showing to all usergroups, but when a category is clicked on, the permissions come into play, and the user cannot see the files list in that category.
I dont want to exclude people from seeing the categories, but i dont want them to see files in the categories, until i place them in a new usergroup.
Thanks in advanced.
|
Open downloads.php
Find
PHP Code:
$result = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "dl_cats WHERE ".$catexclude." parent = '0' ORDER BY ".$dl->order);
Replace with
PHP Code:
$result = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "dl_cats WHERE parent = '0' ORDER BY ".$dl->order);
Open includes/class_downloads.php
Find
PHP Code:
$result = $db->query_read("SELECT `name`,`id` FROM " . TABLE_PREFIX . "dl_cats WHERE ".$catexclude." `parent`=".$db->sql_prepare($id)." ORDER BY ".$this->order);
Replace with
PHP Code:
$result = $db->query_read("SELECT `name`,`id` FROM " . TABLE_PREFIX . "dl_cats WHERE `parent`=".$db->sql_prepare($id)." ORDER BY ".$this->order);