Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: Ryan on January 23, 2005, 03:39:05 PM

Title: if $User_info I need all the types.. Anyone know them?
Post by: Ryan on January 23, 2005, 03:39:05 PM
Hellooo

OK basicly ive always used
if ($user_info['is_guest'] == '1') echo 'Hello guest';
else echo '
Hello users and admins...

But what if i want to say hi to just the users..?  or just the admins

What is the userinfo for admins/ users / guests

i only know of this way for guest..

Im just assuming.. but there must be other ones.. is there?

I tried guessing..

if ($user_info['is_user'] == '1') echo 'Hello user';

Didnt work  ::)
Title: Re: if $User_info I need all the types.. Anyone know them?
Post by: Ryan on January 23, 2005, 07:25:47 PM
Ok anyone know usernfo is for global moderators?

Eg:
$user_info['????']
Title: Re: if $User_info I need all the types.. Anyone know them?
Post by: [Unknown] on January 23, 2005, 07:27:53 PM
in_array(2, $user_info['groups'])

-[Unknown]
Title: Re: if $User_info I need all the types.. Anyone know them?
Post by: Ryan on January 23, 2005, 07:34:35 PM
I was having trouble inserting it :/

Could you adjust this wokring code for admins to work the same way for global mods please :)

if ($user_info['is_admin'] == '1') echo '
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,42,0"
  id="Movie1" width="742" height="100">
  <param name="movie" value="http://h2kclan.com/Themes/h2k/admin.swf">
  <param name="bgcolor" value="#000000">
  <param name="quality" value="high">
  <param name="allowscriptaccess" value="samedomain">
  <embed type="application/x-shockwave-flash"
   pluginspage="http://www.macromedia.com/go/getflashplayer"
   width="742" height="100"
   name="Movie1" src="admin.swf"
   bgcolor="#000000" quality="high"
   swLiveConnect="true" allowScriptAccess="samedomain"
  ></embed>
</object>';
Title: Re: if $User_info I need all the types.. Anyone know them?
Post by: [Unknown] on January 23, 2005, 09:01:57 PM
if ($user_info['is_admin'] || in_array(2, $user_info['groups'])) echo '
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,42,0"
  id="Movie1" width="742" height="100">
  <param name="movie" value="http://h2kclan.com/Themes/h2k/admin.swf">
  <param name="bgcolor" value="#000000">
  <param name="quality" value="high">
  <param name="allowscriptaccess" value="samedomain">
  <embed type="application/x-shockwave-flash"
   pluginspage="http://www.macromedia.com/go/getflashplayer"
   width="742" height="100"
   name="Movie1" src="admin.swf"
   bgcolor="#000000" quality="high"
   swLiveConnect="true" allowScriptAccess="samedomain"
  ></embed>
</object>';

-[Unknown]
Title: Re: if $User_info I need all the types.. Anyone know them?
Post by: Kirby on January 23, 2005, 09:11:40 PM
embed is against the XHTML standards though :P I once had a tutorial on making flash all <object>