Require User to Login

Download and support for PhpBB3 Paypal Donation Mod
Locked
JasonHayes
BBCoder I
BBCoder I
Posts: 2
Joined: 07 Mar 2012, 07:13
BBCodes: 6

Require User to Login

Post by JasonHayes »

Hey I love this PayPal Mod. I think it is exactly what I need. However I want to make all of this mod visible only to those who have logged in. I know how to show and hide links based on if the user is logged in, however I do not know how to make the actual donate.php page only visible to users who are logged in and if not redirect the user to login first.

Any help with this would be greatly appreciated.

Thanks,

Jason
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Require User to Login

Post by Stoker »

open donate.php and find:

Code: Select all

$user->setup('mods/donate');
After add:

Code: Select all

    if ($user->data['user_id'] == ANONYMOUS)
    {
        login_box('', $user->lang['LOGIN']);
    } 
Board rules! No PM support
JasonHayes
BBCoder I
BBCoder I
Posts: 2
Joined: 07 Mar 2012, 07:13
BBCodes: 6

Require User to Login

Post by JasonHayes »

Thank you very much. Works like a charm. Thank you for the quick response.
Tanbheer
BBCoder II
BBCoder II
Posts: 5
Joined: 04 Jun 2011, 12:15

Require User to Login

Post by Tanbheer »

i added that text but it still shows donation mod on my forum if i visit it as guest.
User avatar
martin123456
BBCoder VI
BBCoder VI
Posts: 765
Joined: 25 Jul 2011, 13:29
BBCodes: 34
Favourite MOD: Ban button
Location: Down south!
Contact:

Require User to Login

Post by martin123456 »

Refresh styles and purge the cache and if that fails F5 wink
Tanbheer
BBCoder II
BBCoder II
Posts: 5
Joined: 04 Jun 2011, 12:15

Require User to Login

Post by Tanbheer »

already did that..but no luck ...:(
Locked