The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#16
|
|||
|
|||
Xenon,
Thank you! IMHO, this should be added as a hack or "how to" as this is quite a handy bit of coding. One question: How would I go about adding a second set of prepopulated text (for a different [additional] array of forum ids)? |
#17
|
||||
|
||||
you can cascade the iif's so something like:
Code:
construct_edit_toolbar(iif($newpost['message'] == '', iif($foruminfo['forumid'] == 1,'Your predefinied text for forum 1 here', iif($foruminfo['forumid'] == 2,'Your predefinied text for forum 2 here', iif($newpost['message'])), 0, $foruminfo['forumid'], $foruminfo['allowsmilies']); |
#18
|
|||
|
|||
Quote:
PHP Code:
|
#19
|
|||
|
|||
Quote:
|
#20
|
|||
|
|||
You lack a lot of closing )
I suggest that you start with only 1 iif, test it. Then keep adding them and testing until you got them all. |
#21
|
|||
|
|||
Quote:
Warning: Missing argument 2 for iif() in /includes/functions.php on line 326 |
#22
|
|||
|
|||
Well like i said, build the line by adding the iif's one by one. Sorry to tired now to go analyze your line.
|
#23
|
|||
|
|||
Quote:
|
#24
|
|||
|
|||
Post the code you used with only 1 and i will have a look
|
#25
|
|||
|
|||
Quote:
PHP Code:
|
#26
|
|||
|
|||
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:
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. |
#27
|
|||
|
|||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|