xoops forums

Anonymous

Posted on: 2007/2/22 10:49
Anonymous
Anonymous (Show more)
Posts: 0
Since:
#1

How to load the date in my theme ?

Hi,

With joomla .. date can display in theme template by insert:

<?php echo mosCurrentDate(); ?>


What's about XOOPS ? how i can display the date in my theme without using any external javascript ?

irmtfan

Module Developer
Posted on: 2007/2/22 10:57
irmtfan
irmtfan (Show more)
Module Developer
Posts: 3419
Since: 2003/12/7
#2

Re: How to load the date in my theme ?

in XOOPS theme.html:
<{php}> echo(formatTimestamp(time(),"m"));<{/php}>

subzero_x

Just popping in
Posted on: 2007/2/22 12:13
subzero_x
subzero_x (Show more)
Just popping in
Posts: 72
Since: 2006/3/16
#3

Re: How to load the date in my theme ?

Hello Mowaffak We are working with this smarty:

<{$smarty.now|date_format:"%A, %B %e, %Y"}>

Regards

SubZero

http://streamtools.net professional themes for serious projects!

Anonymous

Posted on: 2007/2/22 12:35
Anonymous
Anonymous (Show more)
Posts: 0
Since:
#4

Re: How to load the date in my theme ?

Great

Thank you irmtfan and subzero_x .

irmtfan

Module Developer
Posted on: 2007/2/23 7:51
irmtfan
irmtfan (Show more)
Module Developer
Posts: 3419
Since: 2003/12/7
#5

Re: How to load the date in my theme ?

@ subzero_x:
your code is the smarty itself and not related to a XOOPS site.but we want a XOOPS time format because:
1- local time zones
2- local date format ( Hegira for persians and ...)

skenow

Home away from home
Posted on: 2007/2/24 2:08
skenow
skenow (Show more)
Home away from home
Posts: 993
Since: 2004/11/17
#6

Re: How to load the date in my theme ?

I was just looking at general preferences for a XOOPS site, and there is no admin setting for date format that could be read into a smarty variable. I think this would be a good addition to the core.

Several modules have configuration options for date format, but when you want to get them all consistent, you need to change every module. Having a global setting that can be used in themes and modules would add another bit of overall site consistency to Xoops.

I'll be searching the dev site at Sourceforge for this...