Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
IOS Hotels
and
IOS Rentals
online booking systems for Elxis CMS.
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
General
(Moderators:
Ivan Trebješanin
,
Farhad Sakhaei
) »
Formatting date in Elxis content items
« previous
next »
Print
Pages: [
1
]
Author
Topic: Formatting date in Elxis content items (Read 6148 times)
pavel
Jr. Member
Posts: 61
Formatting date in Elxis content items
«
on:
January 09, 2009, 19:13:23 »
Is there any way to control the
date
format in content items and eblog?
Currently my Eblog ouputs the date as following:
<div class="eblog-postdate">Thursday, 08 January 2009 01:09</div>
I would like to:
1) Display a date in a different format, for example 09-01-2009 or 09 JAN 2009?
or, better, to:
2) Wrap each individual .eblog-postdate item in individual tags. For example, here is how it is done in Wordpress:
<div class="date_label">
<div class="date_day">2</div>
<div class="date_month">Jan</div>
<div class="date_year">2009</div>
<div class="comments_count">50</div>
</div>
This allows to customize design of each date/time element with CSS producing a unique look of the site. Is it possible to do do the same in Elxis?
Logged
datahell
Elxis Team
Hero Member
Posts: 10353
Re: Formatting date in Elxis content items
«
Reply #1 on:
January 09, 2009, 19:26:19 »
The date format in Elxis is controlled by the "gemini" language files. For instance for the English language you should edit file:
language/english/english.gemini.php
Short date format:
DEFINE('_GEM_DATE_FORMLC', "%A, %d %B %Y");
Extended date format:
DEFINE('_GEM_DATE_FORMLC2', "%A, %d %B %Y %H:%M");
Third party component may use hard-coded style. Eblog also uses a special hard-coded style.
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
pavel
Jr. Member
Posts: 61
Re: Formatting date in Elxis content items
«
Reply #2 on:
January 11, 2009, 00:15:58 »
Thank you for your reply. I decided to leave the date format as is to avoid any problems with functionality and to focus on CSS STYLING of the date/time block. I also looked at several other blogs and many are using the same long format with a unique styling.
Logged
Farhad Sakhaei
Elxis Community
Hero Member
Posts: 1190
I know nothing , Should know more & more
Re: Formatting date in Elxis content items
«
Reply #3 on:
January 17, 2009, 21:44:30 »
John , I have a problem with converting eblog archive dates to persian dates ,
How can I do this ?
Because for converting to persian date , I should have complete date , The date will calculate by the given day of the month , month of the year...
I reviewed the code , But got that there is a system for dates , That it shows the month and year separately ...
Logged
DediData Web Hosting Services
datahell
Elxis Team
Hero Member
Posts: 10353
Re: Formatting date in Elxis content items
«
Reply #4 on:
January 17, 2009, 22:16:52 »
I think you have to completely modify eblog and it's SEO PRO extension to be able to have a complete Persian calendar because you dont have just different names in months, you have different number of days for each month, different year, different start/end month days, etc. I don't know if this is too serious to make such modifications. I advise you to leave it as is....
eblog archive show each month's posts. Let's say we want to display the archive for January 2009. in this case we will search our database for posts between
2009-01-01 00:00:00
and
2009-01-31 23:59:59
(database table: #__eblog, column: dateadded).
In the Persian version let's say you have to display archived posts for Persian month X, year Z. Make the new start and end dates by converting Persian dates to Gregorian dates:
Persian start date: Z-X-1 00:00:00 ---> convert to Gregorian start date (Date1)
Persian end date: Z-X-W 23:59:59 ---> convert to Gregorian end date (Date2)
Were W the number of days of month X.
Now search for posts between
Date1
and
Date2
SEO PRO extension might also need modification, modules needs modification, etc, etc,...
«
Last Edit: January 17, 2009, 22:24:59 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
Farhad Sakhaei
Elxis Community
Hero Member
Posts: 1190
I know nothing , Should know more & more
Re: Formatting date in Elxis content items
«
Reply #5 on:
January 17, 2009, 22:36:39 »
Oooopps ,
I should say that I was converted whole dates in the Elxis core and also all components , modules , This was the only problem with converting dates to Persian dates ...
I leave it alone
Logged
DediData Web Hosting Services
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
General
(Moderators:
Ivan Trebješanin
,
Farhad Sakhaei
) »
Formatting date in Elxis content items