[POLL] Template System

Here we can discuss suggestions and development of amxbans.
Nothing discussed in here are certain that it will be coded or added.

What should we do about the Template System

Keep it, I actually use it
10
43%
Keep it, I don't use it but I like the option
2
9%
I don't care either way
3
13%
Drop it, I don't use it
2
9%
Drop it, I hate it
6
26%
Other
0
No votes
 
Total votes: 23

Tsunami
SourceBans Developer
Posts: 1
Joined: 28 Aug 2013, 13:52

Re: [POLL] Template System

Postby Tsunami » 28 Aug 2013, 18:38

Maybe you can explain why you hate template engines, and what the alternative would be? PHP mixed with HTML?

I'm not familiar with AMXBans or how it's coded, but as a SourceBans developer I know a thing or two about building ban systems ;) Anyway, while I agree Smarty isn't the greatest template engine (we also got rid of it for SourceBans 2.0), they do have their advantages. Twig for example auto-escapes HTML, so you just do {{ someVariable }} instead of <?php echo htmlspecialchars($someVariable) ?>. Much more readable in my opinion :)

Twig also doesn't allow PHP in templates, you have to create your own extensions/filters/functions for that, so designers can't break your application (accidentally or intentionally). You're right that it doesn't matter for people that just change some colors, but if they do want to create their own theme, I think it's easier to learn a simple templating language than PHP.

Just my 2 cents :P I'm definitely looking into adding Twig, in addition to just PHP templates, to SourceBans 2.0.

YamiKaitou
Amxbans Developer
Posts: 257
Joined: 17 Apr 2013, 14:09

Re: [POLL] Template System

Postby YamiKaitou » 29 Aug 2013, 13:41

Tsunami wrote:Maybe you can explain why you hate template engines, and what the alternative would be? PHP mixed with HTML?

PHP mixed with HTML is the alternative. I like my code all in one place with everything separated correctly. I'm fine with using include files, I just don't see the need to go out of the way and separate the HTML from PHP. I find it easier to follow the workflow of the script if everything is laid out in front of me and I don't need to flip through 20 files to figure out where the problem is.

I'm not familiar with AMXBans or how it's coded, but as a SourceBans developer I know a thing or two about building ban systems ;) Anyway, while I agree Smarty isn't the greatest template engine (we also got rid of it for SourceBans 2.0), they do have their advantages. Twig for example auto-escapes HTML, so you just do {{ someVariable }} instead of <?php echo htmlspecialchars($someVariable) ?>. Much more readable in my opinion :)

I guess I'm more used to coding things for private use as I don't see the benefit of using template systems. It just adds more things that can go wrong.

Twig also doesn't allow PHP in templates, you have to create your own extensions/filters/functions for that, so designers can't break your application (accidentally or intentionally). You're right that it doesn't matter for people that just change some colors, but if they do want to create their own theme, I think it's easier to learn a simple templating language than PHP.

That might be something to look into. By the sounds of it and a quick look at their site, it might be something I would consider using.

Just my 2 cents :P I'm definitely looking into adding Twig, in addition to just PHP templates, to SourceBans 2.0.

Looking forward to the new version

TI INDIAN
Posts: 24
Joined: 31 Oct 2013, 09:50

Re: [POLL] Template System

Postby TI INDIAN » 03 Nov 2013, 09:05

oops edited* ... lol
Last edited by TI INDIAN on 04 Nov 2013, 19:46, edited 1 time in total.

YamiKaitou
Amxbans Developer
Posts: 257
Joined: 17 Apr 2013, 14:09

Re: [POLL] Template System

Postby YamiKaitou » 04 Nov 2013, 14:57

TI INDIAN wrote:Yamikatou dont think that... People hate it... So many people uses amxbans and they love it... but they dont vote.. They like amxbans... problem is that some haters just registered and shared their feelings.. or else it is the best :) trust me.. I am a game player and i know so many epople using it :)

Do you honestly have any idea what you are talking about? I believe you have completely missed the point of this thread

JoiNNN
Posts: 1
Joined: 08 Jun 2014, 17:45

Re: [POLL] Template System

Postby JoiNNN » 08 Jun 2014, 18:01

Although I don't see many people designing or caring much about the design of the bans page I think you should keep the templating system or even replace it with something easier to work with as Tsunami suggested. Removing the templating system and having to edit the .php and .css files to just change even a small thing and later not be able to update to newer versions because of these changes is not good.

Raheem
Posts: 29
Joined: 25 May 2014, 20:24
Location: Egypt
Contact:

Re: [POLL] Template System

Postby Raheem » 11 Jun 2014, 06:56

What is Template System :D
Image Free Palestine Image

nkSid
Posts: 8
Joined: 08 Feb 2016, 20:38

Re: [POLL] Template System

Postby nkSid » 21 Jun 2016, 20:27

Nice work guys Keep it Up


Return to “Development and Suggestions”

Who is online

Users browsing this forum: No registered users and 3 guests