About Joomla mambots

Thursday, 16 February 2006
Article Index

About Joomla mambots

The search mambots
The content mambots
The editor mambots
A few notes

The Content Mambots

The content mambots run when content items are prepared for display in frontend. For example, when an user reads your Terms and Conditions.

 

Before displaying the item introtext or `fulltext`, Joomla executes content mabots in the configured order. The item being processed is passed as a parameter, so that mabot PHP code can read and alter it. Usually you need to place a special mambot code in content introtext or `fulltext`.

 

 

 Let's take a look at the mosimage mambot, so you can understand how it works.

As stated in my other article, the mosimage mambot replaces {_mosimage_} code (which is often referred as {_mosimage_} tag) with the html needed to display your content item images.

 

Let's say you've written an article(content item) with the following text

"Mary had a little lamb {_mosimage_}" 

You  have added "sheep.jpg" using the "Images" tab in backend(Administration) item editor, and saved the content item.

 When you check your frontend Joomla site and access the content item we talked about, the {_mosimage_} code is gone, and the images/stories/sheep.jpg is displayed inline with item text.

This is done by the mosimage mambot, which searches your items for the {_mosimage_}  tags and performs automatic replacement.

Note that all mambots perform on-the-fly modifications. The original item text remains untouched.

Another example is the mosvote mambot. This one adds the rating form to your content items, enabling users to rate your articles. The difference between mosimage and mosvote is that the later does not require special tag in content. It checks if the item rating parameter is set instead.

So, some mambots require the special tags, others require content item parameters set, and there are some which do not require configuration(they run every time the triggering action takes place)

Essentially, the content mambots perform additions or replacements at display time, without changing the stored item text or title. 

 

If you login into administration again, and click on the content item title to edit it, you'll notice nothing has changed. 

Note that you have to type {_mosimage_} without the underscores. I included the underscores to prevent my tutorial words from being parsed by mosimage bot.






Comments (1)
RSS comments

its very simple and easily undersatndable. :)

Write Comment
  • Please keep the topic of messages relevant to the subject of the article.
  • Please don't use comments to plug your web site. Links are rel='nofollow'-ed
  • Please refresh the page if you're having trouble with the security image code
Name:
E-mail
Homepage
Title:
Comment:

:) :grin ;) 8) :p
:roll :eek :upset :zzz :sigh
:? :cry :( :x
Code:* Code

Powered by AkoComment Tweaked Special Edition v.1.4.2

Last Updated ( Thursday, 16 February 2006 )
 

Newsletter

Subscribe to TeachMeJoomla's newsletter
Name:
Email:


Joomla books

Auto tags

content