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.

Only visible--->Users

View previous topic View next topic Go down

Solved Only visible--->Users

Post by Kiekeboe on May 26th 2010, 2:42 pm

What was the code in the templates witch made the part between it only visible for users?
I mean a code like this one:

<!-- BEGIN switch_legend -->
<!-- END switch_legend -->

Thanx!

Kiekeboe
Forumember

Female Posts : 250
Reputation : -1
Language : Dutch, english, german and a little bit french, guitar chords, html, a bit CSS
Location : Maastricht (Holland)

http://wolfstory.clicboard.com

Back to top Go down

Solved Re: Only visible--->Users

Post by ankillien on May 28th 2010, 10:33 am

Hello,

Do you want something that is visible only to he logged in users and not to the guests?

ankillien
Energetic

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

http://www.webartzforum.com/

Back to top Go down

Solved Re: Only visible--->Users

Post by Japorized on June 1st 2010, 9:43 am

Try this.

Code:
<!-- BEGIN switch_user_logged_in>
CONTENT HERE
<!-- END switch_user_logged_in>

Japorized
Forumember

Male Posts : 310
Reputation : 3
Language : English
Location : Malaysia

http://infinityhub.ace.st

Back to top Go down

Solved Re: Only visible--->Users

Post by Kiekeboe on June 1st 2010, 11:35 am

Thanx! That's what I ment Very Happy

Kiekeboe
Forumember

Female Posts : 250
Reputation : -1
Language : Dutch, english, german and a little bit french, guitar chords, html, a bit CSS
Location : Maastricht (Holland)

http://wolfstory.clicboard.com

Back to top Go down

Solved Re: Only visible--->Users

Post by Honor on June 1st 2010, 5:18 pm

Hey I just tried this code for a chatbox I put in myself - it hides it from everyone, including members =/

Honor
Forumember

Female Posts : 172
Reputation : 17
Language : English
Location : Bouncing off the Walls

http://blueplanet.road2us.com

Back to top Go down

Solved Re: Only visible--->Users

Post by Honor on June 2nd 2010, 1:49 am

*bump*

Honor
Forumember

Female Posts : 172
Reputation : 17
Language : English
Location : Bouncing off the Walls

http://blueplanet.road2us.com

Back to top Go down

Solved Re: Only visible--->Users

Post by Honor on June 4th 2010, 4:20 pm

*Bump* Sheesh!

Honor
Forumember

Female Posts : 172
Reputation : 17
Language : English
Location : Bouncing off the Walls

http://blueplanet.road2us.com

Back to top Go down

Solved Re: Only visible--->Users

Post by Japorized on June 7th 2010, 8:07 am

Perhaps you have hidden the chatbox, including the contents

Japorized
Forumember

Male Posts : 310
Reputation : 3
Language : English
Location : Malaysia

http://infinityhub.ace.st

Back to top Go down

Solved Re: Only visible--->Users

Post by Honor on June 10th 2010, 2:30 am

It's not THE chatbox, it's a Chatango one. It's a different one. It's on the bottom of every page.

The code worked - except that it also hid it from the online users as well as the guests.

Running a PHPBB2 forum.

Honor
Forumember

Female Posts : 172
Reputation : 17
Language : English
Location : Bouncing off the Walls

http://blueplanet.road2us.com

Back to top Go down

Solved Re: Only visible--->Users

Post by Honor on June 29th 2010, 9:42 pm

*bump*

Honor
Forumember

Female Posts : 172
Reputation : 17
Language : English
Location : Bouncing off the Walls

http://blueplanet.road2us.com

Back to top Go down

Solved Re: Only visible--->Users

Post by h4ckerz on June 30th 2010, 6:51 am

Johnson5756 wrote:Try this.

Code:
<!-- BEGIN switch_user_logged_in>
CONTENT HERE
<!-- END switch_user_logged_in>

Where you put the code?

h4ckerz
New Member

Posts : 14
Reputation : 0
Language : ENGLISH

Back to top Go down

Solved Re: Only visible--->Users

Post by Honor on June 30th 2010, 8:45 am

In my overall_footer, where my chatbox code is.

Edit:
The chatbox code went where "Content goes here" was. This made it disappear from both the guest's sight as well as the members - even us admin.

Honor
Forumember

Female Posts : 172
Reputation : 17
Language : English
Location : Bouncing off the Walls

http://blueplanet.road2us.com

Back to top Go down

Solved Re: Only visible--->Users

Post by Darren1 on June 30th 2010, 9:18 am

Hello,

@Honor wrote:Hey I just tried this code for a chatbox I put in myself - it hides it from everyone, including members =/

Can you prove a screenshot please?
Also, the URL of your forum, and the code & location in which you put it in.

Darren1
Helper
Helper

Male Posts : 11853
Reputation : 563
Language : English

Back to top Go down

Solved Re: Only visible--->Users

Post by Honor on June 30th 2010, 8:38 pm


---> Normal chatbox, viewed as admin


----> Coding for chatbox, placed in Templates>General>Overall_Footer


----> Added the code:
<!-- BEGIN switch_user_logged_in>
CONTENT HERE
<!-- END switch_user_logged_in>


-----> Still logged in as admin, but now chatbox is invisible. (Published, not the preview)

http://blueplanet.road2us.com

Honor
Forumember

Female Posts : 172
Reputation : 17
Language : English
Location : Bouncing off the Walls

http://blueplanet.road2us.com

Back to top Go down

Solved Re: Only visible--->Users

Post by Honor on July 2nd 2010, 5:05 pm

bump

Honor
Forumember

Female Posts : 172
Reputation : 17
Language : English
Location : Bouncing off the Walls

http://blueplanet.road2us.com

Back to top Go down

Solved Re: Only visible--->Users

Post by itsEricIndustries on July 2nd 2010, 5:25 pm

I can see it perfectly without being logged in. Have you taken the code out temporarily?

itsEricIndustries
Forumember

Posts : 35
Reputation : 0
Language : English

Back to top Go down

Solved Re: Only visible--->Users

Post by Honor on July 2nd 2010, 5:55 pm

yes because it was hiding it from everyone.

Honor
Forumember

Female Posts : 172
Reputation : 17
Language : English
Location : Bouncing off the Walls

http://blueplanet.road2us.com

Back to top Go down

Solved Re: Only visible--->Users

Post by itsEricIndustries on July 2nd 2010, 6:02 pm

Okay. I'm not sure what the problem is, I was just wondering.

itsEricIndustries
Forumember

Posts : 35
Reputation : 0
Language : English

Back to top Go down

Solved Re: Only visible--->Users

Post by Darren1 on July 3rd 2010, 2:44 am

Hello,

Could you provide me with the code that you are using?
Also, do you want it on the bottom of every single page, or only the index?

Darren1
Helper
Helper

Male Posts : 11853
Reputation : 563
Language : English

Back to top Go down

Solved Re: Only visible--->Users

Post by Honor on July 3rd 2010, 3:13 pm

Code:
<center><br><b><u>Enjoy the Chat!</u></b><br>Ask a Question ~ Drop a Tag ~ Get to Know Your Fellow Gamers<br><object width="800" height="600" id="obj_1277926756990"><param name="movie" value="http://bpchatter.chatango.com/group"/><param name="wmode" value="transparent"/><param name="AllowScriptAccess" VALUE="always"/><param name="AllowNetworking" VALUE="all"/><param name="AllowFullScreen" VALUE="true"/><param name="flashvars" value="cid=1277926756990&c=FFFFFF&d=6699FF&e=000000&g=FFFFFF&h=000000&j=FFFFFF&k=CCCCCC&l=000000&m=0066FF&n=FFFFFF&p=12&q=999999&s=1&v=0&w=0"/><embed id="emb_1277926756990" src="http://bpchatter.chatango.com/group" width="800" height="600" wmode="transparent" allowScriptAccess="always" allowNetworking="all" type="application/x-shockwave-flash" allowFullScreen="true" flashvars="cid=1277926756990&c=FFFFFF&d=6699FF&e=000000&g=FFFFFF&h=000000&j=FFFFFF&k=CCCCCC&l=000000&m=0066FF&n=FFFFFF&p=12&q=999999&s=1&v=0&w=0"></embed></object><br>Observe Forum Rules ~ No Spamming ~ Leave RL at the Banner<br></center><br>

Yes every single page (works when i put it in the forum overall_footer)

Honor
Forumember

Female Posts : 172
Reputation : 17
Language : English
Location : Bouncing off the Walls

http://blueplanet.road2us.com

Back to top Go down

Solved Re: Only visible--->Users

Post by marvso on July 3rd 2010, 9:07 pm

The BEGIN/END tag thingies are missing the "--" part of the ending. Try this, I tested it and it worked for me:
Code:
<!-- BEGIN switch_user_logged_in -->
<center><br><b><u>Enjoy the Chat!</u></b><br>Ask a Question ~ Drop a Tag ~ Get to Know Your Fellow Gamers<br><object width="800" height="600" id="obj_1277926756990"><param name="movie" value="http://bpchatter.chatango.com/group"/><param name="wmode" value="transparent"/><param name="AllowScriptAccess" VALUE="always"/><param name="AllowNetworking" VALUE="all"/><param name="AllowFullScreen" VALUE="true"/><param name="flashvars" value="cid=1277926756990&c=FFFFFF&d=6699FF&e=000000&g=FFFFFF&h=000000&j=FFFFFF&k=CCCCCC&l=000000&m=0066FF&n=FFFFFF&p=12&q=999999&s=1&v=0&w=0"/><embed id="emb_1277926756990" src="http://bpchatter.chatango.com/group" width="800" height="600" wmode="transparent" allowScriptAccess="always" allowNetworking="all" type="application/x-shockwave-flash" allowFullScreen="true" flashvars="cid=1277926756990&c=FFFFFF&d=6699FF&e=000000&g=FFFFFF&h=000000&j=FFFFFF&k=CCCCCC&l=000000&m=0066FF&n=FFFFFF&p=12&q=999999&s=1&v=0&w=0"></embed></object><br>Observe Forum Rules ~ No Spamming ~ Leave RL at the Banner<br></center><br>
<!-- END switch_user_logged_in -->
Not to high jack a thread, but does anyone know the statement to display something to someone who is not logged in? Or should I maybe start my own support topic... Embarassed

marvso
Forumember

Posts : 55
Reputation : 0
Language : English

http://www.mariovsonic.clictopics.com

Back to top Go down

Solved Re: Only visible--->Users

Post by Darren1 on July 4th 2010, 4:56 am

Indeed that code does work, thanks for that Marvso Smile

Marvso, do you mean a guest only message?
Ifso, my tutorial will help => http://help.forumotion.com/tricks-tips-f32/guest-message-phpbb2-and-punbb-only-t35641.htm Wink

Darren1
Helper
Helper

Male Posts : 11853
Reputation : 563
Language : English

Back to top Go down

Solved Re: Only visible--->Users

Post by Honor on July 4th 2010, 8:45 pm

It works! Grazie, peeps. Smile

Honor
Forumember

Female Posts : 172
Reputation : 17
Language : English
Location : Bouncing off the Walls

http://blueplanet.road2us.com

Back to top Go down

Solved Re: Only visible--->Users

Post by RoNo on July 4th 2010, 11:18 pm

Glad you got what you wanted, Honor. Nice work guys.


For those without template editing (Invision, Phpbb3)

You can show content to guests only like this...


Place this script in "site description"
Code:
<script type=text/javascript>var p='{USERNAME}';</script>


Add your content like this:

[ Homepage example ]

Add to:
Admin PanelDisplayHomepageGeneralitiesMessage content
Code:
<div id="guests1">

Content Here

</div>

<script type="text/javascript">
<!--
if(p=="Guest")
{}
else
{ /* remove guest panel */
document.getElementById('guests1').style.display='none';
if(document.getElementById('show_panel')>-1)
{}
}
-->
</script>
You can change both ID's titled: guests1 to whatever you want.



Since the issue appears to be resolved,
this topic is closed.
RoNo
General rules
Tricks & Tips
FAQ listing
For founders who lost their passwords
About support requests by PM
Announcements & Updates

RoNo
Active Poster

Male Posts : 1270
Reputation : 135
Language : English
Location : Laguna Beach, California

http://bf2mercenaries.forumotion.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