diff --git modules/comment/comment.module modules/comment/comment.module
index bdf5933..2639534 100644
--- modules/comment/comment.module
+++ modules/comment/comment.module
@@ -2240,6 +2240,7 @@ function template_preprocess_comment(&$variables) {
$variables['title'] = l($comment->subject, $uri['path'], $uri['options']);
$variables['permalink'] = l(t('Permalink'), $uri['path'], $uri['options']);
+ $variables['submitted'] = t('Submitted by !username on !datetime', array('!username' => $variables['author'], '!datetime' => $variables['created']));
// Preprocess fields.
field_attach_preprocess('comment', $comment, $variables['elements'], $variables);
diff --git modules/comment/comment.tpl.php modules/comment/comment.tpl.php
index 287a931..c204590 100644
--- modules/comment/comment.tpl.php
+++ modules/comment/comment.tpl.php
@@ -19,6 +19,8 @@
* desired parameters on the $comment->changed variable.
* - $new: New comment marker.
* - $permalink: Comment permalink.
+ * - $submitted: Submission information created from $author and $created during
+ * template_preprocess_comment().
* - $picture: Authors picture.
* - $signature: Authors signature.
* - $status: Comment status. Possible values are:
@@ -69,10 +71,7 @@
>
diff --git modules/node/node.module modules/node/node.module
index 0656f78..48804ab 100644
--- modules/node/node.module
+++ modules/node/node.module
@@ -1438,11 +1438,11 @@ function template_preprocess_node(&$variables) {
// Display post information only on certain node types.
if (variable_get('node_submitted_' . $node->type, TRUE)) {
- $variables['display_submitted'] = TRUE;
+ $variables['submitted'] = t('Submitted by !username on !datetime', array('!username' => $variables['name'], '!datetime' => $variables['date']));
$variables['user_picture'] = theme_get_setting('toggle_node_user_picture') ? theme('user_picture', array('account' => $node)) : '';
}
else {
- $variables['display_submitted'] = FALSE;
+ $variables['submitted'] = '';
$variables['user_picture'] = '';
}
diff --git modules/node/node.tpl.php modules/node/node.tpl.php
index 19b5f0c..dbc6a29 100644
--- modules/node/node.tpl.php
+++ modules/node/node.tpl.php
@@ -16,7 +16,8 @@
* calling format_date() with the desired parameters on the $created variable.
* - $name: Themed username of node author output from theme_username().
* - $node_url: Direct url of the current node.
- * - $display_submitted: whether submission information should be displayed.
+ * - $submitted: Submission information created from $name and $date during
+ * template_preprocess_node().
* - $classes: String of classes that can be used to style contextually through
* CSS. It can be manipulated through the variable $classes_array from
* preprocess functions. The default values can be one or more of the
@@ -87,12 +88,9 @@
-
+
- $name, '!datetime' => $date));
- ?>
+
diff --git modules/rdf/rdf.module modules/rdf/rdf.module
index 7dd689e..4d02355 100644
--- modules/rdf/rdf.module
+++ modules/rdf/rdf.module
@@ -499,10 +499,16 @@ function rdf_preprocess_node(&$variables) {
if (!empty($variables['rdf_mapping']['created'])) {
$date_attributes_array = rdf_rdfa_attributes($variables['rdf_mapping']['created'], $variables['created']);
$variables['rdf_template_variable_attributes_array']['date'] = $date_attributes_array;
+ if ($variables['submitted']) {
+ $variables['rdf_template_variable_attributes_array']['submitted'] = $date_attributes_array;
+ }
}
// Adds RDFa markup for the relation between the node and its author.
if (!empty($variables['rdf_mapping']['uid'])) {
$variables['rdf_template_variable_attributes_array']['name']['rel'] = $variables['rdf_mapping']['uid']['predicates'];
+ if ($variables['submitted']) {
+ $variables['rdf_template_variable_attributes_array']['submitted']['rel'] = $variables['rdf_mapping']['uid']['predicates'];
+ }
}
// Adds RDFa markup annotating the number of comments a node has.
@@ -679,10 +685,12 @@ function rdf_preprocess_comment(&$variables) {
// cached as part of the entity.
$date_attributes_array = $comment->rdf_data['date'];
$variables['rdf_template_variable_attributes_array']['created'] = $date_attributes_array;
+ $variables['rdf_template_variable_attributes_array']['submitted'] = $date_attributes_array;
}
// Adds RDFa markup for the relation between the comment and its author.
if (!empty($comment->rdf_mapping['uid'])) {
$variables['rdf_template_variable_attributes_array']['author']['rel'] = $comment->rdf_mapping['uid']['predicates'];
+ $variables['rdf_template_variable_attributes_array']['submitted']['rel'] = $comment->rdf_mapping['uid']['predicates'];
}
if (!empty($comment->rdf_mapping['title'])) {
// Adds RDFa markup to the subject of the comment. Because the RDFa markup
diff --git themes/bartik/template.php themes/bartik/template.php
index 657c305..c69c77a 100644
--- themes/bartik/template.php
+++ themes/bartik/template.php
@@ -100,6 +100,13 @@ function bartik_process_maintenance_page(&$variables) {
}
/**
+ * Override or insert variables into the node template.
+ */
+function bartik_preprocess_node(&$variables) {
+ $variables['submitted'] = t('published by !username on !datetime', array('!username' => $variables['name'], '!datetime' => $variables['date']));
+}
+
+/**
* Override or insert variables into the block template.
*/
function bartik_preprocess_block(&$variables) {
diff --git themes/bartik/templates/comment.tpl.php themes/bartik/templates/comment.tpl.php
index 920bd3b..0a6f57a 100644
--- themes/bartik/templates/comment.tpl.php
+++ themes/bartik/templates/comment.tpl.php
@@ -19,6 +19,8 @@
* desired parameters on the $comment->changed variable.
* - $new: New comment marker.
* - $permalink: Comment permalink.
+ * - $submitted: Submission information created from $author and $created during
+ * template_preprocess_comment().
* - $picture: Authors picture.
* - $signature: Authors signature.
* - $status: Comment status. Possible values are:
diff --git themes/bartik/templates/node.tpl.php themes/bartik/templates/node.tpl.php
index 6961698..f113416 100644
--- themes/bartik/templates/node.tpl.php
+++ themes/bartik/templates/node.tpl.php
@@ -16,7 +16,8 @@
* calling format_date() with the desired parameters on the $created variable.
* - $name: Themed username of node author output from theme_username().
* - $node_url: Direct url of the current node.
- * - $display_submitted: whether submission information should be displayed.
+ * - $submitted: Submission information created from $name and $date during
+ * template_preprocess_node().
* - $classes: String of classes that can be used to style contextually through
* CSS. It can be manipulated through the variable $classes_array from
* preprocess functions. The default values can be one or more of the
@@ -87,13 +88,10 @@
-
+
- $name, '!datetime' => $date));
- ?>
+
diff --git themes/garland/comment.tpl.php themes/garland/comment.tpl.php
index 783b259..cc8d801 100644
--- themes/garland/comment.tpl.php
+++ themes/garland/comment.tpl.php
@@ -5,7 +5,7 @@
-
—
+
diff --git themes/garland/node.tpl.php themes/garland/node.tpl.php
index 8c54eee..42ab749 100644
--- themes/garland/node.tpl.php
+++ themes/garland/node.tpl.php
@@ -11,8 +11,8 @@
-
-
—
+
+
>
diff --git themes/garland/template.php themes/garland/template.php
index 0c908e3..a45d113 100644
--- themes/garland/template.php
+++ themes/garland/template.php
@@ -114,6 +114,20 @@ function garland_preprocess_page(&$vars) {
}
/**
+ * Override or insert variables into the node template.
+ */
+function garland_preprocess_node(&$vars) {
+ $variables['submitted'] = $variables['date'] . ' — ' . $variables['name'];
+}
+
+/**
+ * Override or insert variables into the comment template.
+ */
+function garland_preprocess_comment(&$vars) {
+ $variables['submitted'] = $variables['created'] . ' — ' . $variables['author'];
+}
+
+/**
* Override or insert variables into the block template.
*/
function garland_preprocess_block(&$vars) {