<a name="Extensions"></a>

Contents

Расширения

В CMSMS расширения функциональности встречаются в виде трех видов:

<a name="Modules"></a>

Модули

Modules are a higher level of plugin into the CMS made simple environment. They are designed to allow developers to implement complex tasks within CMS. A module has an admin interface, and access to an extremely well defined API (Application Programming Interface) Allowing developers to construct extremely intricate or involved functionality within the CMS system.

Modules are called as parameters to the {cms_module} tag (did you catch the irony there?) i.e.: {cms_module module=myModuleName param1="this" param2=5 param3="that"}. It is normal for modules to accept parameters to effect changes to their default behaviour, though it is not always required.

Modules exist as a group of files, inside a similarly named subdirectory, which is in turn underneath the modules directory of a CMS installation. Modules may, or may not have dependencies (require that another module be available for it to complete it's purpose), and may be compatible with only certain versions of the CMS core. In addition, module dependencies may be optional. i.e.: Module B may allow extended functionality if a compatible version of module A is available.

Modules must either be installed by uploading a complete subdirectory, and placing it within the modules directory of your cms installation, or by uploading an XML file via a form in the module administration page.

Some of the modules that exist for CMS today allow frontend user management, user self registration, the ability to display different content to different users, the ability to allow end-user uploads, guestbooks, News, numerous photogallery implementations, 3rd party product integration, etc. The list of available modules grows continually.

<a name="Tags"></a>

Tags

Tags are PHP files uploaded into the plugins directory of the CMS installation, that provide (usually) a single function. The intention of Tags, is that they be relatively small in size, serve a significant purpose, and be easily sharable. Tags are called, similarly to user defined tags simply by their name. i.e: {tagname} Tags can also accept parameters, i.e.: {tagname param1="somevalue"}

Tags have to be written in a certain way to be recognized by the smarty template processing engine. Usually this means naming your tag function.tagname.php and by naming one function within the php file to "function_cms_tagname"

Tags must be installed by uploading a single file to the plugins directory benieth your CMS installation.

Tags do not have administrator interfaces, and usually don't provide forms.

Two examples of tags, are the {print} and {sitemap} tags.

<a name="User_Defined_Tags"></a>

User Defined Tags

User defined tags are snippets of php code, without the <?php and ?> surrounding them, providing the ability to add re-usable pieces of php functionality for your site.

The intention of user defined tags is that they will be relatively small in size, serve small purposes, and usually either be unique to a site, or be specific in purpose. User Defined Tags can be called from within any template or page, simply by their name: i.e: {usertagname} (though it is possible for a user tag to accept parameters).

User defined tags are stored within the CMS database, and are called on an as-needed basis. As well, they do not have an admin interface for adjusting any settings. Usually, they would not be used for writing forms, and for very limited cgi processing.

User defined tags, are usually specific in purpose and aren't that shareable. They are created via a form in the admin interface, and can be shared by copying and pasting code supplied from another user.

User Handbook/Admin Panel/Extensions/ru

From CMSMS

Arvixe - A CMSMS Partner