Joomla Interview


IT-World

joomla-cms-content-management-system-seo-guide-redirects-canonicals
1. Joomla is released under which license?

Joomla is released under the Gnu General Public License 2 (GPL).

2. What are mambots? 

Mambots are small codes or mini-programs, which when given, either activate a program, script or conduct a function on a database. For example, there are mambots WYSIWYG editors. There are mambots for several other specific taks like this.

3. What are plug-ins?   

In the new version of Joomla 1.5, mambots are called plug-ins. In some 3rd party components, mambots and modules themselves have plug-ins. Hence, plug-ins can be given the same definition as a mambot, that they are small codes or mini-programs, which when given, activate a program or script or conduct a function on the database.

4. What are modules?  

Modules are small content items that extend the functionality in Joomla. They allow the user to place them anywhere that the template allows it, through the…

View original post 1,112 more words

Advertisements

Inserting WordPress shortcode in a template/theme


Shortcode API is introduced in WordPress 2.5, it is a simple set of functions for creating macro codes for use in post content. For instance, the following shortcode (in the post/page content) would add a photo gallery or a form or anything into the page:

[shortcode]

It enables plugin developers to create special kinds of content (e.g. forms, content generators) that users can attach to certain pages by adding the corresponding shortcode into the page text.

The Shortcode API makes it easy to create shortcodes that support attributes like this:

[shortcode id="123" size="medium"]

The API handles all the tricky parsing, eliminating the need for writing a custom regular expression for each shortcode. Helper functions are included for setting and fetching default attributes. The API supports both self-closing and enclosing shortcodes.

But what should we do when we have to call the shortcode direct into the files of our template/theme ?

<?php echo do_shortcode('[shortcode]'); ?>

and if we want to add attributes to the shortcode then, write

<?php echo do_shortcode('[shortcode option1="value1" option2="value2"]'); ?>