-
AuthorPosts
-
September 9, 2009 at 5:07 am #144034
Hi guys.
I set up a site for a friend using Ja Quartz and everything worked just fine.
But…On the homepage the date of the creation of the post shows up.
Now, where is the problem? The guy loves the date to be right there the way it is, but he want it to be the date of the day. So it should change every day automatically.
I looked around and see if I could modify it somewhat but I am really not able to.
Is there someone who can help me out please? :((
Thank you.
Stefano
prakash Friendprakash
- Join date:
- October 2008
- Posts:
- 439
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 2
- Thanked:
- 146 times in 115 posts
September 9, 2009 at 6:29 am #316883Hi
Where ever you want to call todays date… you can use an easy function from teline 2….
<div class="ja-day">
<?php
echo "<span>".date ('l')."</span>";
echo " <div>".date ('M')." ".date ('d').date ('S')."</div>";
?>
</div>
you could then change stylesheet with the required classes from teline2…
September 9, 2009 at 9:26 am #316903Hi prbalge.
Thank you very much for the prompt response.
I need to call the todays date exactly where the date of creation of the article appears on the homepage, with the exact same look.
I looked at the file I need to modify, I am guessing it could be html/com_content/article/default.php, but I am not so sure.
And by the way, the function to call the date is there 4 or 5 times, so I don’t know which one I should modify :confused:
prakash Friendprakash
- Join date:
- October 2008
- Posts:
- 439
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 2
- Thanked:
- 146 times in 115 posts
September 9, 2009 at 9:34 am #316904Hi…
To check layout of articles in ja_quartz… you will need to see this file!
templatesja_quartzhtmlcom_contentarticle > default.php
in that around line 47 > it would start
<?php if ($this->params->get('show_create_date')) : ?>
<span class="createdate">
<?php echo JHTML::_('date', $this->article->created, JText::_('DATE_FORMAT_LC2')) ?>
</span>
<?php endif; ?>September 9, 2009 at 9:46 am #316905Thank you so much, appreciated.
I have replaced
[PHP]<?php echo JHTML::_(‘date’, $this->article->created, JText::_(‘DATE_FORMAT_LC2’)) ?>
[/PHP]with
[PHP]<?php
echo “<span>”.date (‘l’).”</span>”;
echo ” <div>”.date (‘M’).” “.date (‘d’).date (‘S’).”</div>”;
?>
[/PHP]I guess I made a mistake because it still shows the date when the article was created and not the todays date…:((
prakash Friendprakash
- Join date:
- October 2008
- Posts:
- 439
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 2
- Thanked:
- 146 times in 115 posts
September 9, 2009 at 10:12 am #316908hi…
a mistake at my end….as you want to make the change to front page… you will need to modify this file
templatesja_quartzhtmlcom_contentfrontpagedefault_item.php
line is same around 47 line…
you will find this code
<?php if ($this->item->params->get('show_create_date')) : ?>
<span class="createdate">
<?php echo JHTML::_('date', $this->item->created, '%a - %d <span class="month">%b</span>'); ?>
</span>
<?php endif; ?>
replace it with this code
<?php if ($this->item->params->get('show_create_date')) : ?>
<span class="createdate">
<?php echo JHTML::_('date', $this->item->date, '%a - %d <span class="month">%b</span>'); ?>
</span>
<?php endif; ?>1 user says Thank You to prakash for this useful post
September 9, 2009 at 11:30 am #316913Bingo!
It seems it’s working now. I changed the date the article was created and the date on the frontpage is 9 September. 😀
Thank you very much prbalge, you helped me a hell of a lot. Thank you 😉
prakash Friendprakash
- Join date:
- October 2008
- Posts:
- 439
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 2
- Thanked:
- 146 times in 115 posts
September 9, 2009 at 12:02 pm #316918thats ok…pleasure helping you out… any time pm me and will try and help out!
September 25, 2009 at 11:03 pm #318615Unfortunately, I have a major problem.
The system modified as above works fine on the homepage, but the articles disappear :confused:
I have a couple of links from the menu to some articles. When clicking them, it returns a blank page.
I put the date back as it was originally and the articles now work fine.
So I need to find another way.
The guy I set up the site for told me it would be OK to remove the date from the homepage completely, but I tried nearly everything and I cannot get there.
Which file do I need to edit?
Thank you very much.
Stefano
prakash Friendprakash
- Join date:
- October 2008
- Posts:
- 439
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 2
- Thanked:
- 146 times in 115 posts
September 26, 2009 at 4:02 am #318631hi,
it shouldnt be the case mainly because the date you modified was only for the home page article layout. Hence if you can provide a live link via PM i can see what problem you are facing.
September 26, 2009 at 9:48 am #318672Hi prbalge, and thank you once again for your help.
You got a PM 😉
prakash Friendprakash
- Join date:
- October 2008
- Posts:
- 439
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 2
- Thanked:
- 146 times in 115 posts
September 26, 2009 at 3:00 pm #318716hi…
i did have a look… did you check by turning off the SEO for some time. Just to make sure that its nothing to do with some conflict with the SEO systemSeptember 26, 2009 at 9:35 pm #318743Hi.
Thank you very much.
Yes, I did switch off the SEO and it still doesn’t work >:(
prakash Friendprakash
- Join date:
- October 2008
- Posts:
- 439
- Downloads:
- 0
- Uploads:
- 1
- Thanks:
- 2
- Thanked:
- 146 times in 115 posts
September 27, 2009 at 1:40 am #318753ok could u do one thing… send me the modified file (in which you modified the date part) via pm so that i can have a look at it..
September 27, 2009 at 3:46 am #318755 -
AuthorPosts
This topic contains 17 replies, has 2 voices, and was last updated by nemesis8663 15 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum