Coder Social home page Coder Social logo

Bug in lastest Item about k2 HOT 7 CLOSED

getk2 avatar getk2 commented on July 20, 2024
Bug in lastest Item

from k2.

Comments (7)

kavadas avatar kavadas commented on July 20, 2024

Hi. You need to be more specific. What's the file you are referring to?

from k2.

AndreaContarato avatar AndreaContarato commented on July 20, 2024

File /components/com_k2/templates/default/latest.php (line 27 in my version) and /components/com_k2/templates/default/latest_item.php (line 16).
Maybe my suggestion is wrong but the test is very simple:

Use “Latest News” module
Set a number of columns (i.e. 3)
See the result ....

The error is at line 27: the container of all items is resized (100/).
If I cut the code and paste in latest_item.php (container of single item:

) it works ....

I’m using K2 vers. 2.6.

With Kind Regards
Andrea

From: Lefteris Kavadas
Sent: Tuesday, September 24, 2013 1:27 PM
To: joomlaworks/k2
Cc: AndreaContarato
Subject: Re: [k2] Bug in lastest Item (#26)

Hi. You need to be more specific. What's the file you are referring to?


Reply to this email directly or view it on GitHub.

from k2.

kavadas avatar kavadas commented on July 20, 2024

Have you modified the file? The file should like this:

https://github.com/joomlaworks/k2/blob/master/components/com_k2/templates/default/latest_item.php

from k2.

AndreaContarato avatar AndreaContarato commented on July 20, 2024

Yes! But I have already restored the original version.
I inserted my code as comment (in green) ...
The other style instructions ( padding, float, etc ) is for modify only 1 file ....

File: latest_item.php

File: latest.php
params->get('show_page_title')): ?>
escape($this->params->get('page_title')); ?>
<?php endif; ?>

<?php foreach($this->blocks as $key=>$block): ?>

<div class="latestItemsContainer" style="width: <?php echo number_format(100/$this->params->get('latestItemsCols'), 1); ?>%;"> 
     <!--div class="latestItemsContainer"  -->

Before I have not noticed you are the author ....
I’ m sorry ...
I Know this isn’t the right place but ... Can you add a Parameter for truncate (in words) the item text, like categories do?
(Or retrieve the same parameter that exists in categories ....)

File: latest.php (Line 72/73)

item->params->get('latestItemIntroText')): ?>
  <!-- Item introtext -->
  <div class="latestItemIntroText">
      <?php echo $this->item->introtext; ?> ‘--- trcuncate by parameter?
  </div>
  <?php endif; ?>

With kind Regards
Andrea

From: Lefteris Kavadas
Sent: Tuesday, September 24, 2013 4:04 PM
To: joomlaworks/k2
Cc: AndreaContarato
Subject: Re: [k2] Bug in lastest Item (#26)

Have you modified the file? The file should like this:

https://github.com/joomlaworks/k2/blob/master/components/com_k2/templates/default/latest_item.php


Reply to this email directly or view it on GitHub.

from k2.

kavadas avatar kavadas commented on July 20, 2024

I still cannot get what you mean. The line 16 of the file you are mentioning reads:

<div class="latestItemView">

What's the issue exactly?

from k2.

AndreaContarato avatar AndreaContarato commented on July 20, 2024

I mean that when I set a number of column > 1, the articles were displayed in 1 row only - i.e. setting 3 columns give me the result of 1 column with width = 33%.

In my opinion the error is due to the fact that the class:

in the file latest.php, is incorrectly sized. Should be 100% (better: none style).

The test on the number of columns should be done, in my opinion, in the file latest_item.php on line 16 (now in fact there isnn’t anything) ....
Something like:

But I leave it to you the judgment of the “goodness “of the solution

With Kind Regards
Andrea

From: Lefteris Kavadas
Sent: Wednesday, September 25, 2013 1:21 PM
To: joomlaworks/k2
Cc: AndreaContarato
Subject: Re: [k2] Bug in lastest Item (#26)

I still cannot get what you mean. The line 16 of the file you are mentioning reads:

What's the issue exactly?


Reply to this email directly or view it on GitHub.

from k2.

kavadas avatar kavadas commented on July 20, 2024

The columns setting is being applied to the source of the items ( categories or users ) not the items. If you want to create an extra grid inside it's column you need to do it by your own, there is no setting for this. I am closing this since it is a matter of implementation and not an issue.

from k2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.