[SOLVED]Custom Fields & Filters

More
12 years 7 months ago - 12 years 7 months ago #19334 by scorpion_pt
When can we expect "Custom fields" working with filters again?
This feature will make our work a lot easier if we can use custom filters with plugins like - Select Items & Reverse ( www.flexicontent.org/forum/index ... =viewtopic ).

Bug tracker issue: code.google.com/p/flexicontent/i ... akechanges

Tx for the good work ;)
Last edit: 12 years 7 months ago by scorpion_pt.

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

More
12 years 7 months ago #19336 by micker
for witch version of flexicontent ?

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 7 months ago #19338 by scorpion_pt
1.5.6 beta1 (r915)

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

More
12 years 7 months ago #19340 by ggppdk
The problem is that the value of the field must be calculated (execute plugin code which may trigger plugins etc), so imagine calculating the value of the field for all items ... , how do you make a custom field like google maps field filterable? I will examine if more type of fields can be made filters.

Tell me which type of field you are you thinking of?


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 7 months ago #19342 by yopyop001
Hi,

Can you made a try for me :

In the Flexicontent global configuration, add
'selectflexiitem' in the filterable fields

So you will have :
Code:
createdby,modifiedby,type,state,tags,checkbox,checkboximage,radio,radioimage,select,selectmultiple,selectflexiitem

And change the function onDiplayFilter in plugins/flexicontent_fields/selectflexiitem.php
By :
Code:
function onDisplayFilter(&$filter, $value='') { // execute the code only if the field type match the plugin type if($filter->field_type != 'selectflexiitem') return; // some parameter shortcuts $db =& JFactory::getDBO(); $field_elements= 'SELECT DISTINCT id as value, title as text' .' FROM #__content as i' .' LEFT JOIN #__flexicontent_fields_item_relations as fir ON i.id=fir.value' .' WHERE fir.field_id='.$filter->id ; $query = preg_match('#^select#i', $field_elements) ? $field_elements : ''; $db->setQuery($query); $results = $db->loadObjectList(); if (!$results) { $filter->html = ''; } else { $options = array(); $options[] = JHTML::_('select.option', '', '-'.JText::_('All').'-'); foreach($results as $result) { $options[] = JHTML::_('select.option', $result->value, $result->text); } $filter->html = JHTML::_('select.genericlist', $options, 'filter_'.$filter->id, 'onchange="document.getElementById(\'adminForm\').submit();"', 'value', 'text', $value); } }

If it's work i will make an update of the plugin.

Regards

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

More
12 years 7 months ago #19343 by ggppdk
Yes of course will do,

any other TYPE of plugins, that can be made filterable (i will check them myself , just did not do yet, but i can miss something) ?


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