Welcome to Geeklog, Anonymous Tuesday, September 17 2024 @ 08:24 pm EDT
Geeklog Forums
The "continue" part of a story only for registered?
Status: offline
tampano
Forum User
Chatty
Registered: 04/06/04
Posts: 59
As in subject.
Is it possible to set up things so only registered users can read the "hidden" part of a story?
Thanks in advance
--
Tampano
admin of http://www.tampano.com
Is it possible to set up things so only registered users can read the "hidden" part of a story?
Thanks in advance
--
Tampano
admin of http://www.tampano.com
3
3
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
You could add a check at the top of article.php (right after the 2 require_once statements) that checks if the current user is logged in. Something like
echo "Sorry, you have to be logged in.";
exit;
}
Okay, maybe make it look a bit nicer, using COM_siteHeader, etc. But you get the idea ...
bye, Dirk
Text Formatted Code
if (!isset ($_USER['uid']) || ($_USER['uid'] == 1)) {echo "Sorry, you have to be logged in.";
exit;
}
Okay, maybe make it look a bit nicer, using COM_siteHeader, etc. But you get the idea ...
bye, Dirk
4
3
Quote
All times are EDT. The time is now 08:24 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content