Author |
Message |
eagleone
New Member
![New Member New Member](modules/Forums/images/ranks/1star.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Mar 27, 2006
Posts: 1
|
Posted:
Thu Jun 08, 2006 9:55 am |
|
i have the enhanced downloads module- how do you allow all users to view downloads but only group members to download |
_________________ www.1life1luv.com |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
devil_me
New Member
![New Member New Member](modules/Forums/images/ranks/1star.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Jan 14, 2007
Posts: 2
|
Posted:
Fri Jan 19, 2007 2:00 am |
|
Code:<?php
/********************************************************/
/* NSN GR Downloads */
/* By: NukeScripts Network (webmaster@nukescripts.net) */
/* http://www.nukescripts.net */
/* Copyright © 2000-2005 by NukeScripts Network */
/********************************************************/
/* Based on Journey Links Hack */
/* Copyright (c) 2000 by James Knickelbein */
/* Journey Milwaukee (http://www.journeymilwaukee.com) */
/********************************************************/
$module_name = basename(dirname(__FILE__));
if (!stristr($_SERVER['PHP_SELF'], "modules.php") AND !stristr($_SERVER['SCRIPT_NAME'], "modules.php")) {
Header("Location: ../../modules.php?name=$module_name");
}
require_once("mainfile.php");
get_lang($module_name);
$pagetitle = _DOWNLOADS;
include("modules/$module_name/includes/functions.php");
$result1 = $db->sql_query("SELECT * FROM ".$prefix."_nsngd_config");
$dl_config = gdget_configs();
if (!$dl_config OR $dl_config=="") {
include("header.php");
title(_DL_DBCONFIG);
include("footer.php");
die();
}
$index = 1;
if(isset($d_op)) { $op = $d_op; unset($d_op); }
if($op == "viewdownload") { $op = "getit"; }
if($op == "viewdownloaddetails") { $op = "getit"; }
switch($op) {
default:
case "index":include("modules/$module_name/public/index.php");break;
case "NewDownloads":include("modules/$module_name/public/NewDownloads.php");break;
case "NewDownloadsDate":include("modules/$module_name/public/NewDownloadsDate.php");break;
case "MostPopular":include("modules/$module_name/public/MostPopular.php");break;
case "brokendownload":include("modules/$module_name/public/brokendownload.php");break;
case "brokendownloadS":include("modules/$module_name/public/brokendownloadS.php");break;
case "modifydownloadrequest":include("modules/$module_name/public/modifydownloadrequest.php");break;
case "modifydownloadrequestS":include("modules/$module_name/public/modifydownloadrequestS.php");break;
case "getit":include("modules/$module_name/public/getit.php");break;
case "go":include("modules/$module_name/public/go.php");break;
case "search":include("modules/$module_name/public/search.php");break;
case "gfx":include("modules/$module_name/public/gfx.php");break;
}
?>
|
Thats how my index.php at modules/downloads looks like . cant find function line there.. plz helpp raven |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
devil_me
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Jan 19, 2007 2:01 am |
|
also i changed functions.php a lil as u said.. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
st247
New Member
![New Member New Member](modules/Forums/images/ranks/1star.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Apr 19, 2006
Posts: 19
|
Posted:
Fri Apr 13, 2007 3:17 am |
|
I also wanted to change this (I'm using Ravennuke 7.6 v.2.1 with NSN GR Downloads). I looked around a bit and I found something in includes/nsngd_func.php.
In the function showlisting($lid) I changed
Code:if (($lidinfo['sid'] == 0) || ($lidinfo['sid'] == 1 AND is_user($user)) || ($lidinfo['sid'] == 2 AND is_admin($admin)) || ($lidinfo['sid'] > 2 AND of_group($priv)) || $dl_config['show_download'] == '1') {
|
to
Code:// if (($lidinfo['sid'] == 0) || ($lidinfo['sid'] == 1 AND is_user($user)) || ($lidinfo['sid'] == 2 AND is_admin($admin)) || ($lidinfo['sid'] > 2 AND of_group($priv)) || $dl_config['show_download'] == '1') {
|
and
Code:} else {
restricted2($lidinfo['sid']);
}
|
toCode:/* } else {
restricted2($lidinfo['sid']);
}*/
|
It works, I just hope this is the right way to do it (I'm a newbie ) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
utssace
Worker
![Worker Worker](modules/Forums/images/ranks/3stars.gif)
![](modules/Forums/images/avatars/18fec4b5450beb2041ec2.gif)
Joined: Feb 18, 2006
Posts: 155
Location: Virginia
|
Posted:
Sun Apr 29, 2007 2:40 pm |
|
Raven,
I have RN 2.10. This code at the start of the thread doesn't work for me. Is there a change to get it to work in latest RN?
thanks |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
st247
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Apr 30, 2007 2:39 am |
|
You could try the changes I posted above your post. I also have RN 2.10 ![Wink](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
pureliving
Worker
![Worker Worker](modules/Forums/images/ranks/3stars.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Dec 01, 2008
Posts: 180
|
Posted:
Wed Feb 11, 2009 9:12 pm |
|
Tried the above code by st247, but it did not work.
I'm using RN2.3, with nsn gr downloads and noticed all the settings are located in the includes/nsngd_func.php, but when i added the above code, all that loaded was a blank page.
(1) How could i allow all downloads to be shown to everyone, but only Group members can actually download?
Also, i wondered if you could advise me, regarding when i input a new download, it states what users can download that file, etc, but my issue is that all the groups that are input by nsn groups, are only individually shown in nsn gr downloads.
For instance, (2) how can i make a download available to all groups, rather than just one group only?
It would really be appreciated if someone could please advise me.
xx Bless xx |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
Site Admin
![](modules/Forums/images/avatars/Dilbert/Dilbert_-_Dogbert_King.gif)
Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania
|
Posted:
Thu Feb 12, 2009 2:51 pm |
|
The enhanced downloads module is not NSN downloads. It is something different. |
_________________ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Susann
Moderator
![](modules/Forums/images/avatars/4e3210db4efb891870d79.gif)
Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support
|
Posted:
Thu Feb 12, 2009 3:59 pm |
|
Great mod I used it several years for Nuke 6.5
![RavensScripts](modules/Forums/images/smiles/ravensphpscripts.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
Site Admin
![](modules/Forums/images/avatars/125904890252d880f79f312.png)
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Fri Feb 13, 2009 6:34 am |
|
Also, this thread is 3 years old |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
pureliving
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Sat Feb 14, 2009 8:14 am |
|
I understand this is an old topic, but its still a question with nsn gr downloads, which i am using at present.
Quote: |
For instance, (1) how can i make a download available to all groups, rather than just one group only?
|
Also the passcode to actually download the file does not work, even after refreshing the page countless times, therefore no passcode, no download.
Could anyone please advice me.
xx Bless xx |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
Site Admin
![](modules/Forums/images/avatars/0c0adf824792d6d341ef4.gif)
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Sun Feb 15, 2009 9:11 am |
|
pureliving, regarding the passcode, you need to make it compatible with RN. I have a thread on my site for making this work: Only registered users can see links on this board! Get registered or login! |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
pureliving
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Feb 17, 2009 11:45 am |
|
Montego, i followed your instructions with the passcode, and also installed NSN GR Downloads Tap 1.2.2 from your website http://montegoscripts.com/download-file-44.html, but still:
1, when i log in as a user, and go to a download, all it shows is a icon stating Get It, thereby no passcode at all, not even a word now.
and
2, guests can not view downloads, still stating this can only be viewed by registered users, whereas it should now show to guests, and state only registered users can download.
Don't suppose there is anything else i could try to get this working please?
It would really be appreciated to have your advice.
xx Bless xx |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Feb 17, 2009 6:11 pm |
|
Rename the ShortLinks/GT-Downloads.php file to something else and retest. Let us know if that works. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
pureliving
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Feb 17, 2009 6:39 pm |
|
Changed the file to GT-NSNDownloads.php, refreshed my admin, and everything seems the same.
Nothing different has occurred or no changes seem to have been made.
I am really starting to think more on a permissions basis or at least an issue in anything be able to download, as not even check works when adding download url.
Could this have anything to do with permissions within my file manager directory at all, as i was thinking this as a possibility, but changed all settings for the downloads folder to 777; still nothing.
I activated anti leech protection, still nothing.
I really can't understand this; no passcode, no download!!!!!
![worship](modules/Forums/images/smiles/icon_worship.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Feb 18, 2009 6:23 am |
|
pureliving, if you are willing to be patient, as I have only minutes here and there to do things like this, maybe I can take a look at your setup and files. I would need the following in order to accomplish this:
* An admin user id with access to Downloads
* A FTP user id (so I can look at your files and/or upload revised ones)
* A regular user id with one group assigned to it and one download set up with that group also tied to it.
Maybe I can help get this thing going. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
pureliving
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Feb 18, 2009 2:47 pm |
|
Everyone if you have a problem with downloading file you have under a correct directory and you know for certain your links are correct trying looking in your downloads .htaccess file.
I couldn't find the answers i require, so i therefore asked a little advise from my host, only to have a solution; this is what they said:
Quote: |
Under the directory public, you had this in your .htaccess:
#deny from all
Which will deny from everyone. Once I removed that I was able to download.
|
Can't believe a simple thing like like, caused so many days of problems.
Suppose we learn from errors!!! |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Feb 18, 2009 7:24 pm |
|
I think that file is there to stop people listing the contents of the directory and accessing the downloads directly but if you have a blank inde.html in there, you should be ok. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
pureliving
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Feb 18, 2009 7:32 pm |
|
Well i have a blank index.html file under the public folder, but not my downloads folder.
For this i have used anti-leech protection, which is better security.
Therefore then inputting the following into the .htaccess file in my downloads folder:
RewriteEngine on
RewriteCond ${LeechProtect:/home/*******/public_html/modules/Downloads/public/downloads:%{REMOTE_USER}:%{REMOTE_ADDR}:5} leech
RewriteRule .* http://www.mywebsite.com
So i hope there won't be a problem there.
xx Bless xx |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Feb 18, 2009 7:39 pm |
|
If you understand what the re write condition does then I'm sure you are right to be confident in it's ability. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
pureliving
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Feb 18, 2009 8:14 pm |
|
I sense a bit of if and but there Guardian, whether i'm right or not share with me your thoughts please.
Well initially i heard a rumour that leech protect can have dramatic effects on the search engines, such as google, but then i heard it was just proper ganda, and that the efforts of google indexing are opening up more to nuke based websites, which do have downloads modules, with at times a lot of users using leech protection.
Well as they say ''the world wasn't built in a day'', so i'm still learning and willing to advance my skills where neccessary, so all your advise is appreciated if you could further enlighten me on that one please Guardian. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Guardian2003
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Feb 18, 2009 8:17 pm |
|
Please see your other post(s). |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|