There are several places where through the use of template variables the backend outputs HTML code blocks in the template files. This is in bad practices for several reasons. Most notably it is generating bad semantic code.
Reasoning:
- Generation of bad semantic code
- Progression limits HTML and CSS progression, as time goes on and the languages change the back-end would have to be changed to reflect this.
- Restricts theme authors in the development process causing further complexity to an already complex and lengthy process.
- Increases the amount of styling required to match the design based on the poor semantics and rigid output.
The LIST:
- index.html
{LOGGED_IN_USER_LIST} - Should be rewritten separating the label of Registered users: out as a separate variable and the content should then be a comma delimited block of text like how the legend works directly under it.
- posting-editor.html
{BBCODE_STATUS}, {IMG_STATUS}, {FLASH_STATUS}, {URL_STATUS}, {SMILIES_STATUS} - needs restructured to reflect the semantic structure. EXP: <dt>BBCODE</dt> <dd>ON</dd> the "is" should be added via css since you could infact just use a colon.
- {PAGINATION} - Should be rewritten to export a link or span containing for each page with in an order list, rather than the mess it exports currently. Personally i would prefer having it just export span or anchor and use a loop with in the html to call it this way the classes used for styling it would be completely up to the individual coding the template. Either that or we need dynamic variables similar to what wordpress uses for it category list function where it can accept parameters.
- viewtopic_body.html
{postrow.EDITED_MESSAGE} - Needs separated into 2 variables the author info can be pulled from the postrow already, but the rest needs split into the date and the message to reflect proper semantics.
EXP of how it should be implementedCode: Select all
<cite> <span>{L_POST_BY_AUTHOR} <strong>{postrow.POST_AUTHOR_FULL}</strong> on <span class="time">{postrow.EDITED_DATE}</span>{postrow.EDITED_DATE}</span> </cite>
EXP of Rendered codeCode: Select all
<cite> <span>Last edited by <strong>Username</strong> on <span class="time">Fri Jan 01, 2010 6:21 pm</span>, edited 2 times in total.</span> </cite>
- Images - All template variables containing images should be replaced with the text used for the alt tags for said images and the images themselves should be handled through css IE {postrow.U_MINI_POST} should be <a class="post-icon" href="{postrow.U_MINI_POST}">{postrow.L_MINI_POST}</a> or something like that the anchor tag needs to be hand written for maximum flexability.
Other variables that would fall under this are
{UNAPPROVED_IMG}this should be replaced with a variable containing the alt text in case css is disabled or for blind users
{REPORTED_IMG}this should be replaced with a variable containing the alt text in case css is disabled or for blind users
- Minor - others that might be fine but as common practice its still a bad idea
{S_MARK_OPTIONS}outputs an option tag with id and text, Id doeas not need to be dynamic just text
{S_MOVE_MARKED_OPTIONS}outputs an option tag with id and text, Id doeas not need to be dynamic just text