Quote:
Originally posted by freddie
Yes conditionals were one of the first things to go into vb3 and that was before March 2002.
|
Great.. Although this is usually for power users, I believe conditionals add a lot of functionality to the board, so it's a very valuable addition to the script.. I'm using the concept since my webtemplates hack and didnt know you intented to add it to vb 3 and I'm very glad you did..
Quote:
2. The conditionals are parsed at the time you edit your templates since we now store two copies of every template. One with the conditionals asis, and one with any conditionals converted to accompanying php code so that there is no overhead when the templates are called by the forum.
|
I dont exactly understand what kind of algorithm you are following but if I'm not wrong, it will be much different than my approach. I parse them on the fly and I accept that this can add a small (IMO bearable) overhead to running time, but I believe it's the only way to code it, if functionality is the primary concern. This helps to have more than 1 conditionals in every template and also allow any variable to be used as a conditional.
Of course I'm sure you have a nice algorithm either..