• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

List of Lists Module

marcelf

Member
Hi all,

I don't know if someone already had this need, but I think could be useful if we have a List of Lists Module. Basically, this module could be like an article module, showing the recent or more popular lists and giving access to them. I need put this in the home page of my portal.

Is there something like this OR must be developed?

Thanks,
Marcel
 
You could do that pretty easily with some custom code (using Sourcerer) in a normal J! custom module ...

Code:
[source]
<?php
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('id, label')->from('#__fabrik_lists')->order('hits DESC')->setLimit(10,0);
$db->setQuery($query);
$lists = $db->loadObjectList();
$html = array();
foreach ($lists as $list) {
   $html[] =  '<a href="' . JRoute::_('index.php?option=com_fabrik&view=list&listid=' . $list->id) . '">' . $list->label . '</a>';
}
echo implode('<br />', $html);
?>
[/source]

You could vary the query, like order by label instead of hits, change the setLimit (number to show), etc. And change the formatting - I'm just shoing doing a simple linebreak separated list, you could format it as a table, or an ordered list (ul) etc.

-- hugh
 
I know, right? :)

I'd completely forgotten about that till I was looking at this thread, and the 'popular' part, and remembered seeing that column in the fabrik_lists table. It just counts the number of times a list has been viewed. Note that means how many times the list itself has been viewed, not how many times a row has been viewed from the list. It uses a built in J! method for tables, $table->hit(), that just increments a 'hit' field if it exists, usually called from the view for that table. The 'article' view uses it in J!.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top