Archive for January, 2011

Write a simple Joomla 1.6 module from scratch

Create you first Joomla 1.6 module completely from scratch.

Joomla, as of version 1.5 which was a complete rewrite is based on the MVC design pattern which makes creating modules extremely easy and structured. Joomla 1.6 changes a few things, the basics however remain the same.

Create a folder called mod_helloworld in modules
Create a mod_helloworld.php file
Create a mod_helloworld.xml file
Create a helper.php file
Create a template file tmpl/default.php
Discover new modules by going to “Extension Manager” -> “Discover”
The code for mod_helloworld.php

The helper.php file

Include the template file for the default view

The helloworld.xml file

Hello World!
Reinhold Weber
Reinholds simple Hello World module.


Create both index.html files to prevent direct directory browsing


Leave a Comment

Fix for TinyMCE Editor strips Flash embed code in Joomla

Fix for TinyMCE Editor strips Flash embed code in Joomla

It has been a big misery for all those wanted to retain the inserted flash files (SWF) in an article in joomla. Several questions were asked why the tinyMCE editor strips the “Object” and “embed” tags once we “save/Apply” after editing the article with flash objects. There is an answer for this.


If an article with flash object is opened for editing, while saving the editor removes the flash embed code from the article. The result is the automatic removal of “Object” and “Embed” tags from the code.
The users affected:
All the users other than Super Administrator are affected by this problem.

There is a solutions for this. Before we see a solution, we need to be aware of the reason behind it. It will help us to resolve other similar problems later.
The Reason:
This is caused by the inbuilt security measures in joomla. There is a filtering mechanism that plays behind the scene while saving the articles. To protect the joomla website, from attackers, by preventing the users with edit access to insert malicious codes into the articles. This filtering rules will be applied just before an article is saved after the change.
All the users other than super administrator will have a “blacklist” filtering “ON” by default. This is to protect the article from the attackers. The default filter method in Joomla! is ‘Black List‘.
The following tags are listed in the “Blacklsit”:
‘applet’, ‘body’, ‘bgsound’, ‘base’, ‘basefont’, ‘embed’, ‘frame’, ‘frameset’, ‘head’, ‘html’, ‘id’, ‘iframe’, ‘ilayer’, ‘layer’, ‘link’, ‘meta’, ‘name’, ‘object’, ’script’, ’style’, ‘title’, ‘xml’
The following attributes are listed in the “Blacklsit”:
‘action’, ‘background’, ‘codebase’, ‘dynsrc’, ‘lowsrc’
The “Blacklist” filter will automatically trim all the tags and attributes specified in the above items. Now, the fix is easy, just remove this “blacklisted tags” for all users whom we want to allow these tags.

Go to Content >> Article Manager >> click on the parameters
On the pop-up >> Go to “Filter groups”. Then select the users you want to apply this filtering rule and then select “Filter type ” into “Blacklist (Default) ”. Then save it.
NOTE: All those user groups whom you want to give permission to allow those blacklisted tags and attributes should be excluded from the selection. Eg: if you want to allow all the Public Back-end users, just select all the “Public Front-end” users then apply “filter Type” “Blacklist (Default)” . All the unselected users will be exempted from the filter check.
If you need any further assistance on this regard, Please discuss it in the forum. . Your comments are highly encouraged.

Tags: embed swf files in joomla. object tag problem in joomla article editor, fix flash embed problem in joomla, How to get TinyMCE to accept the tag, joomla article editor strips flash code on save, joomla embed flash files issues, Multimedia embed button on TinyMCE, TinyMCE Not Inserting Flash Files

Comments (1)