Including custom html depending on SMF member group?

Started by Nils Johan, December 14, 2004, 08:37:15 AM

Previous topic - Next topic

[Unknown]

Sounds like you have not included SSI.php first.

-[Unknown]

Harelin

That must be the issue because I don't know what you're talking about :)

I'm attempting to do this in my boardindex.template.php, at the bottom of my index - and if I needed to include SSI or whatnot to prevent guests from viewing this content, it must already be included because I got that working correctly as well as the code to require a minimum amount of posts to view... in the same section.

[Unknown]

You don't need SSI.php within the BoardIndex template.  Can you post a few lines above and below what you're trying to add?

-[Unknown]

Harelin

      echo '
        </table>
         </table>
  <BR>
<div align=center>
    <table width="75%
%" height="139" border="0" bgcolor="#50535B">
  <tr>
    <td width="22%" rowspan="2" bordercolor="#50535B" bgcolor="#50535B"><img src="http://www.evcitadel.com/triarii-icon.jpg" width="131" height="146"></td>
    <td width="78%" height="36" bordercolor="#50535B" bgcolor="#50535B"><font size="2" face="tahoma">
                      ';

if (in_array(66, $user_info['groups']))
{
echo 'You are a veteran member
        of Eternal Vigilance. It is your sworn duty to uphold and protect the
        ideals of the guild as you and your peers pave the way towards greatness.</em></font><BR><BR><font size="2" face="tahoma"><em>You possess the ability to vote in elections,
        run for election, or even spearhead new cohorts. You, as a revered veteran
        member, are responsible for swaying the course of the guild for years
        to come.';

        }
elseif ($context['user']['is_logged'])
{
echo 'alternate text';
}
else
{
echo 'guest text';
}


                echo '
        </em></font></p>
      </td>
  </tr>
</table> <BR>
</div>';
}

?>


should display (when I am in group 66)


but instead displays


granted I'm only trying to make the text in this instance dynamic and haven't even touched the image yet.

[Unknown]

$GLOBALS['user_info'] not $user_info.

-[Unknown]

Shoeb Omar

#25
out of interest (sorry to bring this right back up but I was searching for some stuff  and stumbled upon this, what is $context['user']['is_owner'] ?

I think I know now though - it's in the profile, so if this is the owner for this particular profile. Right?

[Unknown]


Shoeb Omar

Thanks.  Gotta store up these gems - soon SMF is going to be the user base for my site too hehe :)

Advertisement: