
Originally Posted by
Michael Morris
So you use smarty I take it?
I'd sooner put a bullet in my head.
Though I hate templating systems of the normal sort -- most of the time I end up screaming "Oh for crying out loud, just let me write the blasted PHP"
Probably part of what I LIKE about skinning SMF.
All you have to do is look at the retard code example on the site for smarty -- no self respecting PHP developer would write GARBAGE like this:
Code:
<?php if(!empty($foo)): ?>
<?php foreach($foo as $bar): ?>
<a href="<?=$bar['zig']?>"><?=$bar['zag']?></a>
<a href="<?=$bar['zig2']?>"><?=$bar['zag2']?></a>
<a href="<?=$bar['zig3']?>"><?=$bar['zag3']?></a>
<?php endforeach; ?>
<?php else: ?>
There were no rows found.
<?php endif; ?>
The "smarty" version being:
Code:
{foreach $foo as $bar}
<a href="{$bar.zig}">{$bar.zag}</a>
<a href="{$bar.zig2}">{$bar.zag2}</a>
<a href="{$bar.zig3}">{$bar.zag3}</a>
{foreachelse}
There were no rows found.
{/foreach}
Which of course doesn't actually INCLUDE THE IF STATEMENT making the code vague/meaningless if it's automatically doing that.,... all to do this:
Code:
if (!empty($foo)) {
foreach($foo as $bar) {
echo '
<a href="',$bar['zig'],'">',$bar['zag'],'</a>
<a href="',$bar['zig2'],'">',$bar['zag2'],'</a>
<a href="',$bar['zig3'],'">',$bar['zag3'],'</a>';
}
} else echo '
There were no rows found.';
With the <?php being once somewhere <on topic>way the **** **** up a the start of the program where it **** belongs</on topic> and the ?> occuring only once in the file <on topic>way the **** down at the ****** end</on topic> 
I really laugh at the IDIOCY whenever I see dumbass nimrod coding like this particular part:
<?php if(!empty($foo)): ?>
<?php foreach($foo as $bar): ?>
What was that coder trying to accomplish other than writing garbage code with that nonsense?!? Of course I say that whenever I see IDIOCY like:
<a href="<?php echo $bar['zig']; ?>">
which goes hand in hand with the idiocy of trying to use double quotes to echo... which is rarely as useful as people think... and if you REALLY wanted to use double quotes
echo "<a href='$bar['zig']'>";
Would work too.... even if it does take longer to execute since you have the complex parser involved.
Card stacking is the only excuse/explanation of that code; using an example of piss poor coding techniques to make their convoluted bloated system of nothingness look more useful than it actually is.
Of course they try to sell that to you as reduced syntax time, failing to mention it's another layer of abstraction atop PHP that adds to the execution time defeating the entire POINT. 
Off Topic:
This site really needs a facepalm smiley and a "crazy" smiley
Bookmarks