vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Programming Discussion :: Templating Systems: Variable / Code Format - View Topic
Topic Rating: *****
Printable View
Question: Which format do you think would work best?
Users may vote for 1 option
Braces: {variable_name}[####################################################################################################] (8 Votes / 100%)
Square Brackets: [variable_name][] (0 Votes / 0%)
Percentage Signs: %variable_name%[] (0 Votes / 0%)
HTML Style: <variable_name>[] (0 Votes / 0%)
Other (Please Specify)[] (0 Votes / 0%)
Ross
Administrator
*****

[Avatar]

Posts: 3,709
Status: Offline
Gender: Male
Age: 8 11
Joined:  

Additional Groups:
Support Team
***


Reputation: 45%  


pmwwwtwittergtalkvForum
Templating Systems: Variable / Code Format (13th Mar 09 at 11:48pm UTC)
Have your say on templating systems
Hello Coders, Developers and Programmers,

This question isn't necessarily for vForums. I'm asking partly for a Content Management System I am involved in and partly for future changes to our templating system in use here.

As many will know, the variables used in our current templates (such as mini-profile and info-center) are in the format {variable_name} and the if statements look like {if:variable_name}{/if:variable_name}. But I'd like to hear your thoughts on what format you think looks and works the best? I'd also be interested in hearing views on what other code (if statements, else if, foreach etc) you think should be available as well as any other comments or suggestions you may have.

Image
Nick
Very Senior Member
*****

[Avatar]

Posts: 3,012
Status: Offline
Gender: Male
Location: vForums
Age: 33
Joined:  
Reputation: 62%  


pmwww
Re: Templating Systems: Variable / Code Format (14th Mar 09 at 6:05am UTC)
AHH!! I can't decide!!! {Sad}

I like the current format but there should be more of them added. Like if you have it like this:
Code:
 
  1. We would like to welcome {newest_members:1} to forum.<br />
  2. {if:member}Welcome, You have {new_pms} new PM's and a total of {total_pms} PM's.{/if:member}
 
Now there is only one <br /> in it, but it seems that {newest_members:1} is also like a break. ex: Image

and yeah it's supposed to have "Mage Designs" after new member, but it don't. and the one I am showing you is the "Mage Designs skin." so if you check it out make sure you click on that skin.

http://dmtesting.vforums.co.uk/

But I'm not sure, square would probably be best.
Michael
Moderator
*****

[Avatar]
Recoding the future

Posts: 4,043
Status: Offline
Gender: Male
Location: UK
Joined:  

Additional Groups:
Coding Team
***


Reputation: 58%  


pmtwittervForum
Re: Templating Systems: Variable / Code Format (16th Mar 09 at 2:26pm UTC)
Keep it as it is... they're cool ... sleak & easy to notice... What would be cool would be to fix some of the 'minor bugs' with them ... like the one pointed out in the post before this one! {Smile}
Ross
Administrator
*****

[Avatar]

Posts: 3,709
Status: Offline
Gender: Male
Age: 8 11
Joined:  

Additional Groups:
Support Team
***


Reputation: 45%  


pmwwwtwittergtalkvForum
Re: Templating Systems: Variable / Code Format (16th Mar 09 at 11:16pm UTC)
 
Keep it as it is... they're cool ... sleak & easy to notice... What would be cool would be to fix some of the 'minor bugs' with them ... like the one pointed out in the post before this one! {Smile}


To fix things like that I need to come up with a decent foreach system and a good if/else system. I did spend some hours today building such a system which will need just a little more testing. It'd enable something like:

<foreach newest_members>
<a href="%newest_member_link%" class="%newest_member_groups%">%newest_member_display%</a>
<if (!foreach_last)>, </if>
</foreach>


But like I say, a system like that will need a little more thought and a little more testing {Smile}

Image
ashkir
Full Member
***

[Avatar]

Posts: 1,159
Status: Offline
Gender: Male
Location: Cali!
Age: 34
Joined:  
Reputation: 42%  


pmtwitterskypemsnyahoo
Re: Templating Systems: Variable / Code Format (17th Mar 09 at 6:22am UTC)
I am a fan of { } honestly. Got used to them with YaBB software.
(¯`•Stormraven•._)
Junior Member
**

[Avatar]
CodersHangout.co.uk

Posts: 81
Status: Offline
Gender: Male
Location: $_home
Age: 35
Joined:  
Reputation: 0%  


pmwww
Re: Templating Systems: Variable / Code Format (23rd Mar 09 at 8:39pm UTC)
I think {variable_name} would be good {Smile}

Design and Programming Forums
GlitchesSocom
Junior Member
**

[Avatar]
Will code JavaScript for food.

Posts: 67
Status: Offline
Gender: Male
Location: USA
Age: 34
Joined:  
Reputation: 16%  


pmwwwmsnyahooaimgtalkvForum
Re: Templating Systems: Variable / Code Format (27th Mar 09 at 2:01am UTC)
I like the current {braces}

But I do think we need to make some of the template variables into global ones. If we had full control over all the vforum variables in the templates and for global use it could prove quite useful *hint* *hint* {Cool}

Image
 Printable View

All times are GMT+0 :: The current time is 7:28am
Page generated in 5.8697 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums