Templating ... a simple guide
Re: Templating ... a simple guide
Using Editplus is a matter of ... opening it, that's all, and it is reliable : no modifications done by itself without asking anything and introducing errors in files, well though products and handy design, and so much more. Just the exact opposit of dreamweaver . But anyway, use dreamweaver if you want, that's your choice .
Re: Templating ... a simple guide
Dreamweaver has never modified anything on me before. Maybe you're using an older copy or a um 'special' one ?Ptirhiik_ wrote:Using Editplus is a matter of ... opening it, that's all, and it is reliable : no modifications done by itself without asking anything and introducing errors in files, well though products and handy design, and so much more. Just the exact opposit of dreamweaver . But anyway, use dreamweaver if you want, that's your choice .
Re: Templating ... a simple guide
Please stop going offtopic. This thread is supposed to be for discussion of template system, not dreamweaver vs editplus thread.
Formerly known as CyberAlien.
Free phpBB styles | Premium responsive XenForo styles | Iconify - modern open source replacement for glyph fonts
Free phpBB styles | Premium responsive XenForo styles | Iconify - modern open source replacement for glyph fonts
Re: Templating ... a simple guide
i would like to see a simple style put out which is highly commented teaching someone how to make a systle
Re: Templating ... a simple guide
There isn't any final style yet, so it can't be done. When phpBB 2.2 will be in beta then it is possible.
Formerly known as CyberAlien.
Free phpBB styles | Premium responsive XenForo styles | Iconify - modern open source replacement for glyph fonts
Free phpBB styles | Premium responsive XenForo styles | Iconify - modern open source replacement for glyph fonts
Re: Templating ... a simple guide
Now, if I were to code something incorrectly in a template, is phpBB supposed to output any code at all or give me an error of some kind?
Re: Templating ... a simple guide
That depends on error. If you have some <!-- BEGIN something --> without <!-- END something --> or <!-- IF --> without <!-- ENDIF --> then it will show error, but if you have a typo like <!-- INCLUDES somefile.tpl --> then it will just ignore it because INCLUDES is not a known tag.
Formerly known as CyberAlien.
Free phpBB styles | Premium responsive XenForo styles | Iconify - modern open source replacement for glyph fonts
Free phpBB styles | Premium responsive XenForo styles | Iconify - modern open source replacement for glyph fonts
Re: Templating ... a simple guide
Another question to the new templating scheme:
I see it now employs a way to include PHP code. Is it, however, safeguarded so that I can:
<!-- PHP -->
echo ('{loop.VARIABLE}');
<!-- ENDPHP -->
without worrying about quotes, backslashes, etc.?
In my hacking of 2.0.7, I added an "S|" modifier, to use {S|loop.VARIABLE} to force phpBB to run the variable through addslashes() before outputting it to the template.
Is something like this in 2.2 ?
I see it now employs a way to include PHP code. Is it, however, safeguarded so that I can:
<!-- PHP -->
echo ('{loop.VARIABLE}');
<!-- ENDPHP -->
without worrying about quotes, backslashes, etc.?
In my hacking of 2.0.7, I added an "S|" modifier, to use {S|loop.VARIABLE} to force phpBB to run the variable through addslashes() before outputting it to the template.
Is something like this in 2.2 ?
Re: Templating ... a simple guide
For such code i suggest you use $this->_tpldata['loop'][$this->_loop_i]['VARIABLE']
Formerly known as CyberAlien.
Free phpBB styles | Premium responsive XenForo styles | Iconify - modern open source replacement for glyph fonts
Free phpBB styles | Premium responsive XenForo styles | Iconify - modern open source replacement for glyph fonts
Re: Templating ... a simple guide
Well, that's a workaround. One that'll, sadly, fail, should I decide to use JavaScript and not PHP in my template:CyberAlien wrote:For such code i suggest you use $this->_tpldata['loop'][$this->_loop_i]['VARIABLE']
<SCRIPT LANGUAGE="JavaScript1.2">
alert ('Hello {USERNAME}');
</SCRIPT>
... and the user happens to have an apostrophe in his nick. My {S|USERNAME} used to work in those cases quite nicely.
Seeing as there doesn't seem to be a ready and nice solution for this kind of situation in phpBB2.2, should I send it to the Requests box? Or am I too hasty? :)
Hmm, now that I think of it, I'd probably go for adding a couple more | modifiers. Like, H| for not-htmlspecialchars()-garbling and thus enabling pure HTML in variables that are usually given the safety treatment.