The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Content hidden

+2
Sanket
cyyap95
6 posters

Go down

Solved Content hidden

Post by cyyap95 February 6th 2012, 12:00 pm

I hide something
but i wish it could have a pic or something such as
[Content is hidden, Please reply or register here to unlock the content]
something like this
cause what it's only have a blank place
who will knows something there?



Last edited by cyyap95 on February 7th 2012, 10:22 am; edited 2 times in total (Reason for editing : Change of the title to make it more explicit)
avatar
cyyap95
New Member

Posts : 18
Reputation : 1
Language : English

Back to top Go down

Solved Re: Content hidden

Post by Sanket February 6th 2012, 2:33 pm

Its currently not possible, but its been suggested. Please vote.
https://help.forumotion.com/t3099-hidden-text-symbol
Sanket
Sanket
ForumGuru

Male Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai

Back to top Go down

Solved Re: Content hidden

Post by LGforum February 6th 2012, 2:47 pm

If you use widgets, set a widget for GUESTS only.
And stick this in it:
Code:

<script>
jQuery(function(){
  jQuery('.noguest').html('Please Log In or Register to see this');
});
</script>

And then, anything that you don't want guests to see, write this in your post:
Code:

[table class=noguest] CONTENT - GUESTS WILL NOT SEE THIS [/table]


Last edited by LGforum on February 6th 2012, 7:30 pm; edited 1 time in total
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Solved Re: Content hidden

Post by Guest February 6th 2012, 3:09 pm

You can use this for templates:
Code:
<!-- BEGIN switch_user_logged_in -->
CONTENT[HTML, JS CODES, OR WHAT YOU WANT HERE - FOR LOGGED IN USERS]
<!-- END switch_user_logged_in -->
and:
Code:
<!-- BEGIN switch_user_logged_out -->
CONTENT[HTML, JS CODES, OR WHAT YOU WANT HERE - FOR LOGGED OUT USERS / FOR GUESTS]
<!-- END switch_user_logged_out -->
Pretty simple. Razz

Example:
Code:
<!-- BEGIN switch_user_logged_out -->
To see the content please log in or register.
<!-- END switch_user_logged_out -->
<!-- BEGIN switch_user_logged_in -->
Content here... :P
<!-- END switch_user_logged_in -->
avatar
Guest
Guest


Back to top Go down

Solved Re: Content hidden

Post by YoshiGM February 6th 2012, 4:24 pm

Hi,

You can use the hide bbcode:

Code:
[hide]YOUR CONTENT HERE[/hide]
and then add a little image.. where it shows a text.

Example:


ANY IMAGE HERE.

But the image doesn't disappear when a member answered.
YoshiGM
YoshiGM
Active Poster

Male Posts : 1562
Reputation : 146
Language : Spanish & English
Location : Mexico

http://asistencia.foroactivo.com/u21373

Back to top Go down

Solved Re: Content hidden

Post by cyyap95 February 6th 2012, 5:17 pm

Coddy wrote:You can use this for templates:
Code:
<!-- BEGIN switch_user_logged_in -->
CONTENT[HTML, JS CODES, OR WHAT YOU WANT HERE - FOR LOGGED IN USERS]
<!-- END switch_user_logged_in -->
and:
Code:
<!-- BEGIN switch_user_logged_out -->
CONTENT[HTML, JS CODES, OR WHAT YOU WANT HERE - FOR LOGGED OUT USERS / FOR GUESTS]
<!-- END switch_user_logged_out -->
Pretty simple. Razz

Example:
Code:
<!-- BEGIN switch_user_logged_out -->
To see the content please log in or register.
<!-- END switch_user_logged_out -->
<!-- BEGIN switch_user_logged_in -->
Content here... :P
<!-- END switch_user_logged_in -->

Can i know those html code should add in where?
avatar
cyyap95
New Member

Posts : 18
Reputation : 1
Language : English

Back to top Go down

Solved Re: Content hidden

Post by cyyap95 February 6th 2012, 5:18 pm

Sanket wrote:Its currently not possible, but its been suggested. Please vote.
https://help.forumotion.com/t3099-hidden-text-symbol

need how many vote or how long only will have results?
the poll start from 2007
avatar
cyyap95
New Member

Posts : 18
Reputation : 1
Language : English

Back to top Go down

Solved Re: Content hidden

Post by cyyap95 February 6th 2012, 5:18 pm

LGforum wrote:If you use widgets, set a widget for GUESTS only.
And stick this in it:
Code:

jQuery(function(){
  jQuery('.noguest').html('Please Log In or Register to see this');
});

And then, anything that you don't want guests to see, write this in your post:
Code:

[table class=noguest] CONTENT - GUESTS WILL NOT SEE THIS [/table]

Erm i cant understand, i wan hide it and make people to reply and register
not just hide it from guest
but there's jus a blank place, not obvious to let others know there is hidden content there
avatar
cyyap95
New Member

Posts : 18
Reputation : 1
Language : English

Back to top Go down

Solved Re: Content hidden

Post by LGforum February 6th 2012, 5:22 pm

Thats what my code will do. In posts, users can hide content from guests. Instead what will be displayed will be a message 'Please Log In or Register to see this'.

Since you said you can't understand, then there's no point me trying to explain further really... I'll let someone else attempt to explain it if they want.

To hide content in posts from guests, AND display a message, mine is the best way though.
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Solved Re: Content hidden

Post by Base February 6th 2012, 5:42 pm

cyyap95;

Please don't double/triple post. Your post need to be separated by 24 hours before bumping, replying or adding more information. Please use the edit button instead.

LGforum's way is probably the easiest and most straightforward way. To use it, you will first need to create a new widget. For help on creating widgets please see this topic: https://help.forumotion.com/t22589-forum-widgets

Once you have created that widget, you will need to put this code into the content:

Code:
<script>
jQuery(function(){
  jQuery('.noguest').html('Please Log In or Register to see this');
});
</script>

Make sure that the permissions are set so that it's for guests only. Then, when you make a post in your forum, use this code for hiding things:

Code:

[table class=noguest]content here[/table]

Replace 'content here' with whatever you want to post. If someone is not logged in or registered then they will see a message saying 'Please Log In or Register to see this' which you can change. Smile


Last edited by Base on February 6th 2012, 7:58 pm; edited 2 times in total
Base
Base
Forumaster

Male Posts : 10383
Reputation : 1695
Language : English and French
Location : United Kingdom, England

http://forumotionhub.net

Back to top Go down

Solved Re: Content hidden

Post by LGforum February 6th 2012, 7:29 pm

Very well explained Base, thanks Smile

By the way, the script must be enclosed in <script> tags in the widget since it is within the HTML. I'll edit my post. You edit yours Razz
(since we can't guarantee people will realise that)

Using the method Base and I described you can make a nice little box for the hidden content too with CSS:
Code:

.noguest {
  background: #e1ebf2;
  padding: 5px;
  border: 1px solid #c05;
}

That CSS will style it nicely like an AvacWeb box Razz
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Solved Re: Content hidden

Post by Base February 6th 2012, 8:08 pm

Thanks for telling me that, post updated. Smile
Base
Base
Forumaster

Male Posts : 10383
Reputation : 1695
Language : English and French
Location : United Kingdom, England

http://forumotionhub.net

Back to top Go down

Solved Re: Content hidden

Post by cyyap95 February 7th 2012, 9:13 am

Thanks that really helps me alot ! Razz
avatar
cyyap95
New Member

Posts : 18
Reputation : 1
Language : English

Back to top Go down

Solved Re: Content hidden

Post by cyyap95 February 7th 2012, 9:28 am

Last problem
Content hidden 110
There blanks beside the post

Content hidden 210
there no blanks but the widgets not works
avatar
cyyap95
New Member

Posts : 18
Reputation : 1
Language : English

Back to top Go down

Solved Re: Content hidden

Post by cyyap95 February 7th 2012, 10:21 am

is ok i turn the blank place to some widget, can close this topic
avatar
cyyap95
New Member

Posts : 18
Reputation : 1
Language : English

Back to top Go down

Solved Re: Content hidden

Post by ankillien February 7th 2012, 11:50 am

Topic Solved & Locked
ankillien
ankillien
Energetic

Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum