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.

Only visible--->Users

+5
h4ckerz
Honor
Japorized
ankillien
Kiekeboe
9 posters

Go down

Solved Only visible--->Users

Post by Kiekeboe 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
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 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
ankillien
Energetic

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

Back to top Go down

Solved Re: Only visible--->Users

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

Try this.

Code:
<!-- BEGIN switch_user_logged_in>
CONTENT HERE
<!-- END switch_user_logged_in>
Japorized
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 June 1st 2010, 11:35 am

Thanx! That's what I ment Very Happy
Kiekeboe
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 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 =/
avatar
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 June 2nd 2010, 1:49 am

*bump*
avatar
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 June 4th 2010, 4:20 pm

*Bump* Sheesh!
avatar
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 June 7th 2010, 8:07 am

Perhaps you have hidden the chatbox, including the contents
Japorized
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 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.
avatar
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 June 29th 2010, 9:42 pm

*bump*
avatar
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 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
h4ckerz
New Member

Posts : 14
Reputation : 0
Language : ENGLISH

Back to top Go down

Solved Re: Only visible--->Users

Post by Honor 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.
avatar
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 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
Darren1
Helper
Helper

Male Posts : 11853
Reputation : 566
Language : English

Back to top Go down

Solved Re: Only visible--->Users

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

Only visible--->Users Pictur10
---> Normal chatbox, viewed as admin

Only visible--->Users Pictur10
----> Coding for chatbox, placed in Templates>General>Overall_Footer

Only visible--->Users Pictur11
----> Added the code:
<!-- BEGIN switch_user_logged_in>
CONTENT HERE
<!-- END switch_user_logged_in>

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

http://blueplanet.road2us.com
avatar
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 July 2nd 2010, 5:05 pm

bump
avatar
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 July 2nd 2010, 5:25 pm

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

Posts : 35
Reputation : 0
Language : English

Back to top Go down

Solved Re: Only visible--->Users

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

yes because it was hiding it from everyone.
avatar
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 July 2nd 2010, 6:02 pm

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

Posts : 35
Reputation : 0
Language : English

Back to top Go down

Solved Re: Only visible--->Users

Post by Darren1 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
Darren1
Helper
Helper

Male Posts : 11853
Reputation : 566
Language : English

Back to top Go down

Solved Re: Only visible--->Users

Post by Honor 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)
avatar
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 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
avatar
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 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 => https://help.forumotion.com/tricks-tips-f32/guest-message-phpbb2-and-punbb-only-t35641.htm Wink
Darren1
Darren1
Helper
Helper

Male Posts : 11853
Reputation : 566
Language : English

Back to top Go down

Solved Re: Only visible--->Users

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

It works! Grazie, peeps. Smile
avatar
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 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 Panel»Display»Homepage»Generalities»Message 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.
Only visible--->Users Locked1Only visible--->Users Lock2
RoNo
Only visible--->Users Bullet_blue2 General rules
Only visible--->Users Bullet_blue2 Tricks & Tips
Only visible--->Users Bullet_blue2 FAQ listing
Only visible--->Users Bullet_blue2 For founders who lost their passwords
Only visible--->Users Bullet_blue2 About support requests by PM
Only visible--->Users Bullet_blue2 Announcements & Updates
RoNo
RoNo
Active Poster

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

http://bf2mercenaries.forumotion.com/

Back to top Go down

Back to top

- Similar topics

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