Suggestion: mod_flexicontent empty

More
11 years 7 months ago #36240 by zouz747
Hello,
If we don't want to show an empty module, we need to be returned an empty string. Sounds basic but in current coding the getlist function is called after show decision is taken, which incurs an empty div being returned (news).
If we go for a PHP rule, we'll need to write these lines from the module in order to catch the empty list (not sure all needed):
Code:
global $modfc_jprof; jimport( 'joomla.error.profiler' ); $modfc_jprof = new JProfiler(); $modfc_jprof->mark('START: FLEXIcontent Module'); global $mod_fc_run_times; $mod_fc_run_times = array(); // Logging Info variables global $fc_content_plg_microtime; $fc_content_plg_microtime = 0; // load english language file for 'mod_flexicontent' module then override with current language file JFactory::getLanguage()->load('mod_flexicontent', JPATH_SITE, 'en-GB', true); JFactory::getLanguage()->load('mod_flexicontent', JPATH_SITE, null, true); // initialize various variables global $globalcats; $document = JFactory::getDocument(); $config = JFactory::getConfig(); $caching = $config->getValue('config.caching', 0); // include the helper only once require_once (dirname(__FILE__).DS.'helper.php'); // Verify parameters (like forced menu item id and comments showing) modFlexicontentHelper::verifyParams( $params ); $zouz=modFlexicontentHelper::getList($params); if(empty($zouz))return false;

Or, we could test on $list[$ord] and $list[$ord] before writing down any html in the template (news).
Waddaya think?

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

More
11 years 7 months ago #36245 by ggppdk
Hello
yes you are right and
thanks for pointing this out,
will update the templates and or the helper file

I think at some point in the past we have noticed it
just it will need just a little more tests because the module displays more than just items, it also displays category lists and recently added favourites (to display existing favourites and favourites added by user during current session specially) and possible more

We openned issue no 559 as defect, will examine soon

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
11 years 7 months ago #36306 by zouz747
Hello,
same goes for flexitagcould. Catch the list before determine to show.
rgds

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

More
11 years 7 months ago #36313 by ggppdk
Hello,
thanks for pointing it out.
I added a note for tags cloud module to the existing enhancement issue in our bug tracker


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