PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
eagleone
New Member
New Member


Joined: Mar 27, 2006
Posts: 1

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

i have the enhanced downloads module- how do you allow all users to view downloads but only group members to download
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 Back to top

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
New Member
New Member


Joined: Jan 14, 2007
Posts: 2

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

also i changed functions.php a lil as u said..
View user's profile Send private message
st247
New Member
New Member


Joined: Apr 19, 2006
Posts: 19

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

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 Back to top

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
New Member
New Member


Joined: Apr 19, 2006
Posts: 19

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

You could try the changes I posted above your post. I also have RN 2.10 Wink
View user's profile Send private message
pureliving
Worker
Worker


Joined: Dec 01, 2008
Posts: 175

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

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: 2456
Location: Pittsburgh, Pennsylvania

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

The enhanced downloads module is not NSN downloads. It is something different.
View user's profile Send private message
Susann
Moderator


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

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

Great mod I used it several years for Nuke 6.5


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


Joined: Aug 28, 2003
Posts: 6373
Location: Vsetin, Czech Republic

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

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


Joined: Dec 01, 2008
Posts: 175

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

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


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

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

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 to the forums!
View user's profile Send private message Visit poster's website
pureliving
Worker
Worker


Joined: Dec 01, 2008
Posts: 175

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

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 to the forums!
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
View user's profile Send private message
montego
Site Admin


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

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

Rename the ShortLinks/GT-Downloads.php file to something else and retest. Let us know if that works.
View user's profile Send private message Visit poster's website
pureliving
Worker
Worker


Joined: Dec 01, 2008
Posts: 175

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

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


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

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

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


Joined: Dec 01, 2008
Posts: 175

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

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


Joined: Aug 28, 2003
Posts: 6373
Location: Vsetin, Czech Republic

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

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.
View user's profile Send private message Send e-mail Visit poster's website
pureliving
Worker
Worker


Joined: Dec 01, 2008
Posts: 175

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

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 to the forums!


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

xx Bless xx
View user's profile Send private message
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6373
Location: Vsetin, Czech Republic

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

If you understand what the re write condition does then I'm sure you are right to be confident in it's ability.
View user's profile Send private message Send e-mail Visit poster's website
pureliving
Worker
Worker


Joined: Dec 01, 2008
Posts: 175

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

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


Joined: Aug 28, 2003
Posts: 6373
Location: Vsetin, Czech Republic

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

Please see your other post(s).
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum