|
|
Joined: Mar 2005
Posts: 39
User
|
User
Joined: Mar 2005
Posts: 39 |
Is there a way I can stop anonymous users from downloading attachments in forums where they don't have posting privillages? I'd like them to read the thread and want to register to get the download.
|
|
|
|
Joined: Sep 2003
Posts: 488
Code Monkey
|
Code Monkey
Joined: Sep 2003
Posts: 488 |
Joshpet write a small piece of code which does just that. Just add it underneath the first section shown below in download.php... // ----------------- <br />// Get the user info <br /> $userob = new user; <br /> $user = $userob -> authenticate("U_Groups"); <br /> <br />// ----------------- <br />// Must be logged in to download - by JoshPet <br /> if (!$user['U_Username']) { <br /> $html = new html; <br /> $html -> not_right('You must be logged in to download files.',$Cat); <br /> }
|
|
|
|
Joined: Mar 2005
Posts: 39
User
|
User
Joined: Mar 2005
Posts: 39 |
Great! I'm sorry though you'll have to tell me exactly where to place it, I tried oneplace but it mucked it up.
Last edited by on2dvd; 03/30/2005 1:06 AM.
|
|
|
|
Joined: Aug 2000
Posts: 1,609
Addict
|
Addict
Joined: Aug 2000
Posts: 1,609 |
Uhhh...yeah... you may not want to post copyrighted code.
|
|
|
|
Joined: Mar 2005
Posts: 39
User
|
User
Joined: Mar 2005
Posts: 39 |
Sorry I misunderstood, I thought you wanted me to add oall of that but I see what you menat now.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 69
Joined: January 2001
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|