How to remove time

This forum is for general questions about extensions for Joomla! version 1.5.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
Fjellfinn2
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Sat Feb 16, 2008 11:08 am

How to remove time

Post by Fjellfinn2 » Tue Nov 25, 2008 7:19 am

When I publish an article,
I publish title, author and date, like this:

Supert nyskiføre atti Ogjerdhøylua
Skrevet av Fjellfinn
mandag 24. november 2008 00:00

I really dont need the time,
what is the proper method to "remove" this?

In fact, this will do:
24. november 2008

User avatar
devilboy_1989
Joomla! Explorer
Joomla! Explorer
Posts: 350
Joined: Fri Oct 03, 2008 8:22 pm
Location: In Front of My Computer
Contact:

Re: How to remove time

Post by devilboy_1989 » Tue Nov 25, 2008 7:32 am

Hi
Go to "Content" - "Article Manager" then click the "Parameters" and check the "Hide" Option button for "Created Date and Time" and your Time will be vanished from your article..
And Check Menu Item is set to Use Global or not

Hope this helps
Thanks
“Speak of The Devil and I Appears”

My Blog - http://www.rajputbrotherhood.com
Joomla - The Mighty CMS.

Fjellfinn2
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Sat Feb 16, 2008 11:08 am

Re: How to remove time

Post by Fjellfinn2 » Tue Nov 25, 2008 8:28 am

devilboy_1989 wrote: your Time will be vanished from your article..

Thanks

I know my english really sucks....

OK, once more, ,I want :

mandag 24. november 2008

NOT
mandag 24. november 2008 00:00

I want to remove the 00:00 (and mandag if poosible)

Just:
24. november 2009

Thanks

Trinners
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Mon Sep 04, 2006 10:32 pm

Re: How to remove time

Post by Trinners » Tue Dec 02, 2008 4:41 am

Go to your language file. For example: /administrator/language/en-GB/en-GB.ini and change line 11:

DATE_FORMAT_LC2=%A, %d %B %Y %H:%M

to

DATE_FORMAT_LC2=%d %B %Y

See http://docs.joomla.org/How_do_you_chang ... _format%3F.

farmeunit
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Sat Dec 24, 2005 12:23 am
Location: Missouri
Contact:

Re: How to remove time

Post by farmeunit » Wed Feb 25, 2009 3:12 pm

Trinners wrote:Go to your language file. For example: /administrator/language/en-GB/en-GB.ini and change line 11:

DATE_FORMAT_LC2=%A, %d %B %Y %H:%M

to

DATE_FORMAT_LC2=%d %B %Y
I tried this, but it's still the same format. Does it only affect new articles, or should I do something else for it to take effect?

Edit: I'm using Joomla 1.5.9 with Teline template if that makes a difference.
Last edited by farmeunit on Wed Feb 25, 2009 3:17 pm, edited 1 time in total.

User avatar
mandville
Joomla! Master
Joomla! Master
Posts: 15126
Joined: Mon Mar 20, 2006 1:56 am
Location: The Girly Side of Joomla in Sussex

Re: How to remove time

Post by mandville » Wed Feb 25, 2009 3:16 pm

Trinners wrote:Go to your language file. For example: /administrator/language/en-GB/en-GB.ini and change line 11:

DATE_FORMAT_LC2=%A, %d %B %Y %H:%M

to

DATE_FORMAT_LC2=%d %B %Y

See http://docs.joomla.org/How_do_you_chang ... _format%3F.
that affects ONLY the English, not the DE version, you have to replicate it through the language files
HU2HY- Poor questions = Poor answer
Un requested Help PM's will be reported, added to the foe list and possibly just deleted
{VEL Team Leader}{TM Auditor }{ Showcase & Security forums Moderator}

farmeunit
Joomla! Intern
Joomla! Intern
Posts: 61
Joined: Sat Dec 24, 2005 12:23 am
Location: Missouri
Contact:

Re: How to remove time

Post by farmeunit » Wed Feb 25, 2009 3:19 pm

Actually English is the only language I have installed, but thanks for reply.

6einteractive
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Jul 03, 2009 7:07 pm

Re: How to remove time

Post by 6einteractive » Fri Jul 03, 2009 7:22 pm

The above solution is correct but has one error.

The directory is not: /administrator/language/en-GB/en-GB.ini

Rather: /language/en-GB/en-GB.ini The language directory under your main Joomla install.

I had the same issue. :)

kadded
Joomla! Explorer
Joomla! Explorer
Posts: 306
Joined: Sun Mar 23, 2008 9:54 pm

Re: How to remove time

Post by kadded » Tue Oct 27, 2009 3:56 am

No need to hack the core, simply override the com_content (apologies for the lengthy explanation, yet done so all know howto).

Basically, you can override the way the content is shown by overriding it. If you have a menu linking to a category/blog layout, you will need to override this by adding a blog_item.php in your template.
If you have e.g. section/blog, you'll have to modify the appropriate file for that. Not all too hard once you understand the following:

Following is only to override the category/blog layout, so here it goes:

1. Checking for folders
Check your template folder (through ftp or whatever) and check if there is a folder 'html'. If not, create the folder 'html'.
Check if there is a folder within the html folder called 'com_content', if not create also this folder.
Check if there is a folder within this 'com_content' folder called 'category', if not again create this one as well.


Check if there a file in the folder 'category' called blog_item.php,
2. if so do the following:
Check for the line

Code: Select all

<?php echo JHTML::_('date', $this->item->created, JText::_('DATE_FORMAT_LC2')); ?>
(with me that was on line 98.)
Change this into:

Code: Select all

<?php echo JHTML::_('date', $this->item->created, JText::_('DATE_FORMAT_LC1')); ?>

Done!

3. if not do the following:
Get a 'fresh' blog_item.php (see later on this post). Meaning: create a file called 'blog_item.php' with the regular code in it (again see later down this post).
Modify

Code: Select all

<?php echo JHTML::_('date', $this->item->created, JText::_('DATE_FORMAT_LC2')); ?>
into

Code: Select all

<?php echo JHTML::_('date', $this->item->created, JText::_('DATE_FORMAT_LC1')); ?>

Upload to the folder html>com_content>category>blog_item.php
Done!

To sum it up:
In both cases you end up adding/modifying the file blog_item.php and call a different format as defined in the language file, this time with no core hacks. You end up with a file in your template folder (html>com_content>category>blog_item.php) that overrides and uses a different way of displaying the time.


What is does:
Changing from DATE_FORMAT_LC2 to DATE_FORMAT_LC1, does nothing more than calling the parameters as defined in your en-GB.ini file. In other words, in that file (the ones others recommended to hack) it is coded how your date should be displayed. You could indeed change that file and change the way it displays, but as others pointed out, when upgrading you will have to go through this process again. And core hacking is generally speaking to be avoided.
And there's no real reason to do so, cause you're able to use another format as it is defined in the language file.

Code: Select all

DATE_FORMAT_LC=%A, %d %B %Y
DATE_FORMAT_LC1=%A, %d %B %Y
DATE_FORMAT_LC2=%A, %d %B %Y %H:%M
DATE_FORMAT_LC3=%d %B %Y
DATE_FORMAT_LC4=%d.%m.%y
DATE_FORMAT_JS1=y-m-d
The data format 'DATE_FORMAT_LC2=%A, %d %B %Y %H:%M' indeed shows month, year... but the same file also defines the DATE_FORMAT_LC1=%A, %d %B %Y which happens not to show the time.
So changing the DATE_FORMAT_LC2 to DATE_FORMAT_LC1 in your blog_item.php solves the problem without any core hacks.

diresolutions
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Thu Mar 19, 2009 8:29 pm

Re: How to remove time

Post by diresolutions » Tue Mar 09, 2010 8:09 pm

This last option worked beautifully. Thanks for posting!

User avatar
mandville
Joomla! Master
Joomla! Master
Posts: 15126
Joined: Mon Mar 20, 2006 1:56 am
Location: The Girly Side of Joomla in Sussex

Re: How to remove time

Post by mandville » Wed Mar 10, 2010 3:44 pm

dont forget changes made to the core "may" be overwritten during upgrades
HU2HY- Poor questions = Poor answer
Un requested Help PM's will be reported, added to the foe list and possibly just deleted
{VEL Team Leader}{TM Auditor }{ Showcase & Security forums Moderator}

imaginebeing
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Mon Nov 16, 2009 10:34 pm
Location: Hollywood, CA
Contact:

Re: How to remove time

Post by imaginebeing » Sat Jan 01, 2011 11:50 pm

OMG! so helpful! For me though, this was under the root /language/en-GB/en-GB.ini not under /administrator/
Website Designer and Developer, working strictly with Joomla!
http://www.digital-agency.com

User avatar
coalaweb
Joomla! Apprentice
Joomla! Apprentice
Posts: 41
Joined: Wed Jun 30, 2010 6:42 pm
Location: New York
Contact:

Re: How to remove time

Post by coalaweb » Mon May 30, 2011 4:14 pm

Very informative and helpful post

The options below are great to keep as a reference I find depending on the client and the site I have to update my templates accordingly so it's worth keeping it handy.

Code: Select all

DATE_FORMAT_LC=%A, %d %B %Y
DATE_FORMAT_LC1=%A, %d %B %Y
DATE_FORMAT_LC2=%A, %d %B %Y %H:%M
DATE_FORMAT_LC3=%d %B %Y
DATE_FORMAT_LC4=%d.%m.%y
DATE_FORMAT_JS1=y-m-d
Thanks


Locked

Return to “Extensions for Joomla! 1.5”