Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
Download Elxis CMS:
Elxis 5.5 Hermes
.
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
Elxis 4.x/5.x DEV
»
Override Created Date?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Override Created Date? (Read 5696 times)
seadhna
Hero Member
Posts: 507
Override Created Date?
«
on:
April 15, 2013, 13:54:00 »
Hi there, in the previous versions of Elxis, it was possible to override the created date. I have migrated manually a full website to the new version of Elxis but need to override the created date for each article so that it shows up as it previously did. I can't find where to do this - is it possible?
Logged
webgift
Elxis Team
Hero Member
Posts: 4193
Re: Override Created Date?
«
Reply #1 on:
April 15, 2013, 16:46:39 »
I think that we have already discussed that. Anyway, you can change the created day manually by using a database tool like phpmyadmin.
Database table: #__content
Column: created
Logged
Elxis Team •
Custom web design [EN]
-
[EL]
•
.GR Registrar
seadhna
Hero Member
Posts: 507
Re: Override Created Date?
«
Reply #2 on:
April 15, 2013, 18:33:29 »
Ok, gotcha, thanks!
Logged
seadhna
Hero Member
Posts: 507
Re: Override Created Date?
«
Reply #3 on:
April 15, 2013, 19:09:59 »
Forgot to ask: I'd like to add individual classes to the year, month and date of the 'created date' on each article. Could you tell me where to find the file containing this code? i.e. where the created date is generated in the core code? I've looked everywhere I can think of but can't find. i.e. instead of the line generated being:
<div class="elx_dateauthor">Fri April 12, 2013 16:57</div>
I would like it to be:
<div class="elx_dateauthor"><span class="month">April</span><span class="day">12</span><span class="year">2013</div>
Many thanks as always!
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Format options for date
«
Reply #4 on:
April 15, 2013, 20:10:53 »
The date format is set in the language files. In top of each main language file (en.php, el.php, it.php, etc...) there are 13 date format options (
DATE_FORMAT_1
...
DATE_FORMAT_13
). These options affect only the rendering so it is safe to modify them.
Examples
$_lang['DATE_FORMAT_5'] = "%B %d, %Y %H:%M";
Output for the English language: April 15, 2013 20:07
Make the month name bold:
$_lang['DATE_FORMAT_5'] = "<strong>%B</strong> %d, %Y %H:%M";
New output:
April
15, 2013 20:07
Add spans as you wish:
$_lang['DATE_FORMAT_5'] = '<span class="month">%B</span> <span class="day">%d</span>, <span class="year">%Y</span> %H:%M';
Do the same for any
DATE_FORMAT_x
option (
don't modify the
DATE_FORMAT_BOX
and
DATE_FORMAT_BOX_LONG
options!
).
Note 1
This is a global setting and it will affect everything, not just the articles. In your CSS make sure the special formatting to be applied only in your frontend articles.
So don't add css rules like that:
.month { color:blue; }
But like that:
div.elx_dateauthor .month { color:blue; }
Note 2
Elxis supports
date interfaces
which provide customization over date format/rendering. Greek and Farsi are 2 language already having such an interface.
elxisLocalDate
interface:
includes/libraries/elxis/date/date.interface.php
Required interface methods:
public function __construct();
public function local_strftime($format, $ts);
public function local_to_elxis($date, $offset);
public function elxis_to_local($date, $offset);
Greek implementation (provides
correct conjugation for month names
):
includes/libraries/elxis/date/el.date.php
Farsi implementation (provides
Gregorian to/from Jalaly calendar
conversions):
includes/libraries/elxis/date/fa.date.php
«
Last Edit: April 15, 2013, 20:39:49 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
seadhna
Hero Member
Posts: 507
Re: Override Created Date?
«
Reply #5 on:
April 15, 2013, 22:49:39 »
Thanks, that's a huge help.
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Override Created Date?
«
Reply #6 on:
April 15, 2013, 23:17:58 »
With Elxis 4.x you can do whatever you like easily, for me it is like a playground. The core is built in a way to support many things even those we haven't yet implemented into Elxis! And the most important of all,
Elxis 4.x is VERY secure
. Whatever need you have ask here to get the best solution.
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
SecondHand
Newbie
Posts: 2
Re: Override Created Date?
«
Reply #7 on:
April 23, 2013, 18:55:21 »
Anyway, to set up date manually on the details tab of article edit page, would be useful. I decided to be smarty and to use subtitle as a date line but now realised that article's ordering related to the dates only
Tried manual sorting of articles. But it display correct just inside of news category but not on the front page. So without coding or getting into phpMyAdmin unable to deal with it. I am ok with it but my manager blondie not. But I am too nooby for coding. Will appreciate for advise what file can be edited to make date line editable on details tab. Thnx.
Logged
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
Elxis 4.x/5.x DEV
»
Override Created Date?