K2 date and image questions

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Wed Feb 11, 2015 4:03 pm
Reply with quote
Report this post
Hello,

i have some questions regarding the date display and images in k2 category listing.

1) I want the date to be displayed as 31.12.2015 in K2 category listing and item view. Right now it is "December 31, 2015". How do i change this?

2) When an article has no image, there is a big white space left to the item title and intro text. Is it possible to move the item title and introtext close to the left border? how would i do that?

3) what max width should the images in k2 have?

4) Is there a template documentation how to use and customize the template? Which module suffixes are available and how to use them on e.g. News Show Pro Module?

Kind regards
derulli1
User avatar
Fresh Boarder

teitbite
Sat Feb 14, 2015 12:26 pm
Reply with quote
Report this post
Hi

1. In K2 language file You will find a date format You can change.
2. Please tell me the url to the example of such situation.
3. Depends what type of image You have in mind. Would be best to show me the page with an image You are asking about.
4. Take a look here: https://demo.gavick.com/joomla25/game/i ... variations
User avatar
Moderator

GK User
Tue Feb 17, 2015 11:59 am
Reply with quote
Report this post
Hello teitbite,

thank you for your response.

1) Could you please point me to the file and give me instructions where and what to change?

2) http://j3.ballraum.de/index.php?option= ... Itemid=532
The first two articles have images, the rest has no images. Is it possible to "float" the Title and intro text to the left side?

3) I'm not sure how to use images with k2 and this template. Because i use landscape format images aswell as portrait format images. You can see this example in the two articles with images in the link i gave you in 2)
In the first article with the portrait format image, the images is too big for my taste. But if i reduce the width in k2 then the image in the second article is too small. (i hope i make myself clear, please ask if not)

4) I undestand this page shows just the "basic suffixes used in this template."

Thank you for your help and kind regards
derulli1
User avatar
Fresh Boarder

teitbite
Wed Feb 18, 2015 12:10 pm
Reply with quote
Report this post
Hi

1. File /language/en-GB/en-GB.com_k2.ini and it's one of this lines:

Code: Select all
K2_DATE_FORMAT="%d/%m/%Y - %H:%M"
K2_DATE_FORMAT_LC2="%A, %d %B %Y %H:%M"
K2_DATE_FORMAT_LC="%A, %d %B %Y"


I bet it's K2_DATE_FORMAT_LC2 one.

2. Add this to override.css:
Code: Select all
.itemBlock {
    margin: 0;
}

.itemList .itemImageBlock {
    margin: 0 20px 20px 0;
}

.itemList .itemBody {
    float: none;
}


3. It doesn't matter than. It will only be resized to the width K2 is configured to in parameters > images in K2 configuration.

4. That's all of suffixes we use other looks You can achieve by selecting module styles.
User avatar
Moderator

GK User
Fri Feb 20, 2015 3:05 pm
Reply with quote
Report this post
Hi and thank you for your response.

1) I looked at alle k2.ini language files, but none has a date format like on the website

2) I inserted your code into /templates/gk_games/css/override.css but it still looks the same on the website

3) It does matter, because i set 600px as width for article images, which looks good for landscape format images. The wide side is 600px (http://j3.ballraum.de/index.php?option= ... Itemid=532). But the image in portrait format will be much bigger, because the short side is 600px (http://j3.ballraum.de/index.php?option= ... Itemid=532).

4) what are module styles and where can i select them? What module styles are available?

Thank you for your help and kind regards.
User avatar
Fresh Boarder

teitbite
Sat Feb 21, 2015 9:33 pm
Reply with quote
Report this post
Hi

1. Sorry, now I see that it was adjusted in code directly:

- item view: /html/com_k2/templates/default/item.php
- category view: /html/com_k2/templates/default/category_item.php

Look for structure "F j, Y" and change it to what you want to have following this function parameters http://php.net/manual/en/function.date.php

2. You need to enable using override in advanced template settings

3. Yes it will be like that. Not much we can change here. That's how K2 works resizing images to a specific width only.

4. Not all modules has different view styles, but our News Show Pro does. In "Basic settings" You can select from number of modes.
User avatar
Moderator

GK User
Tue Feb 24, 2015 2:23 pm
Reply with quote
Report this post
Hi teitbite,

thank you for helping me.

1) This is it.

2) Perfect.

3) As a result i can not use portrait format images as k2 article image, because they are stretched to the same width as landscape format images.

Do you know any plugins or something else that colud help me?

4) Thanks for that information.

Kind regards
derulli1
User avatar
Fresh Boarder

teitbite
Thu Feb 26, 2015 11:44 am
Reply with quote
Report this post
Hi

3. Really not much can be done here. This is how K2 works, but You can write on K2 forums about that, maybe someone there has implemented a tool for such problem or knows such tool.
User avatar
Moderator


cron