About Joomla mambots |
Thursday, 16 February 2006 | ||||||||||
Page 3 of 5 The Content MambotsThe 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.
its very simple and easily undersatndable. Write Comment Powered by AkoComment Tweaked Special Edition v.1.4.2 |
||||||||||
Last Updated ( Thursday, 16 February 2006 ) |
Newsletter
Joomla books
Auto tags
content