Book Image

Learning Joomla! 1.5 Extension Development

Book Image

Learning Joomla! 1.5 Extension Development

Overview of this book

Table of Contents (17 chapters)
Learning Joomla! 1.5 Extension Development
Credits
About the Author
About the Reviewer
Preface

Registering the module in the database


As with the component, we will have to register the module in the database so that it can be referenced in the backend and used effectively. Entering a record into the jos_modules table will take care of this. Open your database console and enter the following query:

INSERT INTO jos_modules (title, ordering,
position, published, module, showtitle, params)
VALUES ('Restaurant Reviews', 1, 'left', 1,
'mod_reviews', 1, 'layout=default\nitems=3\nrandom=1');

If you're using phpMyAdmin, enter the fields as shown in the following screenshot:

If you refresh the frontend immediately after entering the record in jos_modules, you'll notice that the module doesn't appear, even though the published column is set to 1. To fix this, go to Extensions | Module Manager in the backend and click the Restaurants Reviews link. Under Menu Assignment, select All and then click Save.

In the frontend, the left-hand side of your front page should now look like this:

Even though...