monForum
Mon 5th Jun '06, 5:43am
In a recent post in the vB 3.6 discussion area (http://www.vbulletin.com/forum/showpost.php?p=1139224&postcount=476), I made the following point regarding the possibility of 3.6 including the option for vB specific commenting in templates, which would not be passed through to the final HTML of the pages delivered. I realise now that that thread is primarily chit-chat over release notes, so am hoping I can make the same comments here and see if this might be a possibility. I think it would be a great step forward, not just for usability, but also bandwidth performance.
As a styles and template coder, I have found that the comments make it much easier for non-coders to follow what is going on in their code, and the indentation allows easy marrying up of tags to ensure that everything opened has subsequently been closed. Most vB owners will not get involved to heavily with the php files, but will modify their templates at some point, either throuogh experimentation or following instructions. The easier that the HTML is to read, the better it is for those who modify it, especially those who are not confident or fluent in HTML.
I'd be very keen for some release (perhaps 3.6) to allow for some kind of vB commenting in templates: rather than use HTML commenting tags, which remain in the page as it's parsed out to the user's browser, perhaps allow vB templates to be coded with special template codes (perhaps lines begining '##' or something akin to that), which allows scripters to make extremely verbose comments in templates, which are parsed out / ignored by vB when processing the template and delivering the page.
For example, if a snippet of a template is currently marked as follows:
<!-- This is the bit to insert the image variable: -->
<br>
<img src="$variable1">
<!-- And here is the description: -->
etc.
In the current system, that's exactly what the HTML of the end page will look like, save for the variables being expanded. But if a system of vB commenting were used, the above fictional template snipped could be coded as:
## This is the bit to insert the image variable:
<br>
<img src="$variable1">
## And here is the description:
etc.
vB would ignore its comment lines on parsing, so the actual HTML delivered on the page would be:
<br>
<img src="$variable1">
etc.
A system like this would allow coders / template designers to be exceptionally thorough in commenting up their changes, without those comments being passed to the actual pages. In the end this could save actually quite a lot of delivery bandwidth, especially on larger sites; and it's also just nice to be able to add comments into template that one might not want the curious end-user, who views the source, to see.
An added benefit is that the HTML comment tags could still be used, for those instances in which it might actually be helpful or desireable for the comment to appear in the final pages.
I know some other forum systems use internal commenting like this for templates and skins -- it would be a real asset to the streamlining of vB, I think, if this could be incorporated. It might not be such a far-off idea for 3.6, actually, given that it should be relatively easy to code in: just a line in the global template parser that instructs vB to ignore any line beginning ## (or whatever the comment code might be).
Any possibility of this?
As a styles and template coder, I have found that the comments make it much easier for non-coders to follow what is going on in their code, and the indentation allows easy marrying up of tags to ensure that everything opened has subsequently been closed. Most vB owners will not get involved to heavily with the php files, but will modify their templates at some point, either throuogh experimentation or following instructions. The easier that the HTML is to read, the better it is for those who modify it, especially those who are not confident or fluent in HTML.
I'd be very keen for some release (perhaps 3.6) to allow for some kind of vB commenting in templates: rather than use HTML commenting tags, which remain in the page as it's parsed out to the user's browser, perhaps allow vB templates to be coded with special template codes (perhaps lines begining '##' or something akin to that), which allows scripters to make extremely verbose comments in templates, which are parsed out / ignored by vB when processing the template and delivering the page.
For example, if a snippet of a template is currently marked as follows:
<!-- This is the bit to insert the image variable: -->
<br>
<img src="$variable1">
<!-- And here is the description: -->
etc.
In the current system, that's exactly what the HTML of the end page will look like, save for the variables being expanded. But if a system of vB commenting were used, the above fictional template snipped could be coded as:
## This is the bit to insert the image variable:
<br>
<img src="$variable1">
## And here is the description:
etc.
vB would ignore its comment lines on parsing, so the actual HTML delivered on the page would be:
<br>
<img src="$variable1">
etc.
A system like this would allow coders / template designers to be exceptionally thorough in commenting up their changes, without those comments being passed to the actual pages. In the end this could save actually quite a lot of delivery bandwidth, especially on larger sites; and it's also just nice to be able to add comments into template that one might not want the curious end-user, who views the source, to see.
An added benefit is that the HTML comment tags could still be used, for those instances in which it might actually be helpful or desireable for the comment to appear in the final pages.
I know some other forum systems use internal commenting like this for templates and skins -- it would be a real asset to the streamlining of vB, I think, if this could be incorporated. It might not be such a far-off idea for 3.6, actually, given that it should be relatively easy to code in: just a line in the global template parser that instructs vB to ignore any line beginning ## (or whatever the comment code might be).
Any possibility of this?