
01-22-2005, 12:40 PM
|
|
|
Join Date: Aug 2004
Location: Netherlands
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by MarcoH64
Have a look at the following code. If you try to indend pieces of code that belong together, things might be easier to follow:
PHP Code:
construct_edit_toolbar(
iif($newpost['message'] == ''
, iif($foruminfo['forumid'] == 61
, 'New post Message empty, forumid = 61'
, iif($newpost['message']
, 'Something else have happened, this can never be'
, 'There is NO message and forumid is not 61, message is: ' . $newpost['message']
)
)
, iif($foruminfo['forumid'] == 61
, 'New post Message NOT empty, forumid = 61'
, iif($newpost['message']
, 'There is a message and forumid is not 61, message is: ' . $newpost['message']
, 'Something else have happened, this can never be.....'
)
)
)
, 0, $foruminfo['forumid'], $foruminfo['allowsmilies']);
I added a small test script to play with.
Just edit is until you got it right, then implement it in your real code, using real text.
PS Instead of putting those long multi-line text in you function call and iif statements, i suggest that you assign var's (or better an array) with these texts, and then use those vars in your statement.
This will reduce the size of the source for that statement, making it easier to see where you are going wrong.
|
thanks a lot!! I'll play with it!!
|