Require User to Login

Modifications for phpBB3.
Try the Mods here and share Your own Mods
Forum rules
You dont have to use ModX or make your mod AutoMod compatible. A simple textfile is fine
But if you post Mods here You also have to give support

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

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

Require User to Login

Post by JasonHayes »

Thank you very much. Works like a charm. Thank you for the quick response.

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.

Require User to Login

Post by martin123456 »

Refresh styles and purge the cache and if that fails F5 wink

Require User to Login

Post by Tanbheer »

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