Amiro.CMS API Reference
Amiro.Ru / Manual
Loading search...

Source for file options.php

Documentation is available at options.php

  • <?php
  • /**
  •  * Setting user defined module options during installation.
  •  *
  •  * If your configuration is inherited from system hypermodule,
  •  * prefix your option names with 'co_' to avoid conflicts with
  •  * system code.
  •  *
  •  * @copyright  Amiro.CMS. All rights reserved.
  •  * @category   Module
  •  * @package    Config_AmiClean_AmiSample
  •  * @version    $Id: options.php 61273 2013-08-07 10:47:54Z Leontiev Anton $
  •  * @since      5.14.4
  •  * @filesource
  •  */
  • // {{}}
  • if($oDeclarator->isRegistered('##modId##')){
  •     $oMod $oDeclarator->getModule('##modId##');
  •  
  •     $oMod->setOption('option_bool'false);
  •     $oMod->setOption('option_uint'0);
  •     $oMod->setOption('option_sint'-5);
  •     $oMod->setOption('option_float'0.01);
  •     $oMod->setOption('option_char''some string');
  •     $oMod->setOption('option_text'"text containing\nline\nbreaks");
  •     $oMod->setOption('option_email''mail.1@domain.com,mail.2@domain.com');
  •     $oMod->setOption('option_enum''second');
  •     $oMod->setOption('option_enum_multi1'array('first''third'));
  •     $oMod->setOption('option_enum_multi2'array());
  •     $oMod->setOption('option_date_period''-1 month');
  •     $oMod->setOption('option_date_period_positive''1 hour');
  •     $oMod->setOption('option_date_period_negative''-1 minute');
  •  
  •     // Supported extensions list
  •     $oMod->setOption('extensions'array('ext_images'));
  •  
  •     /**#@+
  •      * Image extension option.
  •      *
  •      * @since 5.14.6
  •      */
  •  
  •     // Used extension fields
  •     $oMod->setOption('ext_img_fields'array('ext_img''ext_img_popup''ext_img_small'));
  •  
  •     // List column
  •     $oMod->setOption('ext_img_list_col''ext_img_small');
  •  
  •     // Creatable fields
  •     $oMod->setOption('ext_img_creatable'array('ext_img''ext_img_popup''ext_img_small'));
  •  
  •     // Source field to create other fields from
  •     $oMod->setOption('ext_img_source''ext_img_popup');
  •  
  •     // Basic image max width
  •     $oMod->setOption('ext_img_maxwidth'300);
  •  
  •     // Basic image max height
  •     $oMod->setOption('ext_img_maxheight'300);
  •  
  •     // Small image max width
  •     $oMod->setOption('ext_img_small_maxwidth'80);
  •  
  •     // Small image max width
  •     $oMod->setOption('ext_img_small_maxheight'80);
  •  
  •     // Popup image max width
  •     $oMod->setOption('ext_img_popup_maxwidth'800);
  •  
  •     // Popup image max width
  •     $oMod->setOption('ext_img_popup_maxheight'600);
  •  
  •     // Flag allowing to create bigger images than source
  •     $oMod->setOption('ext_img_create_bigger'TRUE);
  •  
  •     // Count of items per page
  •     $oMod->setOption('page_size'10);
  •  
  •     // Sort field of items
  •     $oMod->setOption('front_page_sort_col''nickname');
  •  
  •     // Sort direction of items: 'asc'/'desc'
  •     $oMod->setOption('front_page_sort_dim''desc');
  •  
  •     $oMod->setOption('stop_arg_names'AMI::getProperty('##modId##''stop_arg_names'));
  •  
  •     /**#@-*/
  •  
  •     // Specblocks
  •     $oMod->setOption('spec_small_option''First specblock option');
  •     $oMod->setOption('spec_small_option_custom''Second specblock option');
  •  
  •     // L3 cache disabled
  •     $oMod->setOption('cache_l3_enable'false);
  • }