Hi everyone

I would like to only show the teasers of the articles etc to the anonymous user. The aim is to get readers to sign up if they want to read the full articles. Is there a standard way of doing this? Can anyone help?

Your help is as usual much appreciated,

cheers
Lev

Comments

Jaza’s picture

There was a forum post a few months ago that asked exactly the same thing. This is something that I've always had on my site. In response to the last person who asked this, I wrote this tutorial explaining how you get the 'sign up to read more' functionality working in Drupal.

Hope you find this resource useful!

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh

Lcribb’s picture

Thanks Jeremy! Will give it a go, faster response than I had ever hoped for. Perfect!

cheers

pobster’s picture

Unless I've missed something obvious - I don't think there's an easy way to do this... However :o) It's not impossible ;o) Here's what I'm thinking:

In access control change all the settings so that *only* authenticated users can view/access pages, stories, whatever...

Now you'll need the flexinode module for this:

Create a flexinode which can be accessed by an anonymous user (well everyone, it doesn't matter as long as anonymous users can access it) - Hopefully you can see where I'm going with this already... Now in your flexinodes you need to either insert your own hand written 'teasers' or perhaps use one of the excellent php snippets to show some dynamically created teasers - that part is up to you.

Anyways, the most important bit would then be your front page as you'd need to have one view for authenticated users and one for anonymous - fortunately this part is easy:

global $user;
if ($user->uid) {
profile_load_profile($user);
print "Hello {$user->profile_name}!  Welcome back to the site!";
}
else {
print "You're anonymous!!!  Register quickly before your head explodes!";
}

So... instead of what I've written above - you'd change it so that anonymous users can only look at the flexinodes you've supplied. If they try and view any nodes which they don't have permission for - uh oh... "Access Denied!" :o) Job done!
Obviously for registered users the homepage will look different and you can direct these users to the proper pages in the site. I guess it kinda ends up like being 'a site within a site' sort of thing... Whatever ;o)

Pobster

pobster’s picture

Or *cough* you could just do what Jaza said above and save yourself all that hassle ;o)

Pobster

Lcribb’s picture

cheers