Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • sushismb Friend
    #869049

    Hello,

    How do I change the date of ja-day or the date on the top right portion of the page?

    Thank you!

    Ninja Lead Moderator
    #869474

    Hi,

    You will find the code to change it from templates/ja_teline_iii/blocks/header.php file with script

    <p class="ja-day">
              <?php 
                echo "<span class=\"day\">".JHTML::_('date', 'now', 'l')."</span>";
                echo "<span class=\"date\">, ".JHTML::_('date', 'now', 'M ')." ".JHTML::_('date', 'now', 'd').JHTML::_('date', 'now', 'S')."</span>";
              ?>
            </p>

    Regards

    sushismb Friend
    #869526

    Hi @ninja Lead,

    Thank you for your response.

    I actually know where to edit. But I don’t know what and how to edit to change the time zone.

    The default time of ja-day is different of that of what is set on the global setting.

    Thanks!

    Ninja Lead Moderator
    #869870

    If you want to use the time zone from global configuration, you can use this way here

    sushismb Friend
    #870081

    Hello @ninja Lead,

    Of course I’d like to use the time zone from global configuration. I’ve been wondering who would want the ja-day different from the global configuration? It’s strange that the fix was never stated in the main instructions.

    Unfortunately, I couldn’t get a clue from the link you sent.

    I’d appreciate which part of the code I should change in order to make ja-day time exactly same as the global setting tim.

    Thank you!

    Ninja Lead Moderator
    #870424

    Try to use my tweak below

    Open templates/ja_teline_iii/blocks/header.php file

    find and change

    <p class="ja-day">
      <?php 
        echo "<span class=\"day\">".JHTML::_('date', 'now', 'l')."</span>";
        echo "<span class=\"date\">, ".JHTML::_('date', 'now', 'M ')." ".JHTML::_('date', 'now', 'd').JHTML::_('date', 'now', 'S')."</span>";
      ?>
    </p>

    to

    <p class="ja-day">
        <?php 
            $date = new DateTime();
            $config = JFactory::getConfig();
            $date->setTimezone(new DateTimeZone($config->get('offset')));
            echo "<span class=\"day\">".$date->format('l')."</span>";
            echo "<span class=\"date\">, ".$date->format('F')." ".$date->format('jS')."</span>";
        ?>
    </p>

    Hope it helps

    sushismb Friend
    #871064

    Hello @ninja Lead,

    Thank you for your suggestion. How do you change the size of the fonts?

    Also, after I edited according to your instructions, I realized that it was not JA-DAY that is the culprit of the different date but the "calendar-holder" that is showing and giving a wrong date.

    Can you help?

    Thanks!

    Ninja Lead Moderator
    #871098

    In this case, you can send me the credentials of your site e.g: URL, admin & FTP account via your reply and SET IT AS PRIVATE reply (so only Moderators can see). I will check it for you.

Viewing 8 posts - 1 through 8 (of 8 total)

This topic contains 7 replies, has 2 voices, and was last updated by  Ninja Lead 8 years, 9 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum