The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Trouble using eval()
I am trying to write a script that uses eval() to parse vBulletin variables and phrases from a string. However, I get a parse error if the string contains a colon : and probably if I tried a semicolon ; as well.
Is there a way to escape the colons with a function such as addslashes()? How do I get around this? |
#2
|
||||
|
||||
They don't need to be escaped. Can you post your code?
|
#3
|
|||
|
|||
Okay I got around escaping the colons. But here's what I'm trying to do:
The user enters a string containing a list of variables in an input field. These variables then need to be interpreted as globals, but the following oh so simple code won't work: PHP Code:
EDIT: Never mind. Although this would be nice to know for the future, I decided against user-entered globals this time around. |
#4
|
|||
|
|||
Wouldn't you use
PHP Code:
|
#5
|
|||
|
|||
Got it working.
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|