Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
eagleone
New Member
New Member



Joined: Mar 27, 2006
Posts: 1

PostPosted: Thu Jun 08, 2006 9:55 am Reply with quote

i have the enhanced downloads module- how do you allow all users to view downloads but only group members to download

_________________
[ Only registered users can see links on this board! Get registered or login! ] 
View user's profile Send private message Send e-mail
devil_me
New Member
New Member



Joined: Jan 14, 2007
Posts: 2

PostPosted: Fri Jan 19, 2007 2:00 am Reply with quote

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
 
View user's profile Send private message
devil_me







PostPosted: Fri Jan 19, 2007 2:01 am Reply with quote

also i changed functions.php a lil as u said..
 
st247
New Member
New Member



Joined: Apr 19, 2006
Posts: 19

PostPosted: Fri Apr 13, 2007 3:17 am Reply with quote

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']);
    }

to
Code:
/*    } else {

        restricted2($lidinfo['sid']);
    }*/

It works, I just hope this is the right way to do it (I'm a newbie Wink )
 
View user's profile Send private message
utssace
Worker
Worker



Joined: Feb 18, 2006
Posts: 155
Location: Virginia

PostPosted: Sun Apr 29, 2007 2:40 pm Reply with quote

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
 
View user's profile Send private message Visit poster's website
st247







PostPosted: Mon Apr 30, 2007 2:39 am Reply with quote

You could try the changes I posted above your post. I also have RN 2.10 Wink
 
pureliving
Worker
Worker



Joined: Dec 01, 2008
Posts: 180

PostPosted: Wed Feb 11, 2009 9:12 pm Reply with quote

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
 
View user's profile Send private message
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Thu Feb 12, 2009 2:51 pm Reply with quote

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. 
View user's profile Send private message
Susann
Moderator



Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Thu Feb 12, 2009 3:59 pm Reply with quote

Great mod I used it several years for Nuke 6.5


RavensScripts
 
View user's profile Send private message
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Fri Feb 13, 2009 6:34 am Reply with quote

Also, this thread is 3 years old
 
View user's profile Send private message Send e-mail
pureliving







PostPosted: Sat Feb 14, 2009 8:14 am Reply with quote

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
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Sun Feb 15, 2009 9:11 am Reply with quote

pureliving, regarding the passcode, you need to make it compatible with RN. I have a thread on my site for making this work: How To Get the Captcha to Work Under RavenNuke 2.10.x +

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
pureliving







PostPosted: Tue Feb 17, 2009 11:45 am Reply with quote

Montego, i followed your instructions with the passcode, and also installed NSN GR Downloads Tap 1.2.2 from your website [ Only registered users can see links on this board! Get registered or login! ] 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
 
montego







PostPosted: Tue Feb 17, 2009 6:11 pm Reply with quote

Rename the ShortLinks/GT-Downloads.php file to something else and retest. Let us know if that works.
 
pureliving







PostPosted: Tue Feb 17, 2009 6:39 pm Reply with quote

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
 
montego







PostPosted: Wed Feb 18, 2009 6:23 am Reply with quote

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.
 
pureliving







PostPosted: Wed Feb 18, 2009 2:47 pm Reply with quote

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!!!
 
Guardian2003







PostPosted: Wed Feb 18, 2009 7:24 pm Reply with quote

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.
 
pureliving







PostPosted: Wed Feb 18, 2009 7:32 pm Reply with quote

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 .* [ Only registered users can see links on this board! Get registered or login! ]

So i hope there won't be a problem there.

xx Bless xx
 
Guardian2003







PostPosted: Wed Feb 18, 2009 7:39 pm Reply with quote

If you understand what the re write condition does then I'm sure you are right to be confident in it's ability.
 
pureliving







PostPosted: Wed Feb 18, 2009 8:14 pm Reply with quote

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.
 
Guardian2003







PostPosted: Wed Feb 18, 2009 8:17 pm Reply with quote

Please see your other post(s).
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©