rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: RockS on December 01, 2007, 02:15:11 PM

Title: Please Help..
Post by: RockS on December 01, 2007, 02:15:11 PM
Hello,

i want to show only item date.. not TIME & DATE...

Date : 10/2/2007 1:45:27 AM  hot this ... show only date

EXAMPLE :

Date : 10/2/2007 . Like This.....

------------

anybody help how to add this any code ?

SORRY FOR MY POOR ENGLISH  :D
Title: Re: Please Help..
Post by: bacter on December 01, 2007, 03:04:01 PM
you can use a small java-script like this:

function dateonly(thedate)
   {
   document.write(thedate.substr(0,10));
   }   

then change in the sections file and folder:
%item-modified%
to:
<script language="javascript">dateonly('%item-modified%')</script>

example lines in file section:
from : <td class="row right">%item-modified%</td>
to : <td class="row right"><script language="javascript">dateonly('%item-modified%')</script></td>
Title: Re: Please Help..
Post by: maverick on December 01, 2007, 05:34:38 PM


Just put %date% anywhere in your template where you want it to appear.  You don't need all of that javascript shown above.
Title: Re: Please Help..
Post by: rejetto on December 01, 2007, 06:10:46 PM
sorry maverick (i sent you a private message) but %date% is current date, not related to the items.

if you are using the last beta version you can use {{substring|| |%item-modified%}}
Title: Re: Please Help..
Post by: maverick on December 01, 2007, 06:18:05 PM

My mistake.  I must have mis-read.  I assumed he was talking about current date.
Title: Re: Please Help..
Post by: RockS on December 01, 2007, 07:18:50 PM
waooooooooooooooooooo !!!  :D rejetto u r real ADMINISTRATOR  ;) u r genius ..... thxxxxxxxxxx

{{substring|| |%item-modified%}} its working.... thanks u very much