Displaying Images In Joomla! Search Results Problem

Phoca Gallery - image gallery extension
GOGOKOM
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 08 Aug 2017, 17:18

Displaying Images In Joomla! Search Results Problem

Post by GOGOKOM »

Images are not displayed in search results.
http://michal.mazwal.pl/component/searc ... Itemid=437
What am I doing wrong?
I improved Joomla! Search Component by. this pattern:
https://www.phoca.cz/documents/15-phoca ... ch-results
components/com_search/views/search/tmpl/default_results.php

Code: Select all

<?php
/**
 * @package     Joomla.Site
 * @subpackage  com_search
 *
 * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;
?>

<dl class="search-results<?php echo $this->pageclass_sfx; ?>">
<?php foreach ($this->results as $result) : ?>
    	<?php if (isset($result->image) && $result->image != '') {
    		echo '<div style="float: left;margin: 5px 10px;"><img src="'. $this->escape($result->image).'" alt="" /></div>';
    	} ?>
	<dt class="result-title">
		<?php echo $this->pagination->limitstart + $result->count . '. '; ?>
		<?php if ($result->href) : ?>
			<a href="<?php echo JRoute::_($result->href); ?>"<?php if ($result->browsernav == 1) : ?> target="_blank"<?php endif; ?>>
				<?php echo $result->title; ?>
			</a>
		<?php else : ?>
			<?php echo $result->title; ?>
		<?php endif; ?>
	</dt>
	<?php if ($result->section) : ?>
		<dd class="result-category">
			<span class="small<?php echo $this->pageclass_sfx; ?>">
				(<?php echo $this->escape($result->section); ?>)
			</span>
		</dd>
	<?php endif; ?>
	<dd class="result-text">
		<?php echo $result->text; ?>
	</dd>
	<?php if ($this->params->get('show_date')) : ?>
		<dd class="result-created<?php echo $this->pageclass_sfx; ?>">
			<?php echo JText::sprintf('JGLOBAL_CREATED_DATE_ON', $result->created); ?>
		</dd>
	<?php endif; ?>
	<?php if (isset($result->image) && $result->image != '') {
		echo '<div style="clear:both"></div>';
	} ?>
<?php endforeach; ?>
</dl>

<div class="pagination">
	<?php echo $this->pagination->getPagesLinks(); ?>
</div>

Tags:
GOGOKOM
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 08 Aug 2017, 17:18

Re: Displaying Images In Joomla! Search Results Problem

Post by GOGOKOM »

Problem solved.
I have not checked over template override.
/templates/shaper_floox/html/com_search/search
christine
Phoca Hero
Phoca Hero
Posts: 2819
Joined: 28 Nov 2010, 17:20

Re: Displaying Images In Joomla! Search Results Problem

Post by christine »

Hi GOGOKOM,

thank you for your information! Yesterday I was too late for an answer :wink: to inform you:

I saw a message similar this:
<a href="/galeria/category/9-bydgoszcz">&lt;span class=&quot;highlight&quot;&gt;bydgoszcz&lt;/span&gt;</a></div>

above was a bug > https://github.com/joomla/joomla-cms/pull/16484 - which was solved in J 3.7.3
but, as you wrote, you have template override - that's why you got above message.

Kind regards, Christine
GOGOKOM
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 08 Aug 2017, 17:18

Re: Displaying Images In Joomla! Search Results Problem

Post by GOGOKOM »

On my site I have a Floox Joomshaper template, their technical support has solved the problem, also on Apple's MAC OS.
https://www.joomshaper.com/forums/floox ... ines-error
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Displaying Images In Joomla! Search Results Problem

Post by Jan »

Hi, great to hear it, thank you for the info.

Jan
If you find Phoca extensions useful, please support the project
Post Reply