The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
escaping math operators?
PHP Code:
PHP Code:
say the score is 5-2 i don't want this to do the math and subtract 2 from 5 i want it to display as 5-2 |
#2
|
|||
|
|||
When I try this php script:
PHP Code:
5 - 2 as the output. But if it's not working for you, you could try PHP Code:
|
#3
|
|||
|
|||
PHP Code:
|
#4
|
|||
|
|||
Well yeah, you probably don't want to use echo, that was just a test program to show that "$cvote - $ovote" doesn't do the subtraction. I don't understand why the other option should be any different, but whatever, as long as your problem is solved.
|
#5
|
|||
|
|||
it seems like echo always puts the output at the very top of the page in the hook location... in the end you would want to put the variable inside of the template...
i can't echo $totalscore out because $totalscore is being inserted into the database... im making a mod that shows the results of your polls in your sig.... and i need an actual score display instead of it doing math (5-2) this didn't work btw it still does the math |
#6
|
|||
|
|||
Yeah, what I posted was just a "stand alone" php program, in vBulletin you usually don't want to use echo because vBulletin works by collecting up the output in a string then echoing it at the end, so if you call echo before that, whatever you echo will come out first. But the echo doesn't have anything to do with how the expression is evaluated, I just used it to output a string in the test program.
I guess maybe your problem is because the result of your string concatenation is an expression that is being eval'd later. I don't know how to fix it without understanding more of what's going on. Maybe someone else does. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|