117
I don't know the exact code you would use, but perhaps my suggestion will spark someone to throw it together for you. (I simply don't know enough about the syntax to do it.)
Basically, you can do it by modifying your "theme.html" file to include various "if" subsections. For instance, one of the things I like to do with my themes is create a line along the top that tells the user what account (s)he is logged in underm and if it's the wrong account (for instance, the person's roommate was on and forgot to log off) they can log out. The code looks like this:
Quote:
<{if $xoops_isuser}>
<TABLE WIDTH=100% BORDER=1 BORDERCOLOR=BLACK>
<TR>
<TD align=center valign=center>
<DIV CLASS="UserLoggedIn">
You are currently logged in as <a href="<{$xoops_url}>/user.php"><{$xoops_uname}></a>.
[ <a href="<{$xoops_url}>/user.php?op=logout"><font color=red><B>I am not <{$xoops_uname}></B></font></A> ]
</DIV>
</TD>
</TR>
</TABLE>
<{/if}>
Note that this makes the HTML inside the "if" statement display to any registered user and not display for users who have not logged in.
That much I can do, and I can tell you there must be a XOOPS variable that applies to the groups (it's probably a numeric value), but I don't know enough about the internal workings of XOOPS to be able to script it out for you.
My guess would be that your end code would look something like this:
Quote:
<{if $xoops_userlevel==1}>
<P>
You are a Registered User!
</P>
<{/if}>
<{if $xoops_userlevel==2}>
<P>
You are a Preferred User!
</P>
<{/if}>
To put it on the front page only, you would need to enclose the whole thing in this IF statement:
Quote:
<{if $SCRIPT_NAME == "index.php"}>
[ THE CODE FROM ABOVE WOULD GO HERE ]
<{/if}>
Again, that's just a guess. I just made up the "$xoops_userlevel" variable; I don't know what the actual name is (or even if it exists), and I don't know enough about PHP to tell you if I even have the syntax of the IF statement set up properly. Like I said, I'm just offering a strategy and not the actual code.
Is that (marginally) helpful?