Drupal 7 + Pixture Reloaded

Created on 21 April 2025, 18 days ago

This module doesnยดt work with Drupal 7 + Pixture Reloaded Theme unless I make changes to sites/all/themes/pixture_reloaded/template.php and copy modules/node/note.tpl.php to /sites/all/themes/pixture_reloaded/templates/note.tpl.php and make some changes on it.

At the end of template.php:

function pixture_reloaded_preprocess_node(&$vars) {
  if (!empty($vars['node']->changed)) {
    // $vars['updated_value'] = format_date($vars['node']->changed, 'custom', 'd/m/Y H:i:s');	
	$vars['updated_value'] = format_date($vars['node']->changed, 'custom', 'd/m/Y');
	$vars['updated_time']  = format_date($vars['node']->changed, 'custom', 'H:i:s');	
  }
}

In note.tpl.php just after the code to display $submited var:

<?php if (isset($node->show_updated) && $node->show_updated) :?>
	<?php if (!empty($updated_value)): ?>
	  <div class="updated-date">
		Atualizado em: <?php print $updated_value; ?> &agrave;s <?php print $updated_time; ?>
	  </div>
	<?php endif; ?>
<?php endif; ?>

Now it works. I hope it helps someone.

๐Ÿ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

๐Ÿ‡ง๐Ÿ‡ทBrazil numerabilis

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @numerabilis
  • ๐Ÿ‡ง๐Ÿ‡ทBrazil numerabilis
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mmarler

    Thanks for reporting this @numerabilis.

    The last updated date should be add to the $submitted variable that is printed in the node.tpl.php template:

    <?php if ($display_submitted) { ?>
        <div class="submitted">
          <?php print $submitted; ?>
        </div>
    <?php } ?>
    

    In Drupal 7 you need to enable this setting on each content type. Is it possible your content type doesn't have this enabled?

Production build 0.71.5 2024