test
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • nikol Friend
    #179104

    Have 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 Friend
    #461014

    Hi 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 Friend
    #462333

    Unfortunately 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 Friend
    #462348

    Hi 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.


    1. default_item.zip
    nikol Friend
    #462473

    Thanks 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 Friend
    #462507

    Hi 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 css

    dd.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 Friend
    #463952

    Thanks 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 Friend
    #463960

    Hi 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 !

Viewing 8 posts - 1 through 8 (of 8 total)

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