Modification of search and ad for flexi in 1.5.6 - RC1a r979

More
12 years 10 months ago #21153 by goum
Hello,
These are modifications on search in flexicontent files came from 1.5.6 - RC1a r979

First languages to be added in .com_flexicontent.ini :

#1 In French :
Code:
FLEXI_ALL_WORDS=Tous les mots FLEXI_ANY_WORDS=N'importe quel mot FLEXI_EXACT_SENTENCE=Phrase exacte FLEXI_ADV_NEWEST_FIRST=Plus récents en premier FLEXI_ADV_OLDEST_FIRST=Plus anciens en premier FLEXI_ADV_MOST_POP=Plus populaires en premier FLEXI_ADV_ALPHA=Par ordre alphabétique FLEXI_ADV_SEARCH_SEC_CAT=Par Section et/ou Categories FLEXI_BASIC_SEARCH=Recherche simple FLEXI_SEARCH_KEYWORD=Mot(s) recherché(s) FLEXI_SEARCH_KEYWORD_TIP=Le ou les mots clés que vous cherchez FLEXI_SEARCH_KEYWORD_REQUIREMENT=Méthode de recherche FLEXI_SEARCH_KEYWORD_REQUIREMENT_TIP=Le type de recherche que vous souhaitez faire. FLEXI_ADVANCED_SEARCH=Recherche Avancée FLEXI_SEARCH_BEHAVIOR=Comportement pour la recherche avancée FLEXI_BASIC_ADVANCED_COMBINATION=Avec la combinaison FLEXI_BASIC_ADVANCED_COMBINATION_TIP=Vous pouvez choisir entre la combinaison "ET" (ex: fibre plante = fibre et plante) ou la combinaison "OU" (ex: fibre plante = fibre ou plante) FLEXI_SEARCH_COMBINATION_OR=OU FLEXI_SEARCH_COMBINATION_AND=ET FLEXI_SEARCH_ORDERING=Ordre d'affichage FLEXI_SEARCH_ORDERING_TIP=L'Ordre d'affichage des articles FLEXI_TOTALRESULTSFOUND=Nombre %s de résultats

#2 In english :
Code:
FLEXI_ALL_WORDS=All words FLEXI_ANY_WORDS=Any words FLEXI_EXACT_SENTENCE=Exact sentence FLEXI_ADV_NEWEST_FIRST=Newest first FLEXI_ADV_OLDEST_FIRST=Oldest first FLEXI_ADV_MOST_POP=Most popular FLEXI_ADV_ALPHA=Alphabetical FLEXI_ADV_SEARCH_SEC_CAT=Section/Category FLEXI_BASIC_SEARCH=Basic Search FLEXI_SEARCH_KEYWORD=Keyword FLEXI_SEARCH_KEYWORD_TIP=Keyword typ FLEXI_SEARCH_KEYWORD_REQUIREMENT=Keyword requirement FLEXI_SEARCH_KEYWORD_REQUIREMENT_TIP= FLEXI_ADVANCED_SEARCH=Advanced search FLEXI_SEARCH_BEHAVIOR=Behavior FLEXI_BASIC_ADVANCED_COMBINATION=Advanced Combination FLEXI_BASIC_ADVANCED_COMBINATION_TIP= FLEXI_SEARCH_COMBINATION_OR=OR FLEXI_SEARCH_COMBINATION_AND=AND FLEXI_SEARCH_ORDERING=Ordering FLEXI_SEARCH_ORDERING_TIP= FLEXI_TOTALRESULTSFOUND=Total results found %s

In the component:

#3 Modification on default_form.php came from com_flexicontent/views/search/tmpl:
Code:
<?php defined('_JEXEC') or die('Restricted access'); $autodisplayextrafields = $this->params->get('autodisplayextrafields', 1); if(!$autodisplayextrafields) { $this->document->addScriptDeclaration(' window.addEvent("domready", function() { var status = { "true": "open", "false": "close" }; // -- vertical var myVerticalSlide = new Fx.Slide("extrafields").hide(); /*$("advancedsearchtext").addEvent("click", function(event){ event.stop(); myVerticalSlide.slideIn(); });*/ $("advancedsearchtext").addEvent("click", function(event){ //event.stop(); //myVerticalSlide.slideOut(); myVerticalSlide.toggle(); }); }); '); } ?> <form id="searchForm" action="index.php" method="get" name="searchForm"> <fieldset id='fc_search_set_advsearch' class='fc_search_set'> <legend><?php echo JText::_('FLEXI_BASIC_SEARCH'); ?></legend> <table id="basicfields" class="basicfields <?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" cellspacing="1"> <tr class="fc_search_row_<?php echo (($r++)%2);?>"> <td nowrap="nowrap" class='fc_search_label_cell'> <label for="search_searchword" class='hasTip' title='<?php echo JText::_('FLEXI_SEARCH_KEYWORD'); ?>::<?php echo JText::_('FLEXI_SEARCH_KEYWORD_TIP'); ?>'> <?php echo JText::_('FLEXI_SEARCH_KEYWORD'); ?>: </label> </td> <td nowrap="nowrap" class="fc_search_option_cell"> <input type="text" name="searchword" id="search_searchword" size="30" maxlength="50" value="<?php echo $this->escape($this->searchword); ?>" class="inputbox" /> </td> <td width="100%" nowrap="nowrap"> <button name="Search" onclick="this.form.submit()" class="button"><?php echo JText::_( 'FLEXI_SEARCH' );?></button> </td> </tr> <?php if ($show_searchphrase = $this->params->get('show_searchphrase', 1)) : ?> <tr class="fc_search_row_<?php echo (($r++)%2);?>"> <td nowrap="nowrap" class='fc_search_label_cell'> <label class='hasTip' title='<?php echo JText::_('FLEXI_SEARCH_KEYWORD_REQUIREMENT'); ?>::<?php echo JText::_('FLEXI_SEARCH_KEYWORD_REQUIREMENT_TIP'); ?>'> <?php echo JText::_('FLEXI_SEARCH_KEYWORD_REQUIREMENT'); ?>: </label> </td> <td colspan="2" class="fc_search_option_cell"> <?php echo $this->lists['searchphrase']; ?> </td> </tr> <?php endif; ?> <?php if ($this->params->get('cantypes', 1) && (count($this->fieldtypes)>0)) : ?> <tr class="fc_search_row_<?php echo (($r++)%2);?>"> <td nowrap="nowrap" class='fc_search_label_cell' valign='top'> <label for="fieldtypes" class='hasTip' title='<?php echo JText::_('FLEXI_SEARCH_CONTENT_TYPE'); ?>::<?php echo JText::_('FLEXI_SEARCH_CONTENT_TYPE_TIP'); ?>'> <?php echo JText::_('FLEXI_SEARCH_CONTENT_TYPE'); ?>: </label> </td> <td colspan="2" class="fc_search_option_cell"> <?php echo $this->lists['fieldtypes'];?> </td> </tr> <?php endif; ?> <?php if (!$autodisplayextrafields) : ?> <tr class="fc_search_row_<?php echo (($r++)%2);?>"> <td colspan="3" class="fc_search_option_cell"> [url=javascript:;" id="advancedsearchtext]<?php echo JText::_('FLEXI_ADVANCED_SEARCH'); ?>[/url] </td> </tr> <?php endif; ?> </table> </fieldset> <fieldset id='fc_search_set_advsearch' class='fc_search_set'> <legend><?php echo JText::_('FLEXI_ADVANCED_SEARCH'); ?></legend> <table id="extrafields" class="extrafields <?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" cellspacing="1"> <?php //params[search_fields] $search_fields = $this->params->get('search_fields', ''); $search_fields = explode(",", $search_fields); $fields = &$this->fields; foreach($search_fields as $f) { if(!isset($fields[$f])) continue; ?> <tr class="fc_search_row_<?php echo (($r++)%2);?>"> <td class='fc_search_label_cell' valign='top'> <?php if ($fields[$f]->description) : ?> <label for="<?php echo $fields[$f]->name; ?>" class="hasTip" title="<?php echo $fields[$f]->label; ?>::<?php echo $fields[$f]->description; ?>"> <?php echo $fields[$f]->label; ?>: </label> <?php else : ?> <label for="<?php echo $fields[$f]->name; ?>" class="hasTip" title="<?php echo JText::_('FLEXI_SEARCH_MISSING_FIELD_DESCR'); ?>::<?php echo JText::sprintf('FLEXI_SEARCH_MISSING_FIELD_DESCR_TIP', $fields[$f]->label ); ?>"> <?php echo $fields[$f]->label; ?>: </label> <?php endif; ?> </td> <td colspan="2" class="fc_search_option_cell"> <?php $noplugin = '<div id="fc-change-error" class="fc-error">'. JText::_( 'FLEXI_PLEASE_PUBLISH_PLUGIN' ) .'</div>'; if(isset($fields[$f]->html)) { echo $fields[$f]->html; } else { echo $noplugin; } ?> </td> </tr> <?php //} } ?> </table> </fieldset> <fieldset id='fc_search_set_search_behavior' class='fc_search_set'> <legend><?php echo JText::_('FLEXI_SEARCH_BEHAVIOR'); ?></legend> <table id="resultoptions" class="resultoptions <?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" cellspacing="1"> <?php if($show_operator = $this->params->get('show_operator', 1)) : $operator_desc = $this->params->get('operator_desc', 'FLEXI_OPERATOR_DESC'); $operator_desc = ($operator_desc=='FLEXI_OPERATOR_DESC')?JText::_('FLEXI_OPERATOR_DESC'):$operator_desc; ?> <tr class="fc_search_row_<?php echo (($r++)%2);?>"> <td class='fc_search_label_cell' valign='top'> <label for="operator" class="hasTip" title='<?php echo JText::_('FLEXI_BASIC_ADVANCED_COMBINATION'); ?>::<?php echo JText::_('FLEXI_BASIC_ADVANCED_COMBINATION_TIP'); ?>'> <?php echo JText::_("FLEXI_BASIC_ADVANCED_COMBINATION"); ?>: </label> </td> <td colspan="2" class="fc_search_option_cell"> <?php echo $this->lists['operator']; ?>: </td> </tr> <?php endif; ?> <?php if($show_searchordering = $this->params->get('show_searchordering', 1)) : ?> <tr class="fc_search_row_<?php echo (($r++)%2);?>"> <td class='fc_search_label_cell' valign='top'> <label for="ordering" class="hasTip" title='<?php echo JText::_('FLEXI_SEARCH_ORDERING'); ?>::<?php echo JText::_('FLEXI_SEARCH_ORDERING_TIP'); ?>'> <?php echo JText::_( 'FLEXI_SEARCH_ORDERING' );?>: </label> </td> <td colspan="2" class="fc_search_option_cell"> <?php echo $this->lists['ordering'];?> </td> </tr> <?php endif; ?> <?php if ($this->params->get( 'show_searchareas', 0 )) : ?> <tr class="fc_search_row_<?php echo (($r++)%2);?>"> <td class='fc_search_label_cell' valign='top'> <label class="hasTip" title='<?php echo JText::_('FLEXI_SEARCH_OTHER_CONTENT'); ?>::<?php echo JText::_('FLEXI_SEARCH_OTHER_CONTENT_TIP'); ?>'> <?php echo JText::_( 'FLEXI_SEARCH_OTHER_CONTENT' );?>: </label> <td colspan="2" class="fc_search_option_cell"> <?php // DISABLE search areas 'content' and old 'flexisearch' ?> <?php unset($this->searchareas['search']['content']); unset($this->searchareas['search']['flexisearch']); ?> <?php foreach ($this->searchareas['search'] as $val => $txt) : $checked = is_array( $this->searchareas['active'] ) && in_array( $val, $this->searchareas['active'] ) ? 'checked="checked"' : ''; ?> <input type="checkbox" name="areas[]" value="<?php echo $val;?>" id="area_<?php echo $val;?>" <?php echo $checked;?> /> <label for="area_<?php echo $val;?>"> <?php echo JText::_($txt); ?> </label> <?php endforeach; ?> </td> </tr> <?php else:?> <tr> <td colspan="3"> <input type="hidden" name="areas[]" value="flexicontent" id="area_flexicontent" /> </td> </tr> <?php endif; ?> </table> </fieldset> <table class="searchintro<?php echo $this->escape($this->params->get('pageclass_sfx')); ?>" cellspacing="1"> <tr> <td colspan="3" > <br /> <?php echo JText::_( 'FLEXI_SEARCH_KEYWORD' ) .' <b>'. $this->escape($this->searchword) .'</b>'; ?> </td> </tr> <tr> <td> <br /> <?php echo $this->result; ?> </td> </tr> </table> <br /> <?php if($this->total > 0) : ?> <div align="center"> <div style="float: right;"> <label for="limit"> <?php echo JText::_( 'Display Num' ); ?> </label> <?php echo $this->pagination->getLimitBox( ); ?> </div> <div> <?php //echo $this->pagination->getPagesCounter(); ?> <?php echo $this->pagination->getPagesLinks(); ?> </div> </div> <?php endif; ?> <?php if(!$show_searchphrase) { $default_searchphrase = $this->params->get('default_searchphrase', 'all'); ?> <input type="hidden" name="searchphrase" value="<?php echo $default_searchphrase;?>" /> <?php } ?> <?php if(!$show_operator) { $default_operator = $this->params->get('default_operator', 'OR'); ?> <input type="hidden" name="operator" value="<?php echo $default_operator;?>" /> <?php } ?> <?php if(!$show_searchordering) { $default_searchordering = $this->params->get('default_searchordering', 'newest'); ?> <input type="hidden" name="ordering" value="<?php echo $default_searchordering;?>" /> <?php } ?> <input type="hidden" name="option" value="com_flexicontent" /> <input type="hidden" name="task" value="search" /> <input type="hidden" name="Itemid" value="<?php echo JRequest::getVar("Itemid");?>" /> </form>

#4 Modification on default.xlm in com_flexicontent/views/search/tmpl:
Code:
<?xml version="1.0" encoding="utf-8"?> <metadata> <layout title="Search"> <message> <![CDATA[STANDARD SEARCH LAYOUT DESC]]> </message> </layout> <state> <name>Search</name> <description>STANDARD SEARCH LAYOUT DESC</description> <params addpath="/administrator/components/com_flexicontent/elements"> <param name="" type="separator" default="This feature is still under development, it supports searching key-words in title and description. Also supports searching custom fields: select, textarea, text, other non-core fields are supported as raw values only. NOTE: DO NOT enable for title &amp; description since they are always included in the basic search. Other fields maybe supported later. After enabling advanced search mode for a field, go to search index management and click (a) purge and (b) index to rerender fields display and thus update the index" level="level1" menu="hide" /> <param name="" type="separator" level="level1" default="Search Form Configuration" /> <param name="" type="separator" level="level2" default="Basic Search Parameters" /> <param name="" type="separator" level="level3" default="Search words" /> <param name="show_searchphrase" type="radio" default="1" label="Show combination methods" description="Display the methods of combining the search words, so that user can set his/her prefered method"> <option value="0">FLEXI_NO</option> <option value="1">FLEXI_YES</option> </param> <param name="default_searchphrase" type="list" default="all" label="Default combination method" description="Default method of combining the search words"> <option value="all">FLEXI_ALL_WORDS</option> <option value="any">FLEXI_ANY_WORDS</option> <option value="exact">FLEXI_EXACT_SENTENCE</option> </param> <param name="minchars" type="text" default="3" label="Minimum length" description="Minimum character length the search words are allowed to have" /> <param name="maxchars" type="text" default="20" label="Maxmum length" description="Maximum characters length the search words are allowed to have" /> <param name="" type="separator" level="level3" default="Content types" description="Content types to search in"/> <param name="cantypes" type="radio" default="1" label="Allow users to select" description="Allow users the content types they want to include in their search"> <option value="0">FLEXI_NO</option> <option value="1">FLEXI_YES</option> </param> <param name="fieldtypes" type="types" default="" label="Limit to types" description="What content types the search will include. NOTE: the above option will be LIMITED to display ONLY the type selected here" multiple="true" /> <param name="" type="separator" level="level2" default="Advanced Search Parameters" /> <param name="autodisplayextrafields" type="radio" default="1" label="Advanced Search Box" description="If this is disabled. Then a clickable text will appear to allow user to toggle the advanced search box on/off."> <option value="0">FLEXI_HIDE</option> <option value="1">FLEXI_SHOW</option> </param> <param name="listfields" type="fields" default="" label="Add Field" description="Please select fields to help you with 'Fields' textarea below." fieldnameastext="true" fieldnameasvalue="true" isadvsearch="1" onchange="javascript:f=document.getElementById('paramssearch_fields');if(f.value)f.value+=','+this.value;else f.value=this.value;this.value='';" /> <param name="search_fields" type="textarea" default="" label="Advanced Search Fields" description="Enter extra field names, that you want to be included in the your search form. The will appear in the advanced search box. You can separate each field by comma(,)." cols="40" rows="3" /> <param name="" type="separator" level="level2" default="Search Form behavior" /> <param name="" type="separator" level="level3" default="Basic/Advanced Combination" /> <param name="show_operator" type="radio" default="1" label="Allow users to select" description="Allow user to select how to combine the Basic and Advanced Search Boxes. Options will be ANY (logical or) and BOTH (logical and)"> <option value="0">FLEXI_NO</option> <option value="1">FLEXI_YES</option> </param> <param name="default_operator" type="radio" default="OR" label="Default value" description="Default behavior for combining the Basic and Advanced Search boxes. Select ANY (logical or) or BOTH (logical and). NOTE: this can be overriden by the user of the form."> <option value="OR">ANY</option> <option value="AND">BOTH</option> </param> <param name="" type="separator" level="level3" default="Results Ordering" /> <param name="show_searchordering" type="radio" default="1" label="Allow users to select" description="Allow users to select the ordering of the search results"> <option value="0">FLEXI_NO</option> <option value="1">FLEXI_YES</option> </param> <param name="show_searchareas" type="radio" default="0" label="Show ALL Search Areas" description="Allow the user to select and search other areas of the website content, e.g. like weblinks, user contacts, etc"> <option value="0">FLEXI_NO</option> <option value="1">FLEXI_YES</option> </param> <param name="default_searchordering" type="list" default="newest" label="Default value" description="Default ordering for sorting the results of the search"> <option value="newest">FLEXI_ADV_NEWEST_FIRST</option> <option value="oldest">FLEXI_ADV_OLDEST_FIRST</option> <option value="popular">FLEXI_ADV_MOST_POP</option> <option value="alpha">FLEXI_ADV_ALPHA</option> <option value="category">FLEXI_ADV_SEARCH_SEC_CAT</option> </param> <param name="" type="separator" level="level1" default="Search Results Configuration" /> <param name="show_section" type="radio" default="0" label="Show section" description="Display section for each result. Note, this usually should be disabled since all FLEXIcontent items are placed in a single section"> <option value="0">FLEXI_NO</option> <option value="1">FLEXI_YES</option> </param> <param name="show_text" type="radio" default="1" label="Show description" description="Display for each result its description text"> <option value="0">FLEXI_NO</option> <option value="1">FLEXI_YES</option> </param> <param name="show_date" type="radio" default="1" label="Show creation date" description="Display for each result its creation date"> <option value="0">FLEXI_NO</option> <option value="1">FLEXI_YES</option> </param> </params> </state> </metadata>

#5 and finaly in view htlm came from com_flexicontent/views/search/
Code:
<?php /** * @version 1.5 stable $Id$ * @package Joomla * @subpackage FLEXIcontent * @copyright (C) 2009 Emmanuel Danan - www.vistamedia.fr * @license GNU/GPL v2 * * FLEXIcontent is a derivative work of the excellent QuickFAQ component * @copyright (C) 2008 Christoph Lukes * see www.schlu.net for more information * * FLEXIcontent is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die( 'Restricted access' ); jimport( 'joomla.application.component.view'); /** * HTML View class for the FLEXIcontent component * * @static * @package Joomla * @subpackage Weblinks * @since 1.0 */ class FLEXIcontentViewSearch extends JView { function display($tpl = null) { $mainframe = &JFactory::getApplication(); require_once(JPATH_COMPONENT.DS.'helpers'.DS.'search.php' ); // Initialize some variables $pathway =& $mainframe->getPathway(); $uri =& JFactory::getURI(); $dispatcher = & JDispatcher::getInstance(); $document = & JFactory::getDocument(); $error = ''; $rows = null; $total = 0; // Get some data from the model $areas = &$this->get('areas'); $state = &$this->get('state'); $searchword = $state->get('keyword'); //$params = &$mainframe->getParams(); $params = JComponentHelper::getParams('com_flexicontent'); //$params->bind($params->_raw); //$typeid_for_advsearch = $params->get('typeid_for_advsearch'); if (!$params->get('disablecss', '')) { $document->addStyleSheet($this->baseurl.'/components/com_flexicontent/assets/css/flexicontent.css'); $document->addCustomTag('<!--[if IE]><style type="text/css">.floattext {zoom:1;}</style><![endif]-->'); } $searchkeywordlabel = $params->get('searchkeywordlabel', 'Search Keyword'); //require_once(JPATH_COMPONENT.DS.'classes'.DS.'flexicontent.fields.php'); //JRequest::setVar('typeid', $typeid_for_advsearch, '', 'int'); if(!($itemmodel = $this->getModel('items'))) { require_once(JPATH_COMPONENT.DS.'models'.DS.'items.php'); $itemmodel = new FlexicontentModelItems(); } //$item = &$itemmodel->getItem(); $item = new stdClass; $item->version = 0; $search_fields = $params->get('search_fields', ''); $search_fields = "'".str_replace(",", "','", $search_fields)."'"; $fields = & $itemmodel->getAdvSearchFields($search_fields); //Import fields JPluginHelper::importPlugin('flexicontent_fields'); // Add html to field object trought plugins //$custom = JRequest::getVar('custom', array()); foreach ($fields as $field) { $field->parameters->set( 'use_html', 0 ); $field->parameters->set( 'allow_multiple', 0 ); if( ($field->field_type == 'title') || ($field->field_type == 'maintext') || ($field->field_type == 'textarea')) { $field->field_type = 'text'; } $label = $field->label; $fieldsearch = JRequest::getVar($field->name, array()); //$fieldsearch = $mainframe->getUserStateFromRequest( 'flexicontent.serch.'.$field->name, $field->name, array(), 'array' ); $field->value = isset($fieldsearch[0])?$fieldsearch:array(); //$results = $dispatcher->trigger('onAdvSearchDisplayField', array( &$field, &$item )); $fieldname = $field->iscore ? 'core' : $field->field_type; FLEXIUtilities::call_FC_Field_Func($fieldname, 'onAdvSearchDisplayField', array( &$field, &$item )); $field->label = $label; } //FlexicontentFields::getItemFields(); $menus = &JSite::getMenu(); $menu = $menus->getActive(); // because the application sets a default page title, we need to get it // right from the menu item itself if (is_object( $menu )) { $menu_params = new JParameter( $menu->params ); if (!$menu_params->get( 'page_title')) { $params->set('page_title', JText::_( 'FLEXI_SEARCH' )); } } else { $params->set('page_title', JText::_( 'FLEXI_SEARCH' )); } $document = &JFactory::getDocument(); $document->setTitle( $params->get( 'page_title' ) ); // Get the parameters of the active menu item $params = &$mainframe->getParams(); $lists = array(); $fieldtypes_a = $params->get('fieldtypes', array()); if((count($fieldtypes_a)>0) && !is_array($fieldtypes_a)) $fieldtypes_a = array($fieldtypes_a); if($params->get('cantypes', 1) && (count($fieldtypes_a)>0)) { $db =& JFactory::getDBO(); $fieldtypes = "'".implode("','", $fieldtypes_a)."'"; $query = 'SELECT id AS value, name AS text' . ' FROM #__flexicontent_types' . ' WHERE published = 1 AND id IN ('.$fieldtypes.')' . ' ORDER BY name ASC, id ASC' ; $db->setQuery($query); $types = $db->loadObjectList(); $lists['fieldtypes'] = JHTML::_('select.genericlist', $types, 'fieldtypes[]', 'multiple="true" size="5" style="min-width:186px;" ', 'value', 'text', $fieldtypes_a, 'fieldtypes'); } if($show_searchordering = $params->get('show_searchordering', 1)) { $default_searchordering = $params->get('default_searchordering', 'newest'); // built select lists $orders = array(); $orders[] = JHTML::_('select.option', 'newest', JText::_( 'FLEXI_ADV_NEWEST_FIRST' ) ); $orders[] = JHTML::_('select.option', 'oldest', JText::_( 'FLEXI_ADV_OLDEST_FIRST' ) ); $orders[] = JHTML::_('select.option', 'popular', JText::_( 'FLEXI_ADV_MOST_POP' ) ); $orders[] = JHTML::_('select.option', 'alpha', JText::_( 'FLEXI_ADV_ALPHA' ) ); $orders[] = JHTML::_('select.option', 'category', JText::_( 'FLEXI_ADV_SEARCH_SEC_CAT' ) ); $lists['ordering'] = JHTML::_('select.genericlist', $orders, 'ordering', 'class="inputbox"', 'value', 'text', $state->get('ordering', $default_searchordering) ); } if($show_searchphrase = $params->get('show_searchphrase', 1)) { $default_searchphrase = $params->get('default_searchphrase', 'all'); $searchphrases = array(); $searchphrases[] = JHTML::_('select.option', 'all', JText::_( 'FLEXI_ALL_WORDS' ) ); $searchphrases[] = JHTML::_('select.option', 'any', JText::_( 'FLEXI_ANY_WORDS' ) ); $searchphrases[] = JHTML::_('select.option', 'exact', JText::_( 'FLEXI_EXACT_SENTENCE' ) ); $lists['searchphrase' ]= JHTML::_('select.radiolist', $searchphrases, 'searchphrase', '', 'value', 'text', $state->get('match', $default_searchphrase) ); } if($show_operator = $params->get('show_operator', 1)) { $default_operator = $params->get('default_operator', 'OR'); $operator = JRequest::getVar('operator', $default_operator); $operators = array(); $operators[] = JHTML::_('select.option', 'OR', JText::_( 'FLEXI_SEARCH_COMBINATION_OR' ) ); $operators[] = JHTML::_('select.option', 'AND', JText::_( 'FLEXI_SEARCH_COMBINATION_AND' ) ); $lists['operator']= JHTML::_('select.radiolist', $operators, 'operator', '', 'value', 'text', $operator ); } // log the search FLEXIadvsearchHelper::logSearch( $searchword); //limit searchword $min = $params->get('minchars', 3); $max = $params->get('maxchars', 20); if(FLEXIadvsearchHelper::limitSearchWord($searchword, $min, $max)) { $error = JText::sprintf( 'FLEXI_SEARCH_MESSAGE', $min, $max ); } //sanatise searchword if(FLEXIadvsearchHelper::santiseSearchWord($searchword, $state->get('match'), $min)) { $error = JText::_( 'IGNOREKEYWORD' ); } if (!$searchword && count( JRequest::get('post') ) ) { //$error = JText::_( 'Enter a search keyword' ); } // put the filtered results back into the model // for next release, the checks should be done in the model perhaps... $state->set('keyword', $searchword); if(!$error) { $results = &$this->get('data' ); $total = &$this->get('total'); $pagination = &$this->get('pagination'); //require_once (JPATH_SITE.DS.'components'.DS.'com_content'.DS.'helpers'.DS.'route.php'); require_once (JPATH_SITE.DS.'components'.DS.'com_flexicontent'.DS.'helpers'.DS.'route.php'); for ($i=0; $i < count($results); $i++) { $row = &$results[$i]->text; if($searchword) { if ($state->get('match') == 'exact') { $searchwords = array($searchword); $needle = $searchword; }else{ $searchwords = preg_split("/\s+/u", $searchword); $needle = $searchwords[0]; } $row = FLEXIadvsearchHelper::prepareSearchContent( $row, 200, $needle ); $searchwords = array_unique( $searchwords ); $searchRegex = '#('; $x = 0; foreach ($searchwords as $k => $hlword) { $searchRegex .= ($x == 0 ? '' : '|'); $searchRegex .= preg_quote($hlword, '#'); $x++; } $searchRegex .= ')#iu'; $row = preg_replace($searchRegex, '<span class="highlight">\0</span>', $row ); } $results[$i]->text = str_replace('[span=highlight]', '<span class="highlight">', $results[$i]->text); $results[$i]->text = str_replace('[/span]', '</span>', $results[$i]->text); $results[$i]->text = str_replace('[br /]', '<br />', $results[$i]->text); $result =& $results[$i]; if ($result->created) { $created = JHTML::Date( $result->created ); }else { $created = ''; } $result->created = $created; $result->count = $i + 1; } } $this->result = JText::sprintf( 'FLEXI_TOTALRESULTSFOUND', $total ); $this->assignRef('pagination', $pagination); $this->assignRef('fields', $fields); $this->assignRef('results', $results); $this->assignRef('lists', $lists); $this->assignRef('params', $params); $this->assign('ordering', $state->get('ordering')); $this->assign('searchword', $searchword); $this->assign('searchphrase', $state->get('match')); $this->assign('searchareas', $areas); $this->assign('total', $total); $this->assign('error', $error); $this->assign('action', $uri->toString()); $this->assign('searchkeywordlabel', $searchkeywordlabel); $this->assignRef('fieldtypes', $fieldtypes_a); $this->assignRef('document', $document); parent::display($tpl); } }

Have a nice day.
Regards.

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

More
12 years 10 months ago #21155 by micker
great thanks for community !

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

More
12 years 10 months ago #21157 by ggppdk
Hello, thanks, i have included the language strings in all files in the SVN

Regards


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

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

More
12 years 10 months ago #21215 by goum
Hello,
Please, if it wasn't already done, could you also read (in French) :
<!-- l --><a class="postlink-local" href=" flexicontent.org/phpbb/viewtopic.php?f=38&t=4027 ">viewtopic.php?f=38&t=4027
<!-- l --><a class="postlink-local" href=" flexicontent.org/phpbb/viewtopic.php?f=38&t=4028 ">viewtopic.php?f=38&t=4028
<!-- l --><a class="postlink-local" href=" flexicontent.org/phpbb/viewtopic.php?f=38&t=4029 ">viewtopic.php?f=38&t=4029
Thanks, and have a good day.
Best regards.

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

More
12 years 10 months ago #21217 by goum
Hello,

goum wrote: Hello,
Please, if it wasn't already done, could you also read (in French) :
flexicontent.org/phpbb/viewtopic.php?f=38&t=4027
flexicontent.org/phpbb/viewtopic.php?f=38&t=4028
flexicontent.org/phpbb/viewtopic.php?f=38&t=4029
Thanks, and have a good day.
Best regards.


I've seen them in the last 1.5.6 - RC2 r1046.

It still have the accent trouble.
Please see also the new translation (I've forget some lines in the fr-FR.mod_flexicontent.ini, all my apologies).
Thanks.
Best regards.

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

More
12 years 10 months ago #21218 by ggppdk
mmm, use them to update both versions of FC, i have them ready on disk, but it is not yet on SVN, i will commit them tomorrow

Regards


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

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.983 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline