Today, the "Submitted by X, on xx/xx/xx" is generated by the theme function theme_node_submitted(). This theme function glue the username and date variable inside a single sentence.
Advanced themers easily know how to override this function but for the average themers it may be very difficult for them to change how authorname and submitted date are presented.
Furthermore, I think that there are many case where authorname and submitted date are not on the same line. For example one may want to put the author name at the end while the submitted date stays at the top of a node.
This is why I propose that we make available the two variables to the node template. Instead of $submitted, we should make available $submitted_date and $author. Therefore even beginners would be able to change how the datas are presented by changing the markup inside node.tpl.php.
This would be done by :
1) Cancelling the theme_node_submitted() function
2) Adding two lines in template_preprocess_node
* One to create the $author variable (if theme settings OK)
* One to create the $submitted_date variable (if theme settings OK)
3) Change the node.tpl.php with a new markup that print "Submitted by $author on $submitted_date"
4) Change node.tpl.php in other core themes
If someone tells me it is not a bad idea I could try to do the patch.
|PASSED: [[SimpleTest]]: [MySQL] 27,400 pass(es).|
|PASSED: [[SimpleTest]]: [MySQL] 27,384 pass(es).|
|FAILED: [[SimpleTest]]: [MySQL] 27,378 pass(es), 0 fail(s), and 194 exception(es).|
|#52||364470-node-submittedby-regression-D7.patch||6.79 KB||Dave Reid|
|FAILED: [[SimpleTest]]: [MySQL] 26,784 pass(es), 3 fail(s), and 0 exception(es).|
|#49||364470-node-submittedby-regression-D7.patch||6.72 KB||Dave Reid|
|FAILED: [[SimpleTest]]: [MySQL] Invalid PHP syntax in comment.tpl.php.|