1
kmbfa
Access problem
  • 2004/8/5 10:19

  • kmbfa

  • Just popping in

  • Posts: 1

  • Since: 2004/8/5 1


We have a download section and decided to only give acess to it to people with at least 15 posts.

Only problem is we don't know how to do that (if it's even possible)

Please tell me if it's possible and if it is, please tell me how to do it.

I would really appreciate ur help.

TIA

2
ackbarr
Re: Access problem

I haven't tested this, but it should work:

in /modules/mydownloads/header.php after:
include XOOPS_ROOT_PATH."/modules/mydownloads/include/functions.php";


add the following:
$postcount 15;
if (! 
$xoopsUser) {
    
redirect_header(XOOPS_URL4"You must have $postcount posts in order to access the downloads.");
} else {
    if (
$xoopsUser->getVar('posts') < $postcount) {
        
redirect_header(XOOPS_URL4"You must have $postcount posts in order to access the downloads.");
    }
}


To modify where the user is sent after seeing this message, change 'XOOPS_URL'.

Login

Who's Online

458 user(s) are online (161 user(s) are browsing Support Forums)


Members: 0


Guests: 458


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits