News:

Welcome to the Unofficial Help Forum



Author Topic: download system download permission  (Read 6559 times)

Offline Illori

  • Administrator
  • *
  • Posts: 322
    • View Profile
download system download permission
« on: September 06, 2013, 10:56:28 AM »
all edits have to be done manually. no support will be provided.
Themes/Default/Download2.template.php
Code: (find) [Select]
$g_report = allowedTo('downloads_report');
Code: (add after) [Select]
$g_dl = allowedTo('downloads_dl');
Code: (find) [Select]
// Show the main download
Code: (replace) [Select]
if($g_dl){
// Show the main download

Code: (find) [Select]
echo '
</td>
</tr>';
Code: (add after) [Select]
}
Code: (find) [Select]
// Show linking codes
Code: (replace) [Select]
if($g_dl){
// Show linking codes

Code: (find) [Select]
echo '</table>';
Code: (add after) [Select]
}
Sources/Downloads2.php

Code: (find) [Select]
function Downloads_DownloadFile()
{
global $modSettings, $txt, $context, $smcFunc, $user_info;

// Check Permission
isAllowedTo('downloads_view');

Code: (replace) [Select]
function Downloads_DownloadFile()
{
global $modSettings, $txt, $context, $smcFunc, $user_info;

// Check Permission
isAllowedTo('downloads_dl');

Sources/ManagePermissions.php
Code: (find) [Select]
'downloads_view',
Code: (add after) [Select]
'downloads_dl',
Themes/Default/Languages/Modifications.<your language>.php
Code: (find) [Select]
$txt['permissionname_downloads_view'] = 'View Downloads';
$txt['permissionhelp_downloads_view'] = 'Allows the user to view the Downloads';
$txt['cannot_downloads_view'] = 'You are not allowed to view the Downloads';
Code: (add after) [Select]
$txt['permissionname_downloads_dl'] = 'Download';
$txt['permissionhelp_downloads_dl'] = 'Allows the user to download.';
$txt['cannot_downloads_dl'] = 'You are not allowed to download.';

after applying the edits each groups permissions need to be modified to allow downloading of files in the download system.

also please DO NOT post a link to this on simplemachines.org

Offline Toxic__Waste

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: download system download permission
« Reply #1 on: October 18, 2014, 08:34:47 PM »
whats this actually do

Offline Illori

  • Administrator
  • *
  • Posts: 322
    • View Profile
Re: download system download permission
« Reply #2 on: October 19, 2014, 06:37:20 AM »
did you read the title of the thread or the last few lines of the post above yours? i guess not.

 

anything