O'Reilly logo

Joomla! 1.5 JavaScript jQuery by Jose Argudo Blanco

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Showing our data in our module

Now that we have inserted some data into the database, it's the best time to modify our module and enhance it to show this data in our module position.

At the moment, mod_tinynews is only showing the "This is working" message, which obviously is useful for nothing. Let's enhance it. The first file that we are going to modify is modules/mod_tinynews/helper.php, as follows:

<?php
            defined('_JEXEC') or die('Direct Access to this location is not allowed.');
            class ModTinyNewsHelper{
            function getallnews(){ $database =& JFactory::getDBO(); $query = "SELECT * FROM ".$database->nameQuote('#__ tinynews').";"; $database->setQuery($query); $result = $database->loadObjectList(); return $result; }
            }
        

Looks familiar? It's the same ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required