PDA

View Full Version : detecting if the user is logged in


tommac3
04-14-2011, 11:21 PM
I have some java script that I would like to add into the site. However I would like that script to only be called if the user is not logged in.

Is there an easy way to do that?

Boofo
04-14-2011, 11:26 PM
A specific user or all non-logged-in users?

tommac3
04-15-2011, 01:02 AM
A specific user or all non-logged-in users?

Basically I want to execute if it is a guest

Xencored
04-15-2011, 01:28 AM
<vb:if condition="$show['guest']">JS Code</vb:if>

Boofo
04-15-2011, 01:49 AM
Or

<vb:if condition="$vbulletin->userinfo['userid'] == '0'">JS Code</vb:if>