Register | Login | |||||
Main
| Memberlist
| Active users
| ACS
| Commons
| Calendar
| Online users Ranks | FAQ | Color Chart | Photo album | IRC Chat |
| |
0 user currently in Acmlmboard support?. |
Acmlm's Board - I2 Archive - Acmlmboard support? - Problem | | | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
User | Post | ||
Rainbow Yoshi Level: 30 Posts: 208/496 EXP: 159486 For next: 6383 Since: 04-08-05 Since last post: 14 hours Last activity: 4 hours |
| ||
I wanna make a site with games and staff. And I want people to download the games only if they are logged on. How can I make a register/logon/logout option similar to the one on the board ? | |||
VGFreak877 Buzz Blob Level: 28 Posts: 241/294 EXP: 123189 For next: 8149 Since: 03-15-04 From: Hillsborough, NH Since last post: 60 days Last activity: 1 hour |
| ||
Remember how Online Users is set up? It checks to see if you are signed in first, and then lets you view them if you are. If not, it shows a little message showing you have to log in to view them. You can set up your downloads page (or pretty much any page really) to do the same thing. Check the coding in online.php to find out how to do this. I've set up another page testing this theory on my own board, and it works pretty good. | |||
Sandy53215 Acmlm (10:55:31 PM): they're having fun for the first time in so long Level: 47 Posts: 564/948 EXP: 713034 For next: 53169 Since: 03-15-04 From: Milwaukee, Wisconsin (U.S.A) Since last post: 1 day Last activity: 4 hours |
| ||
or just in the start of the file... After you require layout and function... if(!$log) errorpage("Sorry you must be logged in to access this page."); Thats the new way. |
|||
Xeolord - B l u e s - Power Metal > All Level: 81 Posts: 2022/3418 EXP: 4884196 For next: 108653 Since: 03-15-04 From: Yeah Since last post: 15 hours Last activity: 15 hours |
| ||
I thought it was $loguser? I think that's something different though, calling data from the db to the user that's logged in. So yeah, what Randy said. |
|||
VGFreak877 Buzz Blob Level: 28 Posts: 242/294 EXP: 123189 For next: 8149 Since: 03-15-04 From: Hillsborough, NH Since last post: 60 days Last activity: 1 hour |
| ||
Yeah, I had forgotten about the if(!variable) command -- much simpler than what I put there already. Oh well, I will still able to get mine working though. And I think Xeo is right though on the variable -- I think it's $loguser and not $log. | |||
Xeolord - B l u e s - Power Metal > All Level: 81 Posts: 2025/3418 EXP: 4884196 For next: 108653 Since: 03-15-04 From: Yeah Since last post: 15 hours Last activity: 15 hours |
| ||
I'd personaly go about this in a different way: Around the beginning of the file, have if ($loguser) { ... [all the code and junkness] ... ... ... } else { print "Sorry you must be logged in to access this page"}; Randy's way would probably work too though, so I guess it just depends on your "style". |
|||
Book Keeper ♫♫♫ n00blet ♫♫♫ Level: 21 Posts: 120/160 EXP: 49435 For next: 508 Since: 03-15-04 From: Wired Bookworm eat fresh! Since last post: 20 hours Last activity: 8 hours |
| ||
changed from edituser.php. if(!$loguser) die(Sorry you must be logged in.); It's all about style. |
|||
Sandy53215 Acmlm (10:55:31 PM): they're having fun for the first time in so long Level: 47 Posts: 566/948 EXP: 713034 For next: 53169 Since: 03-15-04 From: Milwaukee, Wisconsin (U.S.A) Since last post: 1 day Last activity: 4 hours |
| ||
Why make it die? There are two commands for that... $log -or- $loguser The way I did it is the way things are being coded in 1.A2. |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
Acmlm's Board - I2 Archive - Acmlmboard support? - Problem | | | |