The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Need help on best coding approach
I have a mod I'm working on and in a certain place in my script I'm not sure if I should place the html code in a template or keep it in my script.
example: PHP Code:
In the example above, I'm using the conditionals in the script as opposed to using template conditions to determine if something is displayed. Which way is better? |
#2
|
|||
|
|||
Either method is correct. The same information gets into a template in either case.
Personally, in most cases I prefer to do it in the code. |
#3
|
|||
|
|||
Quote:
If you're the only one using it, do whatever is easiest for you. But if you're going to share it, you might as well save yourself the headache and make it simple as possible for the user. |
#4
|
|||
|
|||
I agree - if you're planning to release it here, for instance, I think it's nice to have everything in templates and phrases. Otherwise it doesn't matter so much.
|
#5
|
||||
|
||||
Thanks for the tips. I'm working on a Zazzle store front for vb actually. I'm planning on adding phrases and templates. I was having a momentary brain fart I guess. It does make sense to have all the html mark up in the template and just use conditionals to turn things off and on.
:up: |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|