-
AuthorPosts
-
bossies Friend
bossies
- Join date:
- September 2006
- Posts:
- 172
- Downloads:
- 39
- Uploads:
- 15
- Thanks:
- 16
- Thanked:
- 16 times in 2 posts
January 27, 2011 at 6:00 pm #159412i have changed my template to community plus and a user told me that the read more button is gone. I have done a bit of investigating and found that the read more button only display if you enable the author or the created date – then it creates the line and below the line it starts with the author and created date and then the read more.
my question is it possible to just enable the read more button. I do not want to enable the author as it generally would be the administrator. thus i would like the read more to be just below the article and not below a line as well as it ‘s also a bit small and people might just miss it if it’s not directly below the article
hope you understand
thanksbossies Friendbossies
- Join date:
- September 2006
- Posts:
- 172
- Downloads:
- 39
- Uploads:
- 15
- Thanks:
- 16
- Thanked:
- 16 times in 2 posts
January 27, 2011 at 6:20 pm #374115.blog-article-tools
.article-toolsok so i found these css classes where you can change the appearance of the read more, but i still have the enable author or created date to get the read more button – please help
Phill ModeratorPhill
- Join date:
- February 2014
- Posts:
- 7013
- Downloads:
- 40
- Uploads:
- 77
- Thanks:
- 917
- Thanked:
- 2206 times in 1818 posts
January 27, 2011 at 6:55 pm #374120Open templates>ja_community_plus>html>com_content>frontpage>default_item.php and replace all the code with the code below.
<?php
// no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<?php if ($this->user->authorize('com_content', 'edit', 'content', 'all') || $this->user->authorize('com_content', 'edit', 'content', 'own')) : ?>
<div class="contentpaneopen_edit<?php echo $this->escape($this->item->params->get( 'pageclass_sfx' )); ?>" style="float: left;">
<?php echo JHTML::_('icon.edit', $this->item, $this->item->params, $this->access); ?>
</div>
<?php endif; ?>
<div class="contentpaneopen<?php echo $this->escape($this->item->params->get( 'pageclass_sfx' )); ?> clearfix">
<?php if (!$this->item->params->get('show_intro')) :
echo $this->item->event->afterDisplayTitle;
endif; ?>
<?php
//get images
$regex = '#<img[^>]*>#';
$image = '';
if (preg_match ($regex, $this->item->text, $matches)) {
$image = $matches[0];
$this->item->text = str_replace ($image, '', $this->item->text);
}
?>
<?php if ($image) : ?>
<div class="article-image">
<?php echo $image ?>
</div>
<?php endif; ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<div class="article-content-wrap clearfix">
<?php if ($this->item->params->get('show_title')) : ?>
<h2 class="contentheading<?php echo $this->escape($this->item->params->get( 'pageclass_sfx' )); ?>">
<?php if ($this->item->params->get('link_titles') && $this->item->readmore_link != '') : ?>
<a href="<?php echo $this->item->readmore_link; ?>">
<?php echo $this->escape($this->item->title); ?>
</a>
<?php else : ?>
<?php echo $this->escape($this->item->title); ?>
<?php endif; ?>
</h2>
<?php endif; ?>
<div class="article-content fp-article-content">
<?php if (isset ($this->item->toc)) : ?>
<?php echo $this->item->toc; ?>
<?php endif; ?>
<?php echo $this->item->text; ?>
</div>
</div>
<!-- Article tools -->
<?php
if (
($this->item->params->get('show_create_date'))
|| (($this->item->params->get('show_author')) && ($this->item->author != ""))
|| (($this->item->params->get('show_section') && $this->item->sectionid) || ($this->item->params->get('show_category') && $this->item->catid))
|| ($this->item->params->get('show_pdf_icon') || $this->item->params->get('show_print_icon') || $this->item->params->get('show_email_icon'))
|| ($this->item->params->get('show_url') && $this->item->urls)
) :
?>
<div class="blog-article-tools clearfix">
<dl class="article-info">
<?php if ($this->item->params->get('show_create_date')) : ?>
<dd class="create">
<?php $created = T3Hook::_('t3_date_format', array($this->item->created, 'frontpage.created'));
if (!$created) $created = JHTML::_('date', $this->item->created, JText::_('DATE_FORMAT_LC3')) ?>
<?php echo $created ?>
</dd>
<?php endif; ?>
<?php if (($this->item->params->get('show_author')) && ($this->item->author != "")) : ?>
<dd class="createdby">
by <span><?php JText::printf(($this->item->created_by_alias ? $this->escape($this->item->created_by_alias) : $this->escape($this->item->author)) ); ?></span>
</dd>
<?php endif; ?>
<?php if (($this->item->params->get('show_section') && $this->item->sectionid) || ($this->item->params->get('show_category') && $this->item->catid)) : ?>
<?php if ($this->item->params->get('show_section') && $this->item->sectionid && isset($this->item->section)) : ?>
<dd class="parent-category-name">
<strong><?php echo JText::_('SECTION'); ?>: </strong>
<?php if ($this->item->params->get('link_section')) : ?>
<?php echo '<a href="'.JRoute::_(ContentHelperRoute::getSectionRoute($this->item->sectionid)).'">'; ?>
<?php endif; ?>
<?php echo $this->escape($this->item->section); ?>
<?php if ($this->item->params->get('link_section')) : ?>
<?php echo '</a>'; ?>
<?php endif; ?>
<?php if ($this->item->params->get('show_category')) : ?>
<?php echo ' - '; ?>
<?php endif; ?>
</dd>
<?php endif; ?>
<?php if ($this->item->params->get('show_category') && $this->item->catid) : ?>
<dd class="category-name">
<?php if ($this->item->params->get('link_category')) : ?>
<?php echo '<a href="'.JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug, $this->item->sectionid)).'">'; ?>
<?php endif; ?>
<?php echo $this->escape($this->item->category); ?>
<?php if ($this->item->params->get('link_category')) : ?>
<?php echo '</a>'; ?>
<?php endif; ?>
</dd>
<?php endif; ?><?php endif; ?>
</dl>
<?php if ($this->item->params->get('show_pdf_icon') || $this->item->params->get('show_print_icon') || $this->item->params->get('show_email_icon')) : ?>
<ul class="actions">
<?php if ($this->params->get('show_email_icon')) : ?>
<li class="email-icon">
<?php echo JHTML::_('icon.email', $this->item, $this->item->params, $this->access); ?>
</li>
<?php endif; ?>
<?php if ( $this->params->get( 'show_print_icon' )) : ?>
<li class="print-icon">
<?php echo JHTML::_('icon.print_popup', $this->item, $this->item->params, $this->access); ?>
</li>
<?php endif; ?>
<?php if ($this->params->get('show_pdf_icon')) : ?>
<li>
<?php echo JHTML::_('icon.pdf', $this->item, $this->item->params, $this->access); ?>
</li>
<?php endif; ?>
</ul>
<?php endif; ?></div>
<?php endif; ?><?php if ($this->item->params->get('show_readmore') && $this->item->readmore) : ?>
<p class="readmore">
<a href="<?php echo $this->item->readmore_link; ?>" title="<?php echo $this->escape($this->item->title); ?>">
<?php if ($this->item->readmore_register) : ?>
<span><?php echo JText::_('Register to read more...'); ?></span>
<?php else : ?>
<span><?php echo JText::_('Read more...'); ?></span>
<?php endif; ?>
</a>
</p>
<?php endif; ?>
<!-- //Article tools -->
<?php if ( intval($this->item->modified) != 0 && $this->item->params->get('show_modify_date')) : ?>
<p class="modifydate">
<?php $modified = T3Hook::_('t3_date_format', array($this->item->modified, 'frontpage.modified'));
if (!$modified) $modified = JHTML::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC2')) ?>
<?php echo JText::sprintf('LAST_UPDATED2', $modified); ?>
</p>
<?php endif; ?>
<?php if ($this->item->params->get('show_url') && $this->item->urls) : ?>
<p class="article-url">
<a href="http://<?php echo $this->escape($this->item->urls) ; ?>" target="_blank"><?php echo $this->escape($this->item->urls); ?></a>
</p>
<?php endif; ?>
</div>
<div class="item-separator"></div>
<?php echo $this->item->event->afterDisplayContent; ?>
1 user says Thank You to Phill for this useful post
bossies Friendbossies
- Join date:
- September 2006
- Posts:
- 172
- Downloads:
- 39
- Uploads:
- 15
- Thanks:
- 16
- Thanked:
- 16 times in 2 posts
February 2, 2011 at 9:43 am #374840thanks – will test
imported_janabak Friendimported_janabak
- Join date:
- August 2008
- Posts:
- 7
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 7
February 2, 2011 at 2:32 pm #374860Missing “Read more..”
I have almost the same problem, but only in JA_Tabs module in combination with K2 articles. I have tested with enabling both Author and Creation Date, as well as changing the code in default_item.php as described above.February 7, 2011 at 8:29 pm #375442Joomla 1.6: I’m experiencing the same problem — that the Read More link does not display unless I also display the Author or the Creation Date for an article (and the Read More link is separated from the article by a line and too much white space). The references to “Front Page” in Phill’s posted solution (both in the directory address and in the code) lead me to think it applies to Joomla 1.5. Is there a fix for this problem for the J16 version of Community Plus?
Wouldn’t the code between the “<!– //Article tools –>” comments need to be changed in each one of the following files?
ja_community_plus htmlcom_contentarticledefault.php
ja_community_plus htmlcom_contentcategoryblog_item.php
ja_community_plus htmlcom_contentfeatureddefault_item.phpIf so, then if someone would offer the replacement code I would greatly appreciate it.
Css Magician FriendCss Magician
- Join date:
- October 2014
- Posts:
- 741
- Downloads:
- 43
- Uploads:
- 53
- Thanks:
- 114
- Thanked:
- 366 times in 263 posts
February 8, 2011 at 10:25 am #375638<em>@schafer49 219852 wrote:</em><blockquote>Joomla 1.6: I’m experiencing the same problem — that the Read More link does not display unless I also display the Author or the Creation Date for an article (and the Read More link is separated from the article by a line and too much white space). The references to “Front Page” in Phill’s posted solution (both in the directory address and in the code) lead me to think it applies to Joomla 1.5. Is there a fix for this problem for the J16 version of Community Plus?
Wouldn’t the code between the “<!– //Article tools –>” comments need to be changed in each one of the following files?
ja_community_plus htmlcom_contentarticledefault.php
ja_community_plus htmlcom_contentcategoryblog_item.php
ja_community_plus htmlcom_contentfeatureddefault_item.phpIf so, then if someone would offer the replacement code I would greatly appreciate it.</blockquote>
open templatesja_community_plushtmlcom_contentcategorydefault_items.php and change
<p class="readmore">
<a href="<?php echo $link; ?>" title="<?php echo $this->escape($this->item->title); ?>">
<?php if (!$this->item->params->get('access-view')) : ?>
<span><?php echo JText::_('Register to read more...'); ?></span>
<?php else : ?>
<span><?php echo JText::_('Read more...'); ?></span>
<?php endif; ?>
</a>
</p>
to
<p class="readmore">
<a href="<?php echo $link; ?>" title="<?php echo $this->escape($this->item->title); ?>">
<?php if (!$this->item->params->get('access-view')) : ?>
<span><?php echo JText::_('COM_CONTENT_REGISTER_READ_MORE_TITLE'); ?></span>
<?php else : ?>
<span><?php echo JText::_('COM_CONTENT_READ_MORE_TITLE'); ?></span>
<?php endif; ?>
</a>
</p>
open templatesja_community_plushtmlcom_contentcategoryblog_item.php and change :
<p class="readmore">
<a href="<?php echo $link; ?>">
<?php if (!$params->get('access-view')) :
echo JText::_('REGISTER_TO_READ_MORE');
elseif ($readmore = $this->item->alternative_readmore) :
echo $readmore;
else :
echo JText::sprintf('COM_CONTENT_READ_MORE', $this->escape($this->item->title));
endif; ?></a>
</p>
to
<p class="readmore">
<a href="<?php echo $link; ?>">
<?php if (!$params->get('access-view')) :
echo JText::_('COM_CONTENT_REGISTER_READ_MORE_TITLE');
elseif ($readmore = $this->item->alternative_readmore) :
echo $readmore;
else :
echo JText::sprintf('COM_CONTENT_READ_MORE_TITLE', $this->escape($this->item->title));
endif; ?></a>
</p>
after that, open languageen-GBen-GB.tpl_ja_community_plus.ini and add as follow:
YOU_ARE_HERE="You are here"
BACK_TO_TOP="Back to top"
TOP="Top"
MOBILE_VERSION="Mobile Version"
DESKTOP_VERSION="Desktop Version"
SWITCH_TO_STANDARD_MODE_CONFIRMATION="Switch to standard mode? Switch back to mobile view via a link at the bottom of the page in standard mode"
DO_NOT_SHOW_THIS_MESSAGE_AGAIN="Do not show this message again"
CLOSE_THIS_NOTICE="Close this notice"
IE6_WARNING_TITLE="Did you know that your Internet Explorer 6 (IE6) is out of date?"
IE6_WARNING_MESSAGE="<p class='note'>This template is compatible with IE6, however your experience will be enhanced with a newer browser.</p><p>To get the best possible experience using our website we recommend that you upgrade to a newer version or other web browser. A list of the most popular web browsers can be found below<p>"
COM_CONTENT_READ_MORE_TITLE="Read more..."
COM_CONTENT_REGISTER_READ_MORE_TITLE="Register to read more..."
1 user says Thank You to Css Magician for this useful post
bhvi Friendbhvi
- Join date:
- September 2010
- Posts:
- 31
- Downloads:
- 0
- Uploads:
- 9
- Thanks:
- 12
- Thanked:
- 1 times in 1 posts
June 1, 2011 at 6:18 am #394012Hi duch, mate I cannot find the code you say above in file templatesja_community_plushtmlcom_contentcateg orydefault_items.php
I am using Joomla 1.6 also and cannot get the readmore to shoe by itself under article without anything else.
I replaced all the other code as you said just not the first part … any help would be much appreciated.
Regards
October 21, 2011 at 4:27 pm #420752I recently installed J1.7 version of this template, yet have the same Readmore problem. Anyone know
1) if Duchh’s proposed changes work with ver 1.3.1 (Sept 2011) of this template, and
2) if a related bug fix release is planned for this template?Thanks for any help
LarryPhill ModeratorPhill
- Join date:
- February 2014
- Posts:
- 7013
- Downloads:
- 40
- Uploads:
- 77
- Thanks:
- 917
- Thanked:
- 2206 times in 1818 posts
October 21, 2011 at 6:12 pm #420765That should work but I have not tested.
I will raise a bug report and see what the devs come up with regarding a later release.
October 22, 2011 at 4:33 am #420809Thanks Phill
I’ll give it a try and post results here.
Cheers, LarryOctober 22, 2011 at 6:37 pm #420901Tried Duchh’s changes for J1.7, Community Plus 1.3.1 and noted the following:
File “templatesja_community_plushtmlcom_contentcateg orydefault_items.php” does not exist.
The file ” blog_item.php” current <p class=”readmore”> block is:
[PHP]<p class=”readmore”>
<a href=”<?php echo $link; ?>”>
<?php if (!$params->get(‘access-view’)) :
echo JText::_(‘COM_CONTENT_REGISTER_TO_READ_MORE’);
elseif ($readmore = $this->item->alternative_readmore) :
echo $readmore;
if ($params->get(‘show_readmore_title’, 0) != 0) :
echo JHTML::_(‘string.truncate’, ($this->item->title), $params->get(‘readmore_limit’));
endif;
elseif ($params->get(‘show_readmore_title’, 0) == 0) :
echo JText::sprintf(‘COM_CONTENT_READ_MORE_TITLE’);
else :
echo JText::_(‘COM_CONTENT_READ_MORE’);
echo JHTML::_(‘string.truncate’, ($this->item->title), $params->get(‘readmore_limit’));
endif; ?></a>
</p>[/PHP]So it looks like COM_CONTENT_REGISTER_READ_MORE_TITLE , and COM_CONTENT_READ_MORE_TITLE has been included. But it just doesn’t work.
In ‘languageen-GBen-GB.tpl_ja_community_plus.ini” Duchh’s suggestion to add
COM_CONTENT_READ_MORE_TITLE=”Read more…”
COM_CONTENT_REGISTER_READ_MORE_TITLE=”Register to read more…”
has already been included.So a fix for this readmore problem for Community Plus, J1.7, tpl 1.3.1 is still needed.
I’d really appreciate any help anyone can offer here.
Thanks, LarryOctober 30, 2011 at 11:46 pm #422470I haven’t heard from anyone since my last post. I still have this readmore problem in my recent J1.7, Comm Plus 1.3.1 site after trying Duchh’s proposed fixes.
So I’m very curious to know if anyone knows whats happening here?
Thanks
LarryPhill ModeratorPhill
- Join date:
- February 2014
- Posts:
- 7013
- Downloads:
- 40
- Uploads:
- 77
- Thanks:
- 917
- Thanked:
- 2206 times in 1818 posts
October 31, 2011 at 7:50 am #422510Please detail exactly what you want. Where do you want the read more and what exactly is the current problem.
October 31, 2011 at 3:52 pm #422610I have the same problem as per Bossies original post #1, “that the read more button only display if you enable the author or the created date”.
What I would like, is for the readmore control to be independent of all other status items, so that we can display the readmore without the author or creation date, etc. Styling and layout of the readmore is great as is.Cheers, Larry
-
AuthorPosts
This topic contains 25 replies, has 8 voices, and was last updated by lbridle 13 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum