The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Content hidden

View previous topic View next topic Go down

Solved Content hidden

Post by cyyap95 on 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)

cyyap95
New Member

Posts : 18
Reputation : 1
Language : English

Back to top Go down

Solved Re: Content hidden

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

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

Sanket
ForumGuru

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

http://webartzforum.com

Back to top Go down

Solved Re: Content hidden

Post by LGforum on 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
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Content hidden

Post by Guest on 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 -->

Guest
Guest


Back to top Go down

Solved Re: Content hidden

Post by YoshiGM on 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
Forumember

Male Posts : 512
Reputation : 76
Language : Spanish & English
Location : Mexico

http://asistencia.foroactivo.com/u21373

Back to top Go down

Solved Re: Content hidden

Post by cyyap95 on 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?

cyyap95
New Member

Posts : 18
Reputation : 1
Language : English

Back to top Go down

Solved Re: Content hidden

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

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

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

cyyap95
New Member

Posts : 18
Reputation : 1
Language : English

Back to top Go down

Solved Re: Content hidden

Post by cyyap95 on 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

cyyap95
New Member

Posts : 18
Reputation : 1
Language : English

Back to top Go down

Solved Re: Content hidden

Post by LGforum on 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
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Content hidden

Post by Base on 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: http://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
Forumaster

Male Posts : 10386
Reputation : 1687
Language : English and French
Location : United Kingdom, England

http://forumotionhub.net

Back to top Go down

Solved Re: Content hidden

Post by LGforum on 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
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Content hidden

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

Thanks for telling me that, post updated. Smile

Base
Forumaster

Male Posts : 10386
Reputation : 1687
Language : English and French
Location : United Kingdom, England

http://forumotionhub.net

Back to top Go down

Solved Re: Content hidden

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

Thanks that really helps me alot ! Razz

cyyap95
New Member

Posts : 18
Reputation : 1
Language : English

Back to top Go down

Solved Re: Content hidden

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

Last problem

There blanks beside the post


there no blanks but the widgets not works

cyyap95
New Member

Posts : 18
Reputation : 1
Language : English

Back to top Go down

Solved Re: Content hidden

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

is ok i turn the blank place to some widget, can close this topic

cyyap95
New Member

Posts : 18
Reputation : 1
Language : English

Back to top Go down

Solved Re: Content hidden

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

Topic Solved & Locked

ankillien
Energetic

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

http://www.webartzforum.com/

Back to top Go down

View previous topic View next topic Back to top


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