Date is showing format "l, j M Y" instead of date

Advanced newspaper or magazine Joomla template to build news website with unique and detailed design.
GK User
Fri Jan 15, 2010 11:51 pm
Hi there,

www.sitio.com/hispano

The date on the top is showing "l, j M Y" instead of the date itself.

How can I fix this?

Thanks,

Richard
User avatar
Fresh Boarder

teitbite
Sat Jan 16, 2010 12:16 am
Hi

Try to ubgrade Your template with this link

and than if it won't work still do this:

Martajz wrote:
Your date is not working: date is defined using this:
Code: Select all
   <?php if($_date) : ?>
         <div id="date"><?php echo date($date_format); ?></div>
         <?php endif; ?>

And this is php code for date variables:
Code: Select all
$_date = $this->params->get("_date", 1);
   $date_format = $this->params->get("date_format", 'M j');
User avatar
Moderator

GK User
Sat Jan 16, 2010 9:20 am
After the update the php function date isn't used anymore for displaying dates.

Code: Select all
<?php if($this->template->params->get("date",1)) : ?>
                        <div id="addons_b">
                                    <?php echo JHTML::_('date','now',$this->template->params->get("date_format","%A, %d %b %Y")); ?>
                        </div>
                        <?php endif; ?>

As you can see, the php function strftimeis now used. So the format has changed.
User avatar
Fresh Boarder

GK User
Sat Jan 16, 2010 12:13 pm
Exactly as wrote smeets, just inside template administrator put variables according to link: http://nl.php.net/manual/en/function.strftime.php
So for example you can put there: %R | %d %B %Y representing this: 16:44 | 01 January 2010
User avatar
Senior Boarder

GK User
Wed Jan 27, 2010 2:27 pm
I have the same problem. Could you please clarify which file I am supposed to modify to make it work?

EDIT: Nevermind. You can just put "%A, %d %b %Y" in Template parameters, I thought I'd have to edit some .php or .css file.

Works brilliantly, amazing template!
User avatar
Fresh Boarder

GK User
Sat Jan 30, 2010 2:41 am
its work ty all
User avatar
Fresh Boarder

GK User
Mon Feb 01, 2010 8:25 pm
gk_header.php on line 61.
User avatar
Fresh Boarder

GK User
Mon Feb 15, 2010 3:43 am
Use this code in the file gk_header.php. Currently this code is a date for French.


</div>
<?php endif; ?>
<?php if($this->template->params->get("time",2)) : ?>
<div id="addons_c">
<?php echo date($this->template->params->get("time_format","h:i A")); ?>
</div>
<?php endif; ?>
<?php if($this->template->params->get("date",1)) : ?>
<div id="addons_c">


<?php
$jour["Monday"] = "Lundi";
$jour["Tuesday"] = "Mardi";
$jour["Wednesday"] = "Mercredi";
$jour["Thursday"] = "Jeudi";
$jour["Friday"] = "Vendredi";
$jour["Saturday"] = "Samedi";
$jour["Sunday"] = "Dimanche";

function getJour($day) {
return $jour[$day];
}

$mois["January"] = "janvier";
$mois["February"] = "f&#233vrier";
$mois["March"] = "mars";
$mois["April"] = "avril";
$mois["May"] = "mai";
$mois["June"] = "juin";
$mois["July"] = "juillet";
$mois["August"] = "ao&#251t";
$mois["September"] = "septembre";
$mois["October"] = "octobre";
$mois["November"] = "novembre";
$mois["December"] = "d&#233cembre";

function getMois($month){
return $mois[$month];
}

$month = Date(F);

$day = Date(l);

getJour($day);
getMois($month);

$mysep=", ";
echo "$jour[$day] ";
echo $mysep;
echo Date(d)." ";
echo "$mois[$month] ";
echo Date(Y);

?>

View: ICI
User avatar
Fresh Boarder

GK User
Mon Mar 01, 2010 4:32 am
Get a 404 on your links :ohmy:
User avatar
Fresh Boarder

GK User
Mon Mar 01, 2010 4:32 am
Get a 404 on your links :ohmy: From the "Gavick Team Member" So much for a smooth transition. Ignored emails and forums that are broke.. Oh.. No documentation... What the Heck?
User avatar
Fresh Boarder

GK User
Mon Mar 01, 2010 4:51 am
@ Martajz Thanks B) Your update in the /templates/gk_twn/params.ini on about line 28 simply change the date format to this:

date_format= %A, %d %b %Y

Results Monday, 01 Mar 2010
User avatar
Fresh Boarder

GK User
Mon Mar 01, 2010 7:35 am
The aim is to get the date in a different language.

View example: http://video.techno-internet.com


French date
User avatar
Fresh Boarder

GK User
Sun Mar 07, 2010 1:01 am
Hi feeny,

Very useful codes.
It did work for me.

Many thanks.
User avatar
Expert Boarder

GK User
Thu Mar 18, 2010 6:45 pm
And this bug is still in current release. WTF? After 2 months?
User avatar
Fresh Boarder


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.