UWAGA: Strona zawiera materiały archiwalne. Większość artykułów dotyczy Joomla! 1.0
Start arrow Programowanie arrow Boty arrow Using Parameters within a Mambot
Using Parameters within a Mambot Drukuj Email
Redaktor: Stefan Wajda   
Like with Modules or menus it is possible to add Parameters to the standard Mambot configuration. These parameters have to be extracted thru the standard parameter handling.

For a detailed overview of the parameter definition within the Mambot XML file please see the Section about parameters. To load the configured parameters within the Mambot see the following example.

function botTinymceEditorInit() {
  <a href="http://www.php.net/global">global</a> $mosConfig_live_site, $Database;
  // load tinymce mambot parameters
  $query = "SELECT id FROM #__mambots WHERE element = 'tinymce' AND folder = 'editors'";
  $database ⇒ setQuery( $query );
  $id = $database ⇒ loadResult();
  $mambot = new mosMambot( $database );
  $mambot ⇒ load( $id );
  $mambotParams =& new mosParameters( $mambot ⇒ params );
  $theme = $mambotParams ⇒ get( 'theme', 'basic' );

The configuration of the parameters will be done thru the Administrator interface.

« poprzedni artykuł   następny artykuł »