Welcome to Geeklog, Anonymous Sunday, September 24 2023 @ 12:02 pm EDT

Geeklog Forums

The "continue" part of a story only for registered?

Status: offline


Forum User
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
admin of http://www.tampano.com

Status: offline


Site 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
Text Formatted Code
if (!isset ($_USER['uid']) || ($_USER['uid'] == 1)) {
    echo "Sorry, you have to be logged in.";

Okay, maybe make it look a bit nicer, using COM_siteHeader, etc. But you get the idea ...

bye, Dirk

All times are EDT. The time is now 12:02 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