Compago

...free knowledge

 
  • Increase font size
  • Default font size
  • Decrease font size
Home Software Compago software Blank module for Joomla

Blank module for Joomla

Stampa PDF

The Blank Module is a Joomla extension that let you put in a frontpage module everything you want:

  • HTML code
  • Javascript code
  • CSS code
  • PHP code

You can also be able to set the ID,class and style attributes for that module.

It's very easy to use, just put tha code in the text areas and you will be able to do whatever you want to do:

  • Banners
  • Show advertise code, like Google Adsense
  • Google custom search box
  • Statistics code, like StatCounter or Google Analitics
  • Paypal or Donation box
  • Facebook social plugins
  • ...

If you are an advanced user you can also use PHP code to create a module more functional to the website.

A few examples about how to use this blank module in your website:

 

Download:

Blank Module v2.0 for Joomla 1.5/2.5/3.0

 

Blank Module v1.1 for Joomla 2.5
Blank Module v1.1 for Joomla 1.6/1.7
Blank Module v1.1 for Joomla 1.5

Blank Module v1.0 for Joomla 1.7

 

Advanced use

If you are a developper maybe you could be interested to put some PHP code, but if you don't know how is better to read the follow sample instructions.

The first thing is to test if the module is working properly. To do it you can just put this code in the PHP textarea and enable the PHP code with the check box:

echo "Hello world!";

Then if it's working you can try with something more usefull like retrieve one article.
First you need to connect to the joomla database:

$db=& JFactory::getDBO();

After you can set the database query to retrieve what you want, in this case you need access to the "content" table, then the table name will be "#__"+"content" and finally you must specify the ID of the article that you want, that now is number 4:

$db->setQuery('SELECT * FROM `#__content` WHERE `id`= 4 ORDER BY `id`');

Now you can load the results of the query in a array and use it:

$contents = $db->loadObjectList();
if(isset($contents[0]) ){
echo "title is: ".$contents[0]->title."<br/>";
echo "intro text is: ".$contents[0]->introtext."<br/>";
echo "article text is: ".$contents[0]->fulltext."<br/>";
}

In this way you can access to every contents and to every parts of the content, and after you can choose how to show it.

So you can create a news module or a users module, whatever you want! Personally I don't use anymore modules done by others developper, because with this blank module I can do everything by myself.

If you want to have more information please check the Joomla documentation.


Ultimo aggiornamento ( Martedì 10 Dicembre 2013 03:07 )  
Loading

Login




Chiudi