SmartFAQ is developed by The SmartFactory (, a division of InBox Solutions (

How do I make a custom block?
Custom Blocks are created in Blocks Administration found in System Admin -> Blocks.

From here, it is possible to create blocks with one of four types:

Regular HTML code can be put in this block

Regular PHP code can be used in this block as if it was a block in a module. Note that you are in a function scope, when creating this block, so any global variables such as $xoopsUser (User object) and $xoopsDB (Database object) must be declared global before use

Autoformat (Smilies enabled)
Normal Xoops code format with linebreaks and XoopsCode tags such as [img ] and [url ] (without spaces)
Smilies are interpreted and converted to the corresponding image

Autoformat (Smilies disabled)
Similar to the other Autoformat, but smilies are not converted, but will be displayed as e.g. : -) (without spaces)

Please also see This flash tutorial for more details.

The comments are owned by the author. We aren't responsible for their content.

 More info needed

This seems more a description of the custom block area than an answer to the question, "How do I create a custom block?" Posting random text is one thing, but my question is: how do I make a useful block element. I am familiar with HTML and CSS, but don't have a clue about PHP. A practical illustration would be: how do I make a custom block that would display a single forum? Or how do I create a block that would display the title and a teaser of all of the articles in a single category.


 Re: More info needed

Look at the category of this faq - it is supposed to be explaning the administration interface, so this is an entirely appropriate amount of information.

If you are interested in creating custom blocks which use information from modules... your best option would be to look at the php code of the blocks that the module already supplies, adapt that to suit your needs and put your adapted code into a php custom block as outlined in this faq.


 and Javascript?

Can i put Javascript in the blocks? like paypal code or google adsense code, etc?


 Re: and Javascript?

Yes, you can put js directly in the blocks, but be careful how you call it if its remote.

If you are calling a remote .js file make sure you get the path rigt or give a full URL.



Ahh, thanks for your help...
That certinley make things easier!


 Creating blocks

I can't use javascript in Auto-Format neither HTML blocks. I have to use PHP Script instead. Is this right?

Thanks a lot.



Who's Online

226 user(s) are online (2 user(s) are browsing XOOPS FAQ)

Members: 0

Guests: 226



Goal: $100.00
Due Date: Jun 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Did you know ?

You can change dates and time formats in xoops?

Random question

What is Open Source software?