-
AuthorPosts
-
dhuelsmann Friend
dhuelsmann
- Join date:
- October 2006
- Posts:
- 36
- Downloads:
- 21
- Uploads:
- 4
- Thanks:
- 5
- Thanked:
- 1 times in 1 posts
April 23, 2011 at 3:27 pm #163144How can I change JA Methys when showing a K2 Blog so that it also shows the year in the date. See the original below:
khoand Friendkhoand
- Join date:
- February 2011
- Posts:
- 4500
- Downloads:
- 0
- Uploads:
- 179
- Thanks:
- 169
- Thanked:
- 1166 times in 1060 posts
April 23, 2011 at 5:43 pm #387754Hi,
– 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>
1 user says Thank You to khoand for this useful post
dhuelsmann Frienddhuelsmann
- Join date:
- October 2006
- Posts:
- 36
- Downloads:
- 21
- Uploads:
- 4
- Thanks:
- 5
- Thanked:
- 1 times in 1 posts
April 23, 2011 at 8:04 pm #387778That 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.phpand 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 user says Thank You to dhuelsmann for this useful post
dhuelsmann Frienddhuelsmann
- Join date:
- October 2006
- Posts:
- 36
- Downloads:
- 21
- Uploads:
- 4
- Thanks:
- 5
- Thanked:
- 1 times in 1 posts
April 30, 2012 at 4:48 pm #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));
AuthorPostsViewing 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
Jump to forum