- Posts: 37
COMMUNITY FORUM
thumbnail with item display
- michael neese
-
Topic Author
- Offline
- Junior Member
Less
More
14 years 9 months ago #86105
by michael neese
thumbnail with item display was created by michael neese
When these items are displayed, there are two links at the bottom of the page...'more in this category'...one forward to the next article or item in the category, and one backward to the previous article or item in the category.
How to display a thumbnails next to the links listings?
Please check this page out for the links at the bottom 'more in this category'...
www.gertrudezachary.net/gertrudes-designs/item/42-award-winning-inlay-cuff.html
Thanks for any information.
How to display a thumbnails next to the links listings?
Please check this page out for the links at the bottom 'more in this category'...
www.gertrudezachary.net/gertrudes-designs/item/42-award-winning-inlay-cuff.html
Thanks for any information.
Please Log in or Create an account to join the conversation.
- Jiliko.net
-
- Offline
- Platinum Member
Less
More
- Posts: 567
14 years 9 months ago #86106
by Jiliko.net
Replied by Jiliko.net on topic thumbnail with item display
Hi Michael,
If you want a thumbnail of the previous @ next K2 items, you'll have to change some coded in the file 'components/com_k2/templates/default/item.php' at lines 490 to 508.
You have the previousLink and nextLink, you should be able to retrieve the item id and load the related image...
Olivier
If you want a thumbnail of the previous @ next K2 items, you'll have to change some coded in the file 'components/com_k2/templates/default/item.php' at lines 490 to 508.
You have the previousLink and nextLink, you should be able to retrieve the item id and load the related image...
Olivier
Please Log in or Create an account to join the conversation.
- michael neese
-
Topic Author
- Offline
- Junior Member
Less
More
- Posts: 37
14 years 9 months ago #86107
by michael neese
Replied by michael neese on topic thumbnail with item display
thank you oliver...I am not knowledgable in code writing...could you point me to a resource regarding the code for "retrieve item id and load the related item"...
Would the item id be the actual thumbnail or would it simply be the item id itself, thus producing the thumbnail in turn?
Would the item id be the actual thumbnail or would it simply be the item id itself, thus producing the thumbnail in turn?
Please Log in or Create an account to join the conversation.
- Jiliko.net
-
- Offline
- Platinum Member
Less
More
- Posts: 567
14 years 9 months ago #86108
by Jiliko.net
Replied by Jiliko.net on topic thumbnail with item display
Michael,
In attachment, the modifications of the related file concerning prev/next item navigation.
You just have to replace original 490-508 lines with the one in the file.
It will display the XS image of the prev/next item if it exists.
You'll have some css stuff i think... :)
Olivier
In attachment, the modifications of the related file concerning prev/next item navigation.
You just have to replace original 490-508 lines with the one in the file.
It will display the XS image of the prev/next item if it exists.
You'll have some css stuff i think... :)
Olivier
Please Log in or Create an account to join the conversation.
- michael neese
-
Topic Author
- Offline
- Junior Member
Less
More
- Posts: 37
14 years 9 months ago #86109
by michael neese
Replied by michael neese on topic thumbnail with item display
Thank you, I will apply this now and let you know how it goes....
Olivier Nolbert said:Michael,
In attachment, the modifications of the related file concerning prev/next item navigation.
You just have to replace original 490-508 lines with the one in the file.
It will display the XS image of the prev/next item if it exists.
You'll have some css stuff i think... :)
Olivier
Olivier Nolbert said:Michael,
In attachment, the modifications of the related file concerning prev/next item navigation.
You just have to replace original 490-508 lines with the one in the file.
It will display the XS image of the prev/next item if it exists.
You'll have some css stuff i think... :)
Olivier
Please Log in or Create an account to join the conversation.
- michael neese
-
Topic Author
- Offline
- Junior Member
Less
More
- Posts: 37
14 years 9 months ago #86110
by michael neese
Replied by michael neese on topic thumbnail with item display
It works flawlessly, very very cool...thank you again!
Please Log in or Create an account to join the conversation.
- tizfo
-
- Offline
- New Member
Less
More
- Posts: 7
14 years 6 months ago #86111
by tizfo
Replied by tizfo on topic thumbnail with item display
thanks oliver, it works great!!!
Olivier Nolbert said:Michael,
In attachment, the modifications of the related file concerning prev/next item navigation.
You just have to replace original 490-508 lines with the one in the file.
It will display the XS image of the prev/next item if it exists.
You'll have some css stuff i think... :)
Olivier
Olivier Nolbert said:Michael,
In attachment, the modifications of the related file concerning prev/next item navigation.
You just have to replace original 490-508 lines with the one in the file.
It will display the XS image of the prev/next item if it exists.
You'll have some css stuff i think... :)
Olivier
Please Log in or Create an account to join the conversation.
- ELEFTHERIOS MANOLIS
-
- Offline
- Junior Member
Less
More
- Posts: 28
14 years 3 months ago #86112
by ELEFTHERIOS MANOLIS
Replied by ELEFTHERIOS MANOLIS on topic thumbnail with item display
Hi Olivier
i want to ask you if is possible this little "hack" doing and for the realated item (by tag)
I want (if is possible) the related item (by tag) to show and photo item, not only tittle
i try to "play with code,
$relatedItems = $model->getRelatedItems($this->item->id, $this->item->tags, $this->item->ordering);
if (JFile::exists(JPATH_SITE.DS.'media'.DS.'k2'.DS.'items'.DS.'cache'.DS.md5("Image".$relatedItems->id).'_S.jpg')) : ?>
<img src="<?php echo JURI::root().'media/k2/items/cache/'.md5("Image".$relatedItems->id).'_S.jpg'; ?>" />
but!!!!...........
please, is it possible to help me
thank you very much
i want to ask you if is possible this little "hack" doing and for the realated item (by tag)
I want (if is possible) the related item (by tag) to show and photo item, not only tittle
i try to "play with code,
$relatedItems = $model->getRelatedItems($this->item->id, $this->item->tags, $this->item->ordering);
if (JFile::exists(JPATH_SITE.DS.'media'.DS.'k2'.DS.'items'.DS.'cache'.DS.md5("Image".$relatedItems->id).'_S.jpg')) : ?>
<img src="<?php echo JURI::root().'media/k2/items/cache/'.md5("Image".$relatedItems->id).'_S.jpg'; ?>" />
but!!!!...........
please, is it possible to help me
thank you very much
Please Log in or Create an account to join the conversation.
- ELEFTHERIOS MANOLIS
-
- Offline
- Junior Member
Less
More
- Posts: 28
14 years 3 months ago #86113
by ELEFTHERIOS MANOLIS
Replied by ELEFTHERIOS MANOLIS on topic thumbnail with item display
i found a solution
change this code (in item.php)
<?php if($this->item->params->get('itemRelated') && isset($this->relatedItems)): ?>
<!-- Related items by tag -->
<div class="itemRelated">
<h3><?php echo JText::_("Related items (by tag)"); ?></h3>
<ul>
<?php foreach($this->relatedItems as $key=>$item): ?>
<li class="<?php echo ($key%2) ? "odd" : "even"; ?>">
<a href="<?php echo $item->link ?>"><?php echo $item->title; ?></a>
</li>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>
WITH THIS CODE
<?php if($this->item->params->get('itemRelated') && isset($this->relatedItems)): ?>
<!-- Related items by tag -->
<div class="itemRelated">
<h3><?php echo JText::_("Related items (by tag)"); ?></h3>
<ul>
<?php foreach($this->relatedItems as $key=>$item): ?>
<?php //print_r($item);?>
<li class="<?php echo ($key%2) ? "odd" : "even"; ?>">
<a href="<?php echo $item->link ?>"><img src="<?php echo $item->imageXSmall; ?>" alt="<?php if(!empty($this->item->image_caption)) echo $this->item->image_caption; else echo $this->item->title; ?>" /><span class="itemRelatedTitle"><?php echo $item->title; ?></span></a>
</li>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>
<div class="clr">
</div>
And now you have and photo in "related items (by tag)"
change this code (in item.php)
<?php if($this->item->params->get('itemRelated') && isset($this->relatedItems)): ?>
<!-- Related items by tag -->
<div class="itemRelated">
<h3><?php echo JText::_("Related items (by tag)"); ?></h3>
<ul>
<?php foreach($this->relatedItems as $key=>$item): ?>
<li class="<?php echo ($key%2) ? "odd" : "even"; ?>">
<a href="<?php echo $item->link ?>"><?php echo $item->title; ?></a>
</li>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>
WITH THIS CODE
<?php if($this->item->params->get('itemRelated') && isset($this->relatedItems)): ?>
<!-- Related items by tag -->
<div class="itemRelated">
<h3><?php echo JText::_("Related items (by tag)"); ?></h3>
<ul>
<?php foreach($this->relatedItems as $key=>$item): ?>
<?php //print_r($item);?>
<li class="<?php echo ($key%2) ? "odd" : "even"; ?>">
<a href="<?php echo $item->link ?>"><img src="<?php echo $item->imageXSmall; ?>" alt="<?php if(!empty($this->item->image_caption)) echo $this->item->image_caption; else echo $this->item->title; ?>" /><span class="itemRelatedTitle"><?php echo $item->title; ?></span></a>
</li>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>
<div class="clr">
</div>
And now you have and photo in "related items (by tag)"
Please Log in or Create an account to join the conversation.
- ELEFTHERIOS MANOLIS
-
- Offline
- Junior Member
Less
More
- Posts: 28
14 years 3 months ago #86114
by ELEFTHERIOS MANOLIS
Replied by ELEFTHERIOS MANOLIS on topic thumbnail with item display
oliver,
it is possible to show more than two item, in the "more in this category"???
for example
10 item in next
and 10 item for previous
it is possible that?
thanks
it is possible to show more than two item, in the "more in this category"???
for example
10 item in next
and 10 item for previous
it is possible that?
thanks
Please Log in or Create an account to join the conversation.
- michael neese
-
- Offline
- Junior Member
Less
More
- Posts: 22
14 years 3 months ago #86115
by michael neese
Replied by michael neese on topic thumbnail with item display
thanks for the new code addition or the related items...
Please Log in or Create an account to join the conversation.
- jorge mejia gallegos
-
- Offline
- Junior Member
Less
More
- Posts: 25
14 years 2 months ago #86116
by jorge mejia gallegos
Replied by jorge mejia gallegos on topic thumbnail with item display
Thanks a lot for this.
I would also like to include the introtext, i have tried this by adding <?php echo $item->introtext; ?> to your code... i thought it made sense but nothing happens.
Any ideas on this?
manolo said:
i found a solution
change this code (in item.php)
<?php if($this->item->params->get('itemRelated') && isset($this->relatedItems)): ?>
<!-- Related items by tag -->
<div class="itemRelated">
<h3><?php echo JText::_("Related items (by tag)"); ?></h3>
<ul>
<?php foreach($this->relatedItems as $key=>$item): ?>
<li class="<?php echo ($key%2) ? "odd" : "even"; ?>">
<a href="<?php echo $item->link ?>"><?php echo $item->title; ?></a>
</li>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>
WITH THIS CODE
<?php if($this->item->params->get('itemRelated') && isset($this->relatedItems)): ?>
<!-- Related items by tag -->
<div class="itemRelated">
<h3><?php echo JText::_("Related items (by tag)"); ?></h3>
<ul>
<?php foreach($this->relatedItems as $key=>$item): ?>
<?php //print_r($item);?>
<li class="<?php echo ($key%2) ? "odd" : "even"; ?>">
<a href="<?php echo $item->link ?>"><img src="<?php echo $item->imageXSmall; ?>" alt="<?php if(!empty($this->item->image_caption)) echo $this->item->image_caption; else echo $this->item->title; ?>" /><span class="itemRelatedTitle"><?php echo $item->title; ?></span></a>
</li>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>
<div class="clr">
</div>
And now you have and photo in "related items (by tag)"
I would also like to include the introtext, i have tried this by adding <?php echo $item->introtext; ?> to your code... i thought it made sense but nothing happens.
Any ideas on this?
manolo said:
i found a solution
change this code (in item.php)
<?php if($this->item->params->get('itemRelated') && isset($this->relatedItems)): ?>
<!-- Related items by tag -->
<div class="itemRelated">
<h3><?php echo JText::_("Related items (by tag)"); ?></h3>
<ul>
<?php foreach($this->relatedItems as $key=>$item): ?>
<li class="<?php echo ($key%2) ? "odd" : "even"; ?>">
<a href="<?php echo $item->link ?>"><?php echo $item->title; ?></a>
</li>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>
WITH THIS CODE
<?php if($this->item->params->get('itemRelated') && isset($this->relatedItems)): ?>
<!-- Related items by tag -->
<div class="itemRelated">
<h3><?php echo JText::_("Related items (by tag)"); ?></h3>
<ul>
<?php foreach($this->relatedItems as $key=>$item): ?>
<?php //print_r($item);?>
<li class="<?php echo ($key%2) ? "odd" : "even"; ?>">
<a href="<?php echo $item->link ?>"><img src="<?php echo $item->imageXSmall; ?>" alt="<?php if(!empty($this->item->image_caption)) echo $this->item->image_caption; else echo $this->item->title; ?>" /><span class="itemRelatedTitle"><?php echo $item->title; ?></span></a>
</li>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>
<div class="clr">
</div>
And now you have and photo in "related items (by tag)"
Please Log in or Create an account to join the conversation.