How make an 'IF' statement about a member

Discussion forum for MOD Writers regarding MOD Development.
Locked
User avatar
Elitzur
I've Been Banned!
Posts: 323
Joined: Sat Sep 15, 2007 7:49 am
Location: Europe, UK.
Contact:

How make an 'IF' statement about a member

Post by Elitzur »

Hey, can someone help me with making a member id 'IF' statement.

Say I wanted to display an image that goes above the post count say, what 'IF' statement would
I need to use to get a specific user, say I wanted the first ever account created on the forum
and that account name was called 'Admin', what would I use?

I have tried

Code: Select all

<!-- IF USER_ID == 'Admin' --> AND <!-- IF USER_ID == '1' -->
Any ideas? Thanks :)

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: How make an 'IF' statement about a member

Post by A_Jelly_Doughnut »

You have to adjust one of the PHP files to be able to do this effectively. The file is includes/functions.php, particularly the function page_header(). The user ID is not passed to the template by default.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51931
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: How make an 'IF' statement about a member

Post by Brf »

user_id is a number. If you wanted to check for user name, you could use

Code: Select all

<!-- IF S_USERNAME == 'Admin' --> 

Locked

Return to “[3.0.x] MOD Writers Discussion”