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
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
-
- 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:
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');
-
- Moderator
- GK User
- Sat Jan 16, 2010 9:20 am
After the update the php function date isn't used anymore for displaying dates.
As you can see, the php function strftimeis now used. So the format has changed.
- 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.
-
- 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
So for example you can put there: %R | %d %B %Y representing this: 16:44 | 01 January 2010
-
- 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!
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!
-
- Fresh Boarder
- GK User
- Sat Jan 30, 2010 2:41 am
its work ty all
-
- Fresh Boarder
- GK User
- Mon Feb 01, 2010 8:25 pm
gk_header.php on line 61.
-
- 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évrier";
$mois["March"] = "mars";
$mois["April"] = "avril";
$mois["May"] = "mai";
$mois["June"] = "juin";
$mois["July"] = "juillet";
$mois["August"] = "août";
$mois["September"] = "septembre";
$mois["October"] = "octobre";
$mois["November"] = "novembre";
$mois["December"] = "décembre";
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
</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évrier";
$mois["March"] = "mars";
$mois["April"] = "avril";
$mois["May"] = "mai";
$mois["June"] = "juin";
$mois["July"] = "juillet";
$mois["August"] = "août";
$mois["September"] = "septembre";
$mois["October"] = "octobre";
$mois["November"] = "novembre";
$mois["December"] = "décembre";
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
-
- Fresh Boarder
- GK User
- Mon Mar 01, 2010 4:32 am
Get a 404 on your links
-
- Fresh Boarder
- GK User
- Mon Mar 01, 2010 4:32 am
Get a 404 on your links From the "Gavick Team Member" So much for a smooth transition. Ignored emails and forums that are broke.. Oh.. No documentation... What the Heck?
-
- Fresh Boarder
- GK User
- Mon Mar 01, 2010 4:51 am
@ Martajz Thanks 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
date_format= %A, %d %b %Y
Results Monday, 01 Mar 2010
-
- 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
View example: http://video.techno-internet.com
French date
-
- Fresh Boarder
- GK User
- Sun Mar 07, 2010 1:01 am
Hi feeny,
Very useful codes.
It did work for me.
Many thanks.
Very useful codes.
It did work for me.
Many thanks.
-
- Expert Boarder
- GK User
- Thu Mar 18, 2010 6:45 pm
And this bug is still in current release. WTF? After 2 months?
-
- Fresh Boarder
14 posts
• Page 1 of 1