BlogHarbor Home Page
FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  UsergroupsRSS   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
How to make a component invisible after reader login?
 
Post new topic   Reply to topic    BlogHarbor Community Forum Index -> Beginner's Lounge
View previous topic :: View next topic  
Author Message
shenia



Joined: 21 Aug 2005
Posts: 58

PostPosted: Thu Sep 01, 2005 12:07 am    Post subject: How to make a component invisible after reader login? Reply with quote

Hi,
I'd like to customize a component which shows a link to one of my articles explaining why the reader has to create an reader account and the benifits of logging in.
But I hope this component to show only before my readers login, and after that it should be invisible...just like the login form component.
Is it possible to customize a such component?
Back to top
View user's profile Send private message
john
Site Admin


Joined: 16 Mar 2004
Posts: 3434

PostPosted: Thu Sep 01, 2005 12:30 am    Post subject: Re: How to make a component invisible after reader login? Reply with quote

Yes, it is. Just wrap your content around an unless statement like this:

Code:
{{unless authenticated}}
This will only be visible to you if you have not logged in!
{{/unless}}


and it will only be shown to users who have not logged in to your blog. Or you can add an else statement like this:

Code:
{{unless authenticated}}
This will only be visible to you if you have not logged in!
{{else}}
This is the secret text for users who have logged in!
{{/unless}}
Back to top
View user's profile Send private message Send e-mail Visit poster's website
shenia



Joined: 21 Aug 2005
Posts: 58

PostPosted: Thu Sep 01, 2005 12:44 am    Post subject: Reply with quote

I see..
Thanks for your prompt reply!!
Back to top
View user's profile Send private message
Connected



Joined: 31 Mar 2005
Posts: 30

PostPosted: Fri Nov 25, 2005 7:45 am    Post subject: Reply with quote

Thanks. I've used this code to provide exclusive features and components to encourage people to logon, and also fewer adverts.

http://www.connectedinternet.co.uk/blog/_archives/2005/11/25/1421239.html
_________________
<a href="http://www.connectedinternet.co.uk/blog"><img src="http://feeds.feedburner.com/Connected-InternetNewsAndDiscussion.gif" height="67" width="200" style="border:0" alt="Latest on Connected Internet:"/></a>
Back to top
View user's profile Send private message Send e-mail Visit poster's website
john
Site Admin


Joined: 16 Mar 2004
Posts: 3434

PostPosted: Sat Nov 26, 2005 10:03 am    Post subject: Reply with quote

That's a great way to encourage your users to authenticate - give them some kind of benefit if they do...
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Search all BlogHarbor support resources.
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    BlogHarbor Community Forum Index -> Beginner's Lounge All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum