Posted on: 06/11/05 09:34pm
By: congleal
Is it possible to allow anonymous users to view the story information on the site but when they click on "read more" link to the body of the story, require anonymous users to create an account?
If this question has already been asked, I apologize but I couldn't find it anywhere.
Thanks,
Lee
Intro & Body Story Access
Posted on: 06/12/05 05:53am
By: THEMike
Without hacking the code, no I don't think so.
However, I think it's a very easy hack to make:
// Main
if (!SEC_inGroup('Logged-in Users')
{
COM_Refresh($_CONF['site_url'] . '/staticpages/index.php/signuptoreadblurb');
}
That should work.
Intro & Body Story Access
Posted on: 06/12/05 06:12am
By: congleal
Mike,
Thanks for your response, which file would this go into?
Lee
Intro & Body Story Access
Posted on: 06/12/05 06:23am
By: Dirk
In article.php, after the include for lib-common.php, I would think (untested ...).
bye, Dirk
Intro & Body Story Access
Posted on: 06/12/05 06:36am
By: congleal
No it doesn't go there I get the following:
Parse error: parse error in C:geeklog-1.3.11rc1public_htmlarticle.php on line 49
Lee
Intro & Body Story Access
Posted on: 06/12/05 06:40am
By: congleal
It goes under //Main in the article.php. Seems to be working!
Thanks,
Lee
Intro & Body Story Access
Posted on: 06/12/05 06:53am
By: congleal
Spoke too soon, I'm getting that parse error as mentioned previously.
Lee
Intro & Body Story Access
Posted on: 06/12/05 07:30am
By: Dirk
The parse error is because of a missing ')' in Mike's code. It's also missing something else. Try this:
if (!SEC_inGroup('Logged-in Users'))
{
echo COM_Refresh($_CONF['site_url'] . '/staticpages/index.php/signuptoreadblurb');
exit;
}
Right after the
require_once ('lib-common.php');
Works for me ...
bye, Dirk
Intro & Body Story Access
Posted on: 06/12/05 07:43am
By: congleal
Now I'm getting a window "Page Cannot Be Found" so I guess it's calling the page but what it's looking for is not in the appropriate place. Is there another name or location for that user login page?
Intro & Body Story Access
Posted on: 06/12/05 07:58am
By: Dirk
Yeah, it's trying to call up a static page where you could explain to people that they have to log in first, etc.
Why not simply create such a page?
bye, Dirk
Intro & Body Story Access
Posted on: 06/12/05 12:35pm
By: congleal
You're absolutely right on with the static page and I will ultimately use your suggestioin but in trying to understand how it works I annotated it to refer to the following..."users.php?mode=new" and it works and displays a page
which is pretty close to what I want.
I'd like to know where is the verbage for this page referenced...if I wanted to modify, text or graphics?
Thanks
Lee
Intro & Body Story Access
Posted on: 06/12/05 12:44pm
By: Dirk
Intro & Body Story Access
Posted on: 06/12/05 01:56pm
By: congleal
Thanks
Intro & Body Story Access
Posted on: 11/11/05 03:52pm
By: Flernk
I love this hack, it is so helpful. I was wondering if it's possible to expand on it.
The site I'm building is subscription based with two levels of access, "Basic" and "Advanced". Is there away to restrict Anonymous users to intro text only, Basic Users to a specific set of stories (perhaps from the "Basic" group), and give Advanced Users the right to see everything?