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

Creating the component base

Let's start with the basics, step by step. We are going to work a bit on the frontend of our component. I think it will be easier to start in the frontend part. We are going to create a com_tinynews folder inside our components folder. Inside this folder, create a tinynews.php file with the following content:

<?php
            defined( '_JEXEC' ) or die( 'Restricted access' );
            require_once( JPATH_COMPONENT.DS.'controller.php' );
            $controller = new TinynewsController();
            $controller->execute($task = null);
        

Again, here we are using the _JEXEC constant to check if our file is being called by Joomla!. Then we require the controller.php file, which we haven't created yet.

The JPATH_COMPONENT constant defines the path to our component, ...

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