Welcome to Geeklog, Anonymous Friday, April 19 2024 @ 05:01 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
 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
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
 Quote

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