All extensions are free now. Because it was coded by Russians.

Articles Good Search Module - Search Results

Please Log in or Create an account to join the conversation.

#
Hi, I'm using the search module and I want the article results to display without stripping the HTML formatting from the article. When the results are returned, I want the full article displayed with the proper formatting. Is this possible?

Please Log in or Create an account to join the conversation.

#
Hello,

Yes, it is possible, you can try to change a parameter 'Intro text limit' and set it to '0'.

Also, set 'Image type' parameter to 'Default'.

If it not help you, you can modify this template file - system\plg_articles_good_search\template\com_content\gsearch_blog_item.php

Find and remove this part of code:
if ($image_type == "intro" || $ImagesTab) {
	$item->introtext = trim(strip_tags($item->introtext, '<h2><h3>'));
}
if($model->module_params->text_limit) {
	preg_match('/(<img[^>]+>)/i', $item->introtext, $images_text);	
	$item->introtext = trim(strip_tags($item->introtext, '<h2><h3>'));
	if(extension_loaded('mbstring')) {
		$item->introtext = mb_strimwidth($item->introtext, 0, $model->module_params->text_limit, '...', 'utf-8');
	}
	else {
		$item->introtext = strlen($item->introtext) > $model->module_params->text_limit ? substr($item->introtext, 0, $model->module_params->text_limit) . '...' : $item->introtext;
	}
	if(count($images_text) && 
		($image_type == "text" || ($image_type == "" && !$ImageIntro))
	) {
		if(strpos($images_text[0], '://') === false) {
			$parts = explode('src="', $images_text[0]);
			$images_text[0] = $parts[0] . 'src="' . JURI::root() . $parts[1];
		}
		$item->introtext = $images_text[0] . $item->introtext;
	}
}

Please Log in or Create an account to join the conversation.

#
That worked perfectly. Thanks!

Please Log in or Create an account to join the conversation.

#
OK. I have one other small problem. On the search results page, I need the article titles to be an h2 not an h3. Is there an option for this?

Please Log in or Create an account to join the conversation.

#
There is no such option.

It is possible to fix with the template file modification.
system\plg_articles_good_search\template\com_content\gsearch_blog_item.php

You can override it in /templates/your_template/html/com_content/ (need to copy all template files).

Find this part of code:
	<h3 itemprop="name" class="item-title">
		<a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language)); ?>" itemprop="url">
			<?php echo $item->title; ?>
		</a>
	</h3>

Please Log in or Create an account to join the conversation.

#
Awesome, thank you!