The
previous solution may cause problems with regard to Output Controls - Limit and Filters > Limit = X
since it is possible that some of those selected X Entries may not have an Icon value, then
the
previous solution would not display those Entries that did not have an Icon, AND therefore it was possible for the module to output less than Limit = X Entries.
For example, if Limit = 10, and ten Entries were selected, BUT two of those ten Entries did not have an Icon value, then only eight (10 - 2) Entries would be displayed.
An alternative solution which acts like a 'Only Select Entries with an Icon' Filter is;
Edit the file
.../modules/mod_sobi2simplefeatured/helper.php
around line 245
after line
$conditions.=' AND (item.'.$db->nameQuote('published').'='.$db->quote('1').' AND item.'.$db->nameQuote('approved').'='.$db->quote('1').' AND (item.'.$db->nameQuote('publish_down').'>'.$db->quote(date('y-m-d h:i:s')).' OR item.'.$db->nameQuote('publish_down').'='.$db->quote('0000-00-00 00:00:00').'))';
add the lines
# My hack to the standard module code to also only select those Entries which have an Icon Value
$conditions.=' AND (item.'.$db->nameQuote('icon').' IS NOT NULL';
This will cause the module to conform to all configurable Entry Selection Criteria, but also only select those Entries that have an Icon Value (jos_sobi2_item.icon IS NOT NULL)
Regards - Mark