I like to convert {if} statements into legitimate sentences, personally. Like if it says {if $[current_user.is_member]} I just go "if the current user is a member" and it helps me string the logic together. The only real bump I run into with that is if I use a variable that's not intended for it, such as one needed for a loop or such. xD
The {if} statements are basically telling you "if -this- fact is true/untrue, then do -this- code." If you then put an {else} code, it reads "if -this- fact is true/untrue, then do -this- code, otherwise do -this- code." And then finally if you sandwich an {elseif} in there it's like "If -this- fact is true/untrue, then do -this- code, if it's not but -this- fact is true/untrue, then do -this- code, if neither are true/untrue then do -this- code." Example:
{if $[current_user.is_staff]}
Say hello!
{elseif $[current_user.is_member]}
Say hi!
{else}
GO AWAY
{/if}
As you can see we use variables which are found in the righthand tree table thing in the Layout Templates. How that works is there is a main word and then if you click an arrow it gives you more options. Every time you go into a sub-list you add a period. Soo if it looked like:
[/ul][/ul]
That would be user.mini_custom_field.value and in this case that means the mini-profile custom profile field (that you can create in Admin)'s value, as in what the member has input into the empty field in Edit Profile. The format is a dollar symbol followed by bracket and a closing bracket at the end.
You can also do negative/untrue {if} statements and "if it equals -this-" type statements. To make an untrue one, throw an exclamation point before the dollar sign, i.e.
{if !$[current_user.is_member]}
the exclamation point means "if the current user is NOT a member" which means a guest.
To make an "if it equals -this-" type statement, throw in equal signs. Like:
{if $[user.mini_custom_field.name] == "Something"}
This is saying "if the user's mini-profile custom profile field is named Something, then do the following code." It's VERY useful when targeting things, particularly the custom fields. You can do that to target group/board/category IDs, individual member names, custom profile field names and values, etc.
You get 500 variables, 500 {if} statements, and 30 {foreach} loops per template (and per tab in a layout template, since usually there's more than one... at least I think it's per-tab... not positive). Not all variables work everywhere, you have to look in the righthand table thing to ensure it works on that page. For example, $[user.mini_custom_field.name] works ONLY in the mini-profile template. For, say, the thread list if you wanted to use the custom profile field of the thread creator, it'd be $[thread.created_by.custom_field.name]
What else... uhm... A few things require a {foreach} loop, such as custom profile fields, board list, thread list, etc. It simply means "put all of -them- here." Or "loop" them here. So then it would "loop" all of the threads in the thread list wherever you put the {foreach} loop. So it might be like...
{foreach $[user.mini_custom_field]}
$[user.mini_custom_field.name]: $[user.mini_custom_field.value]
{/foreach}
Which means "for each of the user's mini-profile custom fields, put the custom field's name, colon, custom field's answer. And it will do that for each custom field. Combining this with the {if} statements to target specific custom profile fields is how people customize them because you can have it say "for each of the user's custom profile fields, if the name of the field is Something then do -this- coding, otherwise do -this- coding."
I hope this helped at least a bit and any questions just post, I or someone else will do our best to assist =)