当前位置: 首页>>代码示例>>PHP>>正文


PHP FlexicontentFields::onIndexAdvSearch方法代码示例

本文整理汇总了PHP中FlexicontentFields::onIndexAdvSearch方法的典型用法代码示例。如果您正苦于以下问题:PHP FlexicontentFields::onIndexAdvSearch方法的具体用法?PHP FlexicontentFields::onIndexAdvSearch怎么用?PHP FlexicontentFields::onIndexAdvSearch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FlexicontentFields的用法示例。


在下文中一共展示了FlexicontentFields::onIndexAdvSearch方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: onIndexAdvSearch

 public function onIndexAdvSearch(&$field, &$post, &$item)
 {
     if (!in_array($field->field_type, self::$field_types)) {
         return;
     }
     if (!$field->isadvsearch && !$field->isadvfilter) {
         return;
     }
     FlexicontentFields::onIndexAdvSearch($field, $post, $item, $required_properties = array('originalname'), $search_properties = array('title', 'desc'), $properties_spacer = ' ', $filter_func = null);
     return true;
 }
开发者ID:noxidsoft,项目名称:flexicontent-cck,代码行数:11,代码来源:parentfield.php

示例2: onIndexAdvSearch

 function onIndexAdvSearch(&$field, &$post, &$item)
 {
     if (!in_array($field->field_type, self::$field_types)) {
         return;
     }
     if (!$field->isadvsearch && !$field->isadvfilter) {
         return;
     }
     $field->isindexed = true;
     $field->extra_props = self::$extra_props;
     FlexicontentFields::onIndexAdvSearch($field, $post, $item, $required_properties = array(), $search_properties = array('text'), $properties_spacer = ' ', $filter_func = null);
     return true;
 }
开发者ID:khetsothea,项目名称:flexicontent-cck,代码行数:13,代码来源:radioimage.php

示例3: onIndexAdvSearch

 function onIndexAdvSearch(&$field, &$post, &$item)
 {
     if (!in_array($field->field_type, self::$field_types)) {
         return;
     }
     if (!$field->isadvsearch && !$field->isadvfilter) {
         return;
     }
     // a. Each of the values of $values array will be added to the advanced search index as searchable text (column value)
     // b. Each of the indexes of $values will be added to the column 'value_id',
     //    and it is meant for fields that we want to be filterable via a drop-down select
     // c. If $values is null then only the column 'value' will be added to the search index after retrieving
     //    the column value from table 'flexicontent_fields_item_relations' for current field / item pair will be used
     // 'required_properties' is meant for multi-property fields, do not add to search index if any of these is empty
     // 'search_properties'   contains property fields that should be added as text
     // 'properties_spacer'  is the spacer for the 'search_properties' text
     // 'filter_func' is the filtering function to apply to the final text
     FlexicontentFields::onIndexAdvSearch($field, $post, $item, $required_properties = array('title'), $search_properties = array('title', 'text'), $properties_spacer = ' ', $filter_func = 'strip_tags');
     return true;
 }
开发者ID:khetsothea,项目名称:flexicontent-cck,代码行数:20,代码来源:termlist.php

示例4: onIndexAdvSearch

 function onIndexAdvSearch(&$field, &$post, &$item)
 {
     if (!$field->iscore) {
         return;
     }
     if (!$field->isadvsearch && !$field->isadvfilter) {
         return;
     }
     $values = $this->_prepareForSearchIndexing($field, $post, $for_advsearch = 1);
     $filter_func = $field->field_type == 'maintext' ? 'strip_tags' : null;
     $field->isindexed = in_array($field->field_type, array('type', 'state', 'tags', 'categories', 'created', 'createdby', 'modified', 'modifiedby'));
     FlexicontentFields::onIndexAdvSearch($field, $values, $item, $required_properties = array(), $search_properties = array(), $properties_spacer = ' ', $filter_func);
     return true;
 }
开发者ID:nettdotkomm,项目名称:flexicontent-cck,代码行数:14,代码来源:core.php

示例5: onIndexAdvSearch

	function onIndexAdvSearch(&$field, &$post, &$item)
	{
		if ( !in_array($field->field_type, self::$field_types) ) return;
		if ( !$field->isadvsearch && !$field->isadvfilter ) return;
		
		FlexicontentFields::onIndexAdvSearch($field, $post, $item, $required_properties=array('url'), $search_properties=array('title','author','description','audiotype'), $properties_spacer=' ', $filter_func=null);
		return true;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:8,代码来源:sharedaudio.php

示例6: onIndexAdvSearch

 function onIndexAdvSearch(&$field, &$post, &$item)
 {
     if (!in_array($field->field_type, self::$field_types)) {
         return;
     }
     if (!$field->isadvsearch && !$field->isadvfilter) {
         return;
     }
     if ($post === null) {
         $values = null;
         $field->field_valuesselect = ' CAST(fi.value AS UNSIGNED) AS value_id, ct.title AS value';
         $field->field_valuesjoin = ' JOIN #__content AS ct ON ct.id = CAST(fi.value AS UNSIGNED)';
         $field->field_groupby = ' GROUP BY CAST(fi.value AS UNSIGNED) ';
     } else {
         if (!empty($post)) {
             $_ids = array();
             foreach ($post as $_id) {
                 $_ids[] = (int) $_id;
             }
             // convert itemID:catID to itemID
             $db = JFactory::getDBO();
             $query = 'SELECT i.id AS value_id, i.title AS value FROM #__content AS i WHERE i.id IN (' . implode($_ids, ',') . ')';
             $db->setQuery($query);
             $_values = $db->loadAssocList();
             $values = array();
             foreach ($_values as $v) {
                 $values[$v['value_id']] = $v['value'];
             }
         }
     }
     //JFactory::getApplication()->enqueueMessage('ADV: '.print_r($values, true), 'notice');
     FlexicontentFields::onIndexAdvSearch($field, $values, $item, $required_properties = array(), $search_properties = array(), $properties_spacer = ' ', $filter_func = null);
     return true;
 }
开发者ID:khetsothea,项目名称:flexicontent-cck,代码行数:34,代码来源:relation.php

示例7: onIndexAdvSearch

 function onIndexAdvSearch(&$field, &$post, &$item)
 {
     if (!in_array($field->field_type, self::$field_types)) {
         return;
     }
     if (!$field->isadvsearch && !$field->isadvfilter) {
         return;
     }
     if ($post === null) {
         // null indicates that indexer is running, values is set to NULL which means retrieve data from the DB
         $values = null;
         $field->field_rawvalues = 1;
         $field->field_valuesselect = ' file.id AS value_id, file.altname, file.description, file.filename';
         $field->field_valuesjoin = ' JOIN #__flexicontent_files AS file ON file.id = fi.value';
         $field->field_groupby = null;
     } else {
         $_files_data = $this->getFileData($post, $published = true, $extra_select = ', id AS value_id');
         $values = array();
         if ($_files_data) {
             foreach ($_files_data as $_file_id => $_file_data) {
                 $values[$_file_id] = (array) $_file_data;
             }
         }
     }
     FlexicontentFields::onIndexAdvSearch($field, $values, $item, $required_properties = array('filename'), $search_properties = array('altname', 'description'), $properties_spacer = ' ', $filter_func = 'strip_tags');
     return true;
 }
开发者ID:khetsothea,项目名称:flexicontent-cck,代码行数:27,代码来源:file.php

示例8: onIndexAdvSearch

	function onIndexAdvSearch(&$field, &$post, &$item) {
		if ( !in_array($field->field_type, self::$field_types) ) return;
		if ( !$field->isadvsearch && !$field->isadvfilter ) return;
		
		FlexicontentFields::onIndexAdvSearch($field, $post, $item, $required_properties=array(), $search_properties=array(), $properties_spacer=' ', $filter_func='strip_tags');
		return true;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:7,代码来源:proizvoditel.php

示例9: onIndexAdvSearch

	function onIndexAdvSearch(&$field, &$post, &$item)
	{
		if ( !in_array($field->field_type, self::$field_types) ) return;
		if ( !$field->isadvsearch && !$field->isadvfilter ) return;
		
		FlexicontentFields::onIndexAdvSearch($field, $post, $item, $required_properties=array(), $search_properties=array('addr1','addr2','addr3','city','state','province','zip','country'), $properties_spacer=' ', $filter_func=null);
		return true;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:8,代码来源:addressint.php

示例10: onIndexAdvSearch

	function onIndexAdvSearch(&$field, &$post, &$item)
	{
		if ( !$field->iscore ) return;
		if ( !$field->isadvsearch && !$field->isadvfilter ) return;
		
		$values = $this->_prepareForSearchIndexing($field, $post, $for_advsearch=1);
		$filter_func = $field->field_type == 'maintext' ? 'strip_tags' : null;
		
		FlexicontentFields::onIndexAdvSearch($field, $values, $item, $required_properties=array(), $search_properties=array(), $properties_spacer=' ', $filter_func);
		return true;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:11,代码来源:core.php

示例11: onIndexAdvSearch

	function onIndexAdvSearch(&$field, &$post, &$item)
	{
		if ( !in_array($field->field_type, self::$field_types) ) return;
		if ( !$field->isadvsearch && !$field->isadvfilter ) return;
		
		if ($post) {
			$_files_data = $this->getFileData( $post, $published=true, $extra_select =', id AS value_id' );
			$values = array();
			if ($_files_data) foreach($_files_data as $_file_id => $_file_data) $values[$_file_id] = (array)$_file_data;
		} else {
			$field->field_rawvalues = 1;
			$field->field_valuesselect = ' file.id AS value_id, file.altname, file.description, file.filename';
			$field->field_valuesjoin   = ' JOIN #__flexicontent_files AS file ON file.id = fi.value';
			$field->field_groupby      = null;
		}
		FlexicontentFields::onIndexAdvSearch($field, $values, $item, $required_properties=array('filename'), $search_properties=array('altname', 'description'), $properties_spacer=' ', $filter_func='strip_tags');
		return true;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:18,代码来源:file.php

示例12: onIndexAdvSearch

	function onIndexAdvSearch(&$field, &$post, &$item) {
		if ($field->field_type != 'phonenumbers') return;
		if ( !$field->isadvsearch ) return;
		
		FlexicontentFields::onIndexAdvSearch($field, $post, $item, $required_properties=array(), $search_properties=array(), $properties_spacer=' ', $filter_func=null);
		return true;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:7,代码来源:phonenumbers.php


注:本文中的FlexicontentFields::onIndexAdvSearch方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。