Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • nemesis8663 Friend
    #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 Friend
    #316883

    Hi

    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…

    nemesis8663 Friend
    #316903

    Hi 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 Friend
    #316904

    Hi…

    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; ?>

    nemesis8663 Friend
    #316905

    Thank 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 Friend
    #316908

    hi…
    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; ?>

    nemesis8663 Friend
    #316913

    Bingo!

    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 Friend
    #316918

    thats ok…pleasure helping you out… any time pm me and will try and help out!

    nemesis8663 Friend
    #318615

    Unfortunately, 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 Friend
    #318631

    hi,

    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.

    nemesis8663 Friend
    #318672

    Hi prbalge, and thank you once again for your help.

    You got a PM 😉

    prakash Friend
    #318716

    hi…
    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 system

    nemesis8663 Friend
    #318743

    Hi.

    Thank you very much.

    Yes, I did switch off the SEO and it still doesn’t work >:(

    prakash Friend
    #318753

    ok 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..

    nemesis8663 Friend
    #318755

    Sure, here is the file. Thank you again, really appreciated 🙂


    1. default_item.zip
Viewing 15 posts - 1 through 15 (of 17 total)

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