test
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • dhuelsmann Friend
    #163144

    How can I change JA Methys when showing a K2 Blog so that it also shows the year in the date. See the original below:


    1. K2BlogDate
    khoand Friend
    #387754

    Hi,
    – Open <joomla url>templatesja_methyshtmlcom_contentfrontpagedefault_item.php file
    – Replace


    //$createYear = date('Y', strtotime( $created));

    with
    $createYear = date('Y', strtotime( $created));
    – Replace

    <!-- <span class="year"><?php echo $createYear; ?></span> -->
    with
    <span class="year"><?php echo $createYear; ?></span>

    dhuelsmann Friend
    #387778

    That is a good start and it is interesting to see that it was there originally and then commented out. However, making those changes does not echo the year. I suspect there needs to be some css changes as well??

    Edit: It did work after all…seems to have been a browser cache issue that didn’t show the changes right away. I made the changes (in many cases it wasn’t already available and edited out) in the following additional files:

    templatesja_methyshtmlcom_contentcategoryblog_item.php
    templatesja_methyshtmlcom_contentsectionblog_item.php
    templatesja_methyshtmlcom_k2templatesja_methys_blogcategory_item.php
    templatesja_methyshtmlcom_k2templatesja_methys_blogitem.php

    and I also made the following changes to the code in k2.css
    from:


    .blogDate span.date,
    div.itemBlogView div.itemDateCreated span.date {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 250%;
    font-weight: normal;
    line-height: 1;
    padding: 5px 0 1px 0;
    }

    .blogDate span.month,
    div.itemBlogView div.itemDateCreated span.month {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 92%;
    letter-spacing: 1.5px;
    }

    to:


    .blogDate span.date,
    div.itemBlogView div.itemDateCreated span.date {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 175%;
    font-weight: normal;
    line-height: 1;
    padding: 2px 0 1px 0;
    }

    .blogDate span.month,
    div.itemBlogView div.itemDateCreated span.month {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 92%;
    letter-spacing: 1.5px;
    }

    .blogDate span.year,
    div.itemBlogView div.itemDateCreated span.year {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 60%;
    font-weight: normal;
    line-height: 1;
    letter-spacing: 1px;
    }

    Thanks a lot for pointing me in the right direction.

    Now looks like:


    1. K2BlogDate2
    dhuelsmann Friend
    #450776

    <em>@khoand 235990 wrote:</em><blockquote>Hi,
    – Open <joomla url>templatesja_methyshtmlcom_contentfrontpagedefault_item.php file
    – with


    $createYear = date('Y', strtotime( $created));

    </blockquote>

    In the example provided, you need to modify it for Joomla 2.5. Change the above to

    $createYear = date('Y', strtotime( $this->item->created));

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

This topic contains 4 replies, has 2 voices, and was last updated by  dhuelsmann 12 years, 7 months ago.

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