-
AuthorPosts
-
November 7, 2010 at 4:41 am #156139
Hello! I just re-joined and am really excited! I’m hoping you can hep though. I have figured out how to add the readmore button to the K2 blog section, but i need it to be styled like the home page layout so the Read more button is positioned next to the comment button.
like this:
Not This
Any style help would be so great!
Thanks! – Josh
-
November 9, 2010 at 2:52 pm #362113
Welp… I’ve been trying to figure this one out but have only been able to jack things up I’m afraid…
Any kind soul out there willing to help a fella out?
Thanks!
aman204 Friendaman204
- Join date:
- January 2010
- Posts:
- 1945
- Downloads:
- 0
- Uploads:
- 43
- Thanks:
- 11
- Thanked:
- 418 times in 356 posts
November 9, 2010 at 6:28 pm #362146Sure can! Thanks so much for taking the time. While you’re looking around, can you see if you can tell why my drop down nav is shifting to th eright a bit?
Thanks again!
aman204 Friendaman204
- Join date:
- January 2010
- Posts:
- 1945
- Downloads:
- 0
- Uploads:
- 43
- Thanks:
- 11
- Thanked:
- 418 times in 356 posts
November 9, 2010 at 7:14 pm #362151<em>@aman204 202663 wrote:</em><blockquote>Hi jsprague,
To troubleshoot, Please change menu type to User Page (blog) and check if it appears fine, then</blockquote>
Ok cool, that fixes the button issue. Now can we apply that to the old view somehow? so I can avoid having the author info at top and also allow for other authors to be viewed in the list.
Again, thanks so much for the assistance!
Phill ModeratorPhill
- Join date:
- February 2014
- Posts:
- 7013
- Downloads:
- 40
- Uploads:
- 77
- Thanks:
- 917
- Thanked:
- 2206 times in 1818 posts
November 9, 2010 at 8:18 pm #362162Could you please post a link to a page where you are using the view that requires modification?
November 9, 2010 at 8:31 pm #362165Sure, http://www.webkinzone.com/ aman204 has asked that I switch to a different menu type which allows you to see how I want the buttons to be. I just dont want to restrict this menu to one author.
I will revert it back so you can see the problem.
Thanks!
Phill ModeratorPhill
- Join date:
- February 2014
- Posts:
- 7013
- Downloads:
- 40
- Uploads:
- 77
- Thanks:
- 917
- Thanked:
- 2206 times in 1818 posts
November 9, 2010 at 9:52 pm #362183Could you post the modifications you made to get the button in the K2 Blog section? It is currently in a different div to the comments button which is why it is not appearing where you want it.
November 9, 2010 at 10:50 pm #362193<em>@phill luckhurst 202700 wrote:</em><blockquote>Could you post the modifications you made to get the button in the K2 Blog section? It is currently in a different div to the comments button which is why it is not appearing where you want it.</blockquote>
Sure, it really wasn’t a mod, rather I turned on the Readmore option in k2. So if you go to and item in the backend and you click on categories (k2) then the Parameters button, there are 2 places where you can turn on readmore. I just enabled them.
The bummer is, it always shows, even when there isn’t a readmore inserted in the article.
Thanks!
Phill ModeratorPhill
- Join date:
- February 2014
- Posts:
- 7013
- Downloads:
- 40
- Uploads:
- 77
- Thanks:
- 917
- Thanked:
- 2206 times in 1818 posts
November 9, 2010 at 11:21 pm #362201OK, so I have not tested this as my laptop does not allow Wamp at the moment but try replaceing the current code in templates>JA_Social>html>com_k2>templates>JA_Social_blog>category_item.php with the below code (that is the whole of the file below).
<?php
/**
* @version $Id: category_item.php 493 2010-06-17 14:58:58Z joomlaworks $
* @package K2
* @author JoomlaWorks http://www.joomlaworks.gr
* @copyright Copyright (c) 2006 - 2010 JoomlaWorks, a business unit of Nuevvo Webware Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
// Define default image size (do not change)
K2HelperUtilities::setDefaultImage($this->item, 'itemlist', $this->item->params);
?>
<!-- Start K2 Item Layout -->
<div class="catItemView group<?php echo ucfirst($this->item->itemGroup); ?><?php echo ($this->item->featured) ? ' catItemIsFeatured' : ''; ?><?php if($this->item->params->get('pageclass_sfx')) echo ' '.$this->item->params->get('pageclass_sfx'); ?>">
<!-- Plugins: BeforeDisplay -->
<?php echo $this->item->event->BeforeDisplay; ?>
<!-- K2 Plugins: K2BeforeDisplay -->
<?php echo $this->item->event->K2BeforeDisplay; ?>
<?php if(isset($this->item->editLink)): ?>
<!-- Item edit link -->
<span class="catItemEditLink">
<a class="modal" rel="{handler:'iframe',size:{x:990,y:650}}" href="<?php echo $this->item->editLink; ?>">
<?php echo JText::_('Edit item'); ?>
</a>
</span>
<?php endif; ?>
<div class="catItemHeader clearfix">
<?php if($this->item->params->get('catItemTitle')): ?>
<!-- Item title -->
<h3 class="catItemTitle">
<?php if ($this->item->params->get('catItemTitleLinked')): ?>
<a href="<?php echo $this->item->link; ?>">
<?php echo $this->item->title; ?>
</a>
<?php else: ?>
<?php echo $this->item->title; ?>
<?php endif; ?>
<?php if($this->item->params->get('catItemFeaturedNotice') && $this->item->featured): ?>
<!-- Featured flag -->
<span>
<sup>
<?php echo JText::_('Featured'); ?>
</sup>
</span>
<?php endif; ?>
</h3>
<?php endif; ?>
</div><div class="ja-blog-tools">
<div class="ja-blog-meta clearfix"><?php if($this->item->params->get('catItemDateCreated')): ?>
<!-- Date created -->
<div class="postdate-wrap">
<span class="postdate clearfix">
<?php
$createDay = date('d', strtotime( $this->item->created));
$createMonth = date('M', strtotime( $this->item->created));
$createYear = date('Y', strtotime( $this->item->created));
?>
<span class="date"><?php echo $createDay; ?></span>
<span class="month-year"><span class="month"><?php echo $createMonth; ?></span><span class="year"><?php echo $createYear; ?></span></span>
</span>
</div>
<?php endif; ?><div class="cat-date">
<?php if($this->item->params->get('catItemCategory')): ?>
<!-- Item category name -->
<span class="article-category">
<span><?php echo JText::_('Published in'); ?></span>
<a href="<?php echo $this->item->category->link; ?>"><?php echo $this->item->category->name; ?></a>
</span>
<?php endif; ?><?php if($this->item->params->get('catItemAuthor')): ?>
<!-- Item Author -->
<span class="createby">
by <a href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a>
</span>
<?php endif; ?>
</div><div class="blog-rate-hit">
<?php if($this->item->params->get('catItemHits')): ?>
<!-- Item Hits -->
<div class="catItemHitsBlock">
<span class="catItemHits">
<?php echo JText::_('Read'); ?> <b><?php echo $this->item->hits; ?></b> <?php echo JText::_('times'); ?>
</span>
</div>
<?php endif; ?><?php if($this->item->params->get('catItemRating')): ?>
<!-- Item Rating -->
<div class="catItemRatingBlock">
<span><?php echo JText::_('Rate this item'); ?></span>
<div class="itemRatingForm">
<ul class="itemRatingList">
<li class="itemCurrentRating" id="itemCurrentRating<?php echo $this->item->id; ?>" style="width:<?php echo $this->item->votingPercentage; ?>%;"></li>
<li><a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('1 star out of 5'); ?>" class="one-star">1</a></li>
<li><a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('2 stars out of 5'); ?>" class="two-stars">2</a></li>
<li><a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('3 stars out of 5'); ?>" class="three-stars">3</a></li>
<li><a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('4 stars out of 5'); ?>" class="four-stars">4</a></li>
<li><a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('5 stars out of 5'); ?>" class="five-stars">5</a></li>
</ul>
<div id="itemRatingLog<?php echo $this->item->id; ?>" class="itemRatingLog"><?php echo $this->item->numOfvotes; ?></div>
<div class="clr"></div>
</div>
<div class="clr"></div>
</div>
<?php endif; ?></div>
</div>
</div><!-- Plugins: AfterDisplayTitle -->
<?php echo $this->item->event->AfterDisplayTitle; ?>
<!-- K2 Plugins: K2AfterDisplayTitle -->
<?php echo $this->item->event->K2AfterDisplayTitle; ?>
<div class="catItemBody clearfix">
<!-- Plugins: BeforeDisplayContent -->
<?php echo $this->item->event->BeforeDisplayContent; ?>
<!-- K2 Plugins: K2BeforeDisplayContent -->
<?php echo $this->item->event->K2BeforeDisplayContent; ?>
<?php if($this->item->params->get('catItemImage') && !empty($this->item->image)): ?>
<!-- Item Image -->
<div class="catItemImageBlock">
<span class="catItemImage">
<a href="<?php echo $this->item->link; ?>" title="<?php if(!empty($this->item->image_caption)) echo $this->item->image_caption; else echo $this->item->title; ?>">
<img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo $this->item->image_caption; else echo $this->item->title; ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" />
</a>
</span>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if($this->item->params->get('catItemIntroText')): ?>
<!-- Item introtext -->
<div class="catItemIntroText clearfix">
<?php echo $this->item->introtext; ?>
</div>
<?php endif; ?>
<?php if($this->item->params->get('catItemExtraFields') && count($this->item->extra_fields)): ?>
<!-- Item extra fields -->
<div class="catItemExtraFields">
<h4><?php echo JText::_('Additional Info'); ?></h4>
<ul>
<?php foreach ($this->item->extra_fields as $key=>$extraField): ?>
<li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>">
<span class="catItemExtraFieldsLabel"><?php echo $extraField->name; ?></span>
<span class="catItemExtraFieldsValue"><?php echo $extraField->value; ?></span>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<!-- Plugins: AfterDisplayContent -->
<?php echo $this->item->event->AfterDisplayContent; ?>
<!-- K2 Plugins: K2AfterDisplayContent -->
<?php echo $this->item->event->K2AfterDisplayContent; ?>
</div>
<?php if (
$this->item->params->get('catItemCategory') ||
$this->item->params->get('catItemTags') ||
$this->item->params->get('catItemAttachments')
): ?>
<div class="catItemLinks clearfix">
<?php if($this->item->params->get('catItemTags') && count($this->item->tags)): ?>
<!-- Item tags -->
<div class="catItemTagsBlock">
<span><?php echo JText::_("Tagged under"); ?></span>
<ul class="catItemTags">
<?php foreach ($this->item->tags as $tag): ?>
<li><a href="<?php echo $tag->link; ?>"><?php echo $tag->name; ?></a></li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<?php if($this->item->params->get('catItemAttachments') && count($this->item->attachments)): ?>
<!-- Item attachments -->
<div class="catItemAttachmentsBlock clearfix">
<span><?php echo JText::_("Download attachments:"); ?></span>
<ul class="catItemAttachments">
<?php foreach ($this->item->attachments as $attachment): ?>
<li>
<a title="<?php echo htmlentities($attachment->titleAttribute, ENT_QUOTES, 'UTF-8'); ?>" href="<?php echo JRoute::_('index.php?option=com_k2&view=item&task=download&id='.$attachment->id); ?>">
<?php echo $attachment->title ; ?>
</a>
<?php if($this->item->params->get('catItemAttachmentsCounter')): ?>
<span>(<?php echo $attachment->hits; ?> <?php echo (count($attachment->hits)==1) ? JText::_("download") : JText::_("downloads"); ?>)</span>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if($this->item->params->get('catItemVideo') && !empty($this->item->video)): ?>
<!-- Item video -->
<div class="catItemVideoBlock">
<h3><?php echo JText::_('Related Video'); ?></h3>
<?php if($this->item->videoType=='embedded'): ?>
<div class="catItemVideoEmbedded">
<?php echo $this->item->video; ?>
</div>
<?php else: ?>
<span class="catItemVideo"><?php echo $this->item->video; ?></span>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if($this->item->params->get('catItemImageGallery') && !empty($this->item->gallery)): ?>
<!-- Item image gallery -->
<div class="catItemImageGallery clearfix">
<h4><?php echo JText::_('Image Gallery'); ?></h4>
<?php echo $this->item->gallery; ?>
</div>
<?php endif; ?>
<?php if($this->item->params->get('catItemCommentsAnchor') && ( ($this->item->params->get('comments') == '2' && !$this->user->guest) || ($this->item->params->get('comments') == '1')) ): ?>
<!-- Anchor link to comments below -->
<div class="catItemCommentsLink clearfix">
<?php if(!empty($this->item->event->K2CommentsCounter)):?>
<!-- K2 Plugins: K2CommentsCounter -->
<?php echo $this->item->event->K2CommentsCounter; ?>
<?php else: ?>
<?php if($this->item->numOfComments > 0): ?>
<a href="<?php echo $this->item->link; ?>#itemCommentsAnchor">
<?php echo $this->item->numOfComments; ?> <?php echo ($this->item->numOfComments>1) ? JText::_('comments') : JText::_('comment'); ?>
</a>
<?php else: ?>
<a href="<?php echo $this->item->link; ?>#itemCommentsAnchor">
<?php echo JText::_('Be the first to comment!'); ?>
</a>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->item->params->get('catItemReadMore')): ?>
<!-- Item "read more..." link -->
<p class="readmore">
<a href="<?php echo $this->item->link; ?>">
<?php echo JText::_('Read more...'); ?>
</a>
</p>
<?php endif; ?>
</div>
<?php endif; ?><?php if($this->item->params->get('catItemDateModified')): ?>
<!-- Item date modified -->
<?php if($this->item->created != $this->item->modified): ?>
<span class="modifydate">
<?php echo JText::_('Last modified on'); ?> <?php echo JHTML::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC2')); ?>
</span>
<?php endif; ?>
<?php endif; ?>
<!-- Plugins: AfterDisplay -->
<?php echo $this->item->event->AfterDisplay; ?>
<!-- K2 Plugins: K2AfterDisplay -->
<?php echo $this->item->event->K2AfterDisplay; ?>
</div>
<!-- End K2 Item Layout -->
November 10, 2010 at 2:21 am #362224Thanks again for taking the time to help, I areally appreciate it!
That said, I applied the fix as you instructed but now the readmore doesnt show at all. Let me know if you would like me to try a different approach.
Thanks! – Josh
aman204 Friendaman204
- Join date:
- January 2010
- Posts:
- 1945
- Downloads:
- 0
- Uploads:
- 43
- Thanks:
- 11
- Thanked:
- 418 times in 356 posts
November 10, 2010 at 9:30 am #362264Try add this at end of template.css file (change values accordingly)::
.itemListView p.readmore {bottom:15px;left:90px;position:absolute;}
and then, change this::
div.itemContainer {k2.css (line 1079)
float:left;
margin-bottom:15px;
padding-bottom:15px;
}to
div.itemContainer {k2.css (line 1079)
float:left;
margin-bottom:15px;
padding-bottom:15px;
position:relative;
}Phill ModeratorPhill
- Join date:
- February 2014
- Posts:
- 7013
- Downloads:
- 40
- Uploads:
- 77
- Thanks:
- 917
- Thanked:
- 2206 times in 1818 posts
November 10, 2010 at 11:01 am #362280That might work but I think it would be better to have the buttons in the same div. Currently they are in different div’s with a separator in between. If the above does not work as required I will take a propper look when I get home.
Sami Mattila FriendSami Mattila
- Join date:
- September 2014
- Posts:
- 36
- Downloads:
- 0
- Uploads:
- 4
- Thanks:
- 2
- Thanked:
- 1 times in 1 posts
November 16, 2010 at 2:56 pm #363015Hi, I don’t understand what’s going on with the READ MOre links.
First I had the read-more pictures all over the place (either directly attached to the pictures on the frontpage or below the tweet/share buttons).
Then I figured out that I’ll try what happens if I enable commenting (Jcomments, I have disabled K2 default comment-system since it does not have a simple captcha) on frontpage (which I dont want to do). Then the Read More pictures disappeared and link came along with Leave a comment link. Problem is that 2 out of 3 frontpage articles do not have the read more links anymore at all.
All three have the same settings/code in the articles. Menu has Read More links enabled. What’s going on?
Here is a link:
http://moymore.server49.internet-content.net/Please help!
Amy
-
AuthorPosts
This topic contains 23 replies, has 4 voices, and was last updated by jsprague 13 years, 11 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum
-