<h3>In the Press</h3>On Sun, May 16, 2010 at 23:46, Amilcar do Carmo Lucas wrote:<br>> [...]<br>> Can we keep the moduleentry() function call and change its contents to<br>> <h1></h1> ?<br>> I would hate to have to change all the pages + translated pages.<br>
<br>What if I did it? :-)<br>Surely it must be possible to semi-automate this task...<br><br>On Mon, May 17, 2010 at 12:21 AM, Niko Sams <<a href="mailto:niko.sams@gmail.com">niko.sams@gmail.com</a>> wrote:<br>> I heavily modified it already, it's actually quite nice no have a<br>
> single function<br>> to change....<br><br>The problem is that the "<b><moduleentry><h1>TITLE</h1><div>CONTENT</div></</b><b>moduleentry</b><b>></b>" of the old style (which the <span style="font-family: courier new,monospace;">module_head</span><span style="font-family: courier new,monospace;">()</span>/<span style="font-family: courier new,monospace;">module_tail</span><span style="font-family: courier new,monospace;">()</span> php functions provided) doesn't map one-to-one with any single piece of markup that cleanly satisfies all possibilities encountered in the new style...<br>
Depending on the situation, the new style would ideally want that markup replaced by:<br><ol><li>"<b><h1>TITLE</h1> CONTENT</b>" (the first section of most pages other than the main page, e.g. "Logos and Banners" page)<br>
</li><li>"<b><h2>TITLE</h2> CONTENT</b>" (subsections on various pages, e.g. the news section on the front page)</li><li>"<b><box>CONTENT</box></b>" (e.g. the "what is KDevelop" box on the front page) ["<box></box>" is meant to symbolize the markup needed for the "Important content" boxes]<br>
</li><li>"<b><h2>TITLE></h2> <box>CONTENT</box></b>" (e.g. the "KDev3 vs KDev4" box
on the front page)</li></ol>Niko already tried to accommodate multiple (but not all) of these cases in a unified way, but it'll only get messier and messier.<br>That's why I think the best solution would be to edit the HTML files and just replace those php function calls by whatever <h1></h1> / <h2></h2> / etc. markup is actually needed in each situation.<br>
<br>It would of course make sense to use appropriate php functions for generating the markup of <i>actual boxes</i> (i.e., pieces of content which are actually graphically styled boxes in the new design), though.<br>I've committed an updated theme4.php that deprecates <span style="font-family: courier new,monospace;">module_head</span><span style="font-family: courier new,monospace;">()</span>/<span style="font-family: courier new,monospace;">module_tail</span><span style="font-family: courier new,monospace;">()</span> and defines <span style="font-family: courier new,monospace;">box_head()</span>/<span style="font-family: courier new,monospace;">box_tail()</span> (for graphically styled content boxes like on the front page), as well as <span style="font-family: courier new,monospace;">linkbox_head()</span>/<span style="font-family: courier new,monospace;">linkbox_tail()</span> (for the link boxes, as these need different markup). [The commit is self-contained and touches only this one file, so it should be easy to revert if you don't want this.]<br>
<br>Anyhow, with this, *all* occurences of <span style="font-family: courier new,monospace;">module_head</span><span style="font-family: courier new,monospace;">()</span>/<span style="font-family: courier new,monospace;">module_tail</span><span style="font-family: courier new,monospace;">()</span> can be nicely replaced by different combinations of <h1>'s, <h2>'s and the aforementioned new box functions.<br>
For example, the "KDev3 vs KDev4" section,<br>"<span style="font-family: courier new,monospace;"><?php module_head('Versions:', 'border main-versions');?> ... <?php module_tail();?></span>"<br>
would become:<br>"<span style="font-family: courier new,monospace;"><h2></span><span style="font-family: courier new,monospace;">Versions:</span><span style="font-family: courier new,monospace;"></h2></span><span style="font-family: courier new,monospace;"> <?php box_head('border </span><span style="font-family: courier new,monospace;">main-versions</span><span style="font-family: courier new,monospace;">');?> ... <?php box_tail();?></span>"<br>
<br>