-
AuthorPosts
-
nikol Friend
nikol
- Join date:
- July 2009
- Posts:
- 12
- Downloads:
- 27
- Uploads:
- 0
- Thanks:
- 3
- Thanked:
- 1 times in 1 posts
July 15, 2012 at 9:28 am #179104Have 800 articles standard showing the category and a ‘book online’ on the right side with a thumbnail. When article is featured, category is replaced by date of creation of article and thumbnail does not work anymore for ‘book online’ image
How can the featured article stay ‘standard’ = with category and the thumbnail working – see http://www.uniquesmallhotels.com .Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
July 16, 2012 at 9:10 am #461014Hi nikol,
<blockquote> How can the featured article stay ‘standard’ = with category</blockquote>
You can open the file of templatesja_portfoliohtmlcom_contentfeatureddefault_item.php look for this snap of code
[PHP]
<dd class=”create”>
<?php echo JText::sprintf(‘JACOM_CONTENT_CREATED_DATE_ON’, JHtml::_(‘date’,$this->item->created, JText::_(‘DATE_FORMAT_LC3’))); ?>
</dd>
[/PHP]Replace it by this code
[PHP] <?php if ($params->get(‘show_parent_category’) && $this->item->parent_id != 1) : ?>
<dd class=”parent-category-name”>
<?php $title = $this->escape($this->item->parent_title);
$url = ‘<a href=”‘ . JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->parent_id)) . ‘”>’ . $title . ‘</a>’; ?>
<?php if ($params->get(‘link_parent_category’)) : ?>
<?php echo JText::sprintf(‘COM_CONTENT_PARENT’, $url); ?>
<?php else : ?>
<?php echo JText::sprintf(‘COM_CONTENT_PARENT’, $title); ?>
<?php endif; ?>
</dd>
<?php endif; ?>
<?php if ($params->get(‘show_category’)) : ?>
<dd class=”category-name”>
<?php $title = $this->escape($this->item->category_title);
$url = ‘<a href=”‘ . JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catid)) . ‘”>’ . $title . ‘</a>’; ?>
<?php if ($params->get(‘link_category’)) : ?>
<?php echo JText::sprintf(‘JACOM_CONTENT_CATEGORY’, $url); ?>
<?php else : ?>
<?php echo JText::sprintf(‘JACOM_CONTENT_CATEGORY’, $title); ?>
<?php endif; ?>
</dd>
<?php endif; ?>[/PHP]Regarding the request of thumbnail you can download the ja thumbnail plugin here installed it into your site then go to it’s back-end and make a proper settings that I think would help.
nikol Friendnikol
- Join date:
- July 2009
- Posts:
- 12
- Downloads:
- 27
- Uploads:
- 0
- Thanks:
- 3
- Thanked:
- 1 times in 1 posts
July 26, 2012 at 8:59 pm #462333Unfortunately get the following error message:
Parse error: syntax error, unexpected $end in /public/sites/www.uniquesmallhotels.com/templates/ja_portfolio/html/com_content/featured/default_item.php on line 185
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
July 27, 2012 at 2:09 am #462348Hi nikol,
You might have made mistake while modifying code, you can replace the file of templatesja_portfoliohtmlcom_contentfeatureddefault_item.php (back-up it firstly) by my attachment file.
nikol Friendnikol
- Join date:
- July 2009
- Posts:
- 12
- Downloads:
- 27
- Uploads:
- 0
- Thanks:
- 3
- Thanked:
- 1 times in 1 posts
July 28, 2012 at 9:10 pm #462473Thanks Sherlock, date is replaced in all featured articles as you can see on homepage of http://www.uniquesmallhotels.com .
How do I get rid of the words ‘PARENT CATEGORY’. I tried every option in the display ‘OPTIONS’ of the article manager.
and
How can I get the thumbnail on image “select room and book” working (the links do work on the normal text).Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
July 30, 2012 at 3:20 am #462507Hi nikol,
<blockquote>How do I get rid of the words ‘PARENT CATEGORY’.</blockquote>
You could open the file of templates/your_template/css/template.css and adding this cssdd.parent-category-name {
display:none !important;
}<blockquote> How can I get the thumbnail on image “select room and book” working (the links do work on the normal text). </blockquote>
i am not much sure what you meant, it’s an image that you inserted into the article content and you should add links for it yourself if you want them to be linkable 🙂nikol Friendnikol
- Join date:
- July 2009
- Posts:
- 12
- Downloads:
- 27
- Uploads:
- 0
- Thanks:
- 3
- Thanked:
- 1 times in 1 posts
August 12, 2012 at 8:29 pm #463952Thanks again Sherlock, :)now the last issue:
The button “select room and book” has a link in all articles, they all work well when going through the menu,
however as soon as the article becomes a featured article placed on the home page, the link does not work anymore,
how can I make the link on the featured articles to work as in the normal articles?Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
August 13, 2012 at 2:30 am #463960Hi nikol,
You could open the file of templatesja_portfoliohtmlcom_contentfeatureddefault_item.php look for those snap of code
[PHP] <?php
//Get out all images
$regex = “/<img[^>]*>/”;
$image = ”;
//print_r($this->item);die();
if (preg_match_all($regex,$this->item->introtext, $matches)) {
$this->item->introtext = preg_replace ($regex, ”, $this->item->introtext);
$image = implode (“n”, $matches[0]);
}?>[/PHP]
And
[PHP] <?php if ($image): ?>
<?php echo $image ?>
<?php endif; ?>[/PHP]Removing those parts that I think would help !
-
AuthorPosts
This topic contains 8 replies, has 2 voices, and was last updated by Sherlock 12 years, 3 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum