How to make a certain bit of text invisible to guests?

RobertCol at 22h25
30
Oct
2011
I have a section of my forum where members post offers and deals they find. I want to make it so the URLs or codes of the vouchers are only visible to members, and guests have to create an account to see what the code/url is. I have tried spoilers and hidden text, but its not working.

Is it possible? If it is, HOW? Smile

Thanks Very Happy

( http://restaurantforum.englishboards.com/f16-deals-and-offers )

PS. If it says 'Please register to see the code', just ignore it. Members cant see it either at the moment.
1 Rideem3, on 30/10/2011 at 22h56
To make the forum not visible to guests just go to:
Admin Panel -> General -> Categories & Forums -> Edit the permissions of what forum you want to disable view from guests by clicking the button.
2 RobertCol, on 30/10/2011 at 22h57
Rideem3 wrote:To make the forum not visible to guests just go to:
Admin Panel -> General -> Categories & Forums -> Edit the permissions of what forum you want to disable view from guests by clicking the button.


Thanks, but is there any way that I can still show the thread/forum, but just make the URL invisible to guests?
3 Rideem3, on 30/10/2011 at 23h13
Yes, but you would have to manually add a specific text before and after the message.

First, go to Admin Panel -> Modules -> Forum Widgets Management
Create a new widget
Title: Hide Text
Use as Table Type: No
Title: Leave Blank

Put this in the code box:
Code:
<style type="text/css">
.hidetext {
display: none;
}
</style>


Hit Save. Add it to either left or right side (whatever is activated). Then Hit save. Then edit the permissions by clicking the button on the widget. Check only guests, and uncheck everything else.

Then whenever you post a url in a post, add:
Code:
<span class="hidetext">URL HERE or WHATEVER TEXT HERE</span>


Just be sure the span class tag is there.
4 RobertCol, on 30/10/2011 at 23h35
Rideem3 wrote:Yes, but you would have to manually add a specific text before and after the message.

First, go to Admin Panel -> Modules -> Forum Widgets Management
Create a new widget
Title: Hide Text
Use as Table Type: No
Title: Leave Blank

Put this in the code box:
Code:
<style type="text/css">
.hidetext {
display: none;
}
</style>


Hit Save. Add it to either left or right side (whatever is activated). Then Hit save. Then edit the permissions by clicking the button on the widget. Check only guests, and uncheck everything else.

Then whenever you post a url in a post, add:
Code:
<span class="hidetext">URL HERE or WHATEVER TEXT HERE</span>


Just be sure the span class tag is there.


Hmm. Its not worked.
See the post here: http://restaurantforum.englishboards.com/t22-beefeater#45
5 Rideem3, on 30/10/2011 at 23h43
You have to enable HTML. Admin Panel -> General -> Mesages configuration
6 RobertCol, on 31/10/2011 at 17h33
Hmm. Still not working.
7 Sanket, on 31/10/2011 at 18h06
What exactly is not working?
8 RobertCol, on 31/10/2011 at 18h12
I use chrome for the admin account, and when I use that account, I see <span class="hidetext">**URL**</span> where I want the message to be. When I go on using firefox as a guest account, I see the same message as I do on the admin account, so the URL is not invisible to guest users.
9 Sanket, on 31/10/2011 at 18h18
You can add the whole text in that widget & you can then hide that widget for guests by changing the permissions. You don't need to add any code.
10 RobertCol, on 31/10/2011 at 18h21
But will the widget not be displayed on all pages for the members?
11 Sanket, on 31/10/2011 at 18h26
Yes, it will be displayed on all pages for the members because its a forum widget.
12 RobertCol, on 31/10/2011 at 18h32
What I am trying to do is show a URL for a voucher in a thread. When Guests view the thread, I would like it so they cannot see the URL. But, when the guest registers as a member, then the URL becomes visible to them.

Does that help you understand what I'm trying to do?
13 Sanket, on 31/10/2011 at 18h35
General>Categories and Forums
Click on a forum name
Permissions tab
See links in the messages :Members.
Save. Repeat it for all forums.

This will make it not display for Guests.
14 RobertCol, on 31/10/2011 at 18h48
Thanks! I've done it now! Smile
15 Sanket, on 31/10/2011 at 18h49
Since this thread appears to be solved, I will archive this thread.


Sanket Smile

Similar topics
Alright,so me with Gangstar15 tried to make a template for my upcoming site version..and at the code there was a horizontal line which if i removed messed up the whole template. Code:<hr style="margin-top: 250px; height: 1px;
How to make text bigger on the templates? Click Spoiler Spoiler: I already use Code: <font size="6">text</font> But i can't be bigger
How do I set that only registered users can see links on the forum but no guests?
See also
more_less
Informations

15 Replies For the topic :
"How to make a certain bit of text invisible to guests?"

This topic has been viewed 694 times.

Last message :
30/10/2011 at 22h25 by "RobertCol"