Home Tips & Resources Joomla Move Last Updated Created Date
 
Joomla Move Last Updated Created Date PDF Print E-mail
Written by Travis Nuske   
If you feel this tip has saved you time or effort, please consider buying us a cuppa coffee to keep things going!

Use the following tip if you would like to move the last updated line on your Joomla 1.5 installation

Move Last Updated

Log into your webhost using ftp (or an file browser component like OSE FileManager) and browse to components/com_content/views/article/tmpl/default.php

Cut  this code from near the bottom of the page:

<?php if ( intval($this->article->modified) !=0 && $this->params->get('show_modify_date')) : ?>
<tr>
<td class="modifydate">
<?php echo JText::sprintf('LAST_UPDATED2', JHTML::_('date', $this->article->modified, JText::_('DATE_FORMAT_LC2'))); ?>
</td>
</tr>
<?php endif; ?>

and paste it near the top (or wherever you would like it to appear) - remember that the code is outputting a table row, so ideally you will paste the code inside a table. I paste it just underneath the code that prints the creation date - my code looks like this:

<?php if (($this->params->get('show_author')) && ($this->article->author != "")) : ?>
<tr>
<td valign="top">
<span class="small">
<?php JText::printf( 'Written by', ($this->escape($this->article->created_by_alias) ? $this->escape($this->article->created_by_alias) : $this->escape($this->article->author)) ); ?>
</span>
&nbsp;&nbsp;
</td>
</tr>
<?php endif; ?>

<?php if ($this->params->get('show_create_date')) : ?>
<tr>
<td valign="top" class="createdate">
<?php echo JHTML::_('date', $this->article->created, JText::_('DATE_FORMAT_LC2')) ?>
</td>
</tr>
<?php endif; ?>

<?php if ( intval($this->article->modified) !=0 && $this->params->get('show_modify_date')) : ?>
<tr>
<td class="modifydate">
<?php echo JText::sprintf('LAST_UPDATED2', JHTML::_('date', $this->article->modified, JText::_('DATE_FORMAT_LC2'))); ?>
</td>
</tr>
<?php endif; ?>

Save the file, and reload your site in a browser to check out your changes.

Last Updated on Thursday, 07 July 2011 09:48
 

Add comment


Security code
Refresh