Customizing search result of 'Search - Flexiadvsearch, FLEXIcontent search view' plugin

4 months 3 days ago #71257 by Ali_wdm
Hello ggppdk,

I want to add some condition for searching in 'Search - Flexiadvsearch, FLEXIcontent search view' plugin. There is some flexi field created by me, I want to use their 'getFiltered()' method in searching.

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

4 months 2 days ago #71259 by ggppdk


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

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

4 months 1 day ago - 4 months 1 day ago #71260 by Ali_wdm
I am using third party module 'Universal AJAX Live Search'. It searches the items using ajax call.

There is code in plugins\search\flexiadvsearch.php on line 627

$filtervalue = JRequest::getVar('filter_'.$field->id, '');
$empty_filtervalue_array = is_array($filtervalue) && !strlen(trim(implode('',$filtervalue)));
$empty_filtervalue_string = !is_array($filtervalue) && !strlen(trim($filtervalue));
if ($empty_filtervalue_array || $empty_filtervalue_string) continue;

There is no filter value in URL, so it does not call getFilteredSearch() function of the flexi custom field.
If I comment this line

if ($empty_filtervalue_array || $empty_filtervalue_string) continue;

It call the getFilteredSearch() function, and everything is working fine.
Please tell me how I call getFilteredSearch() function with no value in URL.


Note: There is one parameter 'allow_filtering_empty' to call getFiltered() function without any filter value in URL. I think, if there is one parameter like 'allow_filtering_empty', then this problem is sorted out. Please suggest me.

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

4 months 1 hour ago #71264 by Ali_wdm
Please reply..

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

3 months 4 weeks ago #71266 by ggppdk
Hello

you can try creating a system plugin and setting your value in an early event
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport('cms.plugin.plugin');
if (!defined('DS'))  define('DS',DIRECTORY_SEPARATOR);

require_once (JPATH_ADMINISTRATOR.DS.'components'.DS.'com_flexicontent'.DS.'defineconstants.php');

/**
 * Example system plugin
 */
class plgSystemFlexisystem extends JPlugin
{
	/**
	 * Constructor
	 */
	function __construct( &$subject, $config )
	{
		parent::__construct( $subject, $config );
	}



	function onAfterInitialise()
	{
		if (JFactory::getApplication()->isAdmin()) $this->handleSerialized();

		$app  = JFactory::getApplication();

		$task = $app->input->get('task', '', 'string');  // NOTE during this event 'task' is (controller.task), thus we use filtering 'string'
		$view = $app->input->get('view', '', 'string');
		$option = $app->input->get('option', '', 'string');
		
		$some_value = $app->input->get('some_name', '', 'string');

		if ( $view == 'search' )
		{
			if ( $comp == 'com_content' || $comp == 'com_flexicontent' )
			{
				$app->input->set('filter_' . 14, $some_value);
				//JRequest::setVar('filter_' . 14, $some_value);
			}
		}
	}

}


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

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

3 months 4 weeks ago #71268 by Ali_wdm


I have sent you a PM.
Attachments:

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

3 months 4 weeks ago #71270 by Ali_wdm
Searching is done by ajax call. There is no filter_ value in ajax call.
Ajax call parameters are as:
option:com_universal_ajax_live_search
lang:he
module_id:216
search_exp:que
categ[]:10076
dojo_preventCache:1514455273215

There are more than one plugin which are used to filter items.

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

3 months 3 weeks ago #71274 by ggppdk
Hello

since plugin
Search - Flexiadvsearch, FLEXIcontent search view

is only meant to be used in FLEXIcontent search view


you should enable plugin
Search - Flexisearch, for Joomla standard search view

and retry


-- FLEXIcontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star review. Thanks!

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

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.