Limiting pageview to registered users

xinca
xinca's picture

Joined: 2002-09-28
Posts: 86
Posted: Mon, 2005-05-23 11:47

I can locate the pageview code on template files. But I don't know the view-limitation code to put in. On G1 I could limit view per guest/logged in/admin on pageview. On G2 what's the code for group-limited viewing? Whoever knows it please advise.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2005-05-23 13:53

Not sure I understand your question. Are you talking about setting the permissions on the object/page? If so there's no need to mess around with the code, you didn't need to do that in G1 either. You can just set the permissions to so only logged in users have view access to the page.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2005-05-23 14:00

BTW, the group you'd use to let only logged in users access your images is "Registered Users".

 
xinca
xinca's picture

Joined: 2002-09-28
Posts: 86
Posted: Tue, 2005-05-24 09:54

nivekiam, thanks for trying but I guess you misunderstood. Let me try explaning it again.

Say on every album view there is a "Views" dynamic data feed. I wish to restrict the viewing of this pageview number to "registered users" only.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2005-05-24 13:07

I don't understand. Are you talking about the number of views a page has seen?

Maybe you could take a screenshot of what you're talking about and highlight with an image editor what you want restricted.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-05-24 14:29

xinca, create a local tpl and put {if $user.isRegisteredUser} .... {/if} around whatever content you only want logged in users to see.

 
xinca
xinca's picture

Joined: 2002-09-28
Posts: 86
Posted: Wed, 2005-05-25 04:17

Thanks mindless. You have answered my question.

 
matt2051b
matt2051b's picture

Joined: 2005-06-01
Posts: 14
Posted: Thu, 2005-06-02 19:16

Thanks mindless. This worked great for me too!
-M