To add sitemap to your module you need to add a record to 'sys_objects_site_maps' table and custom class: id - autoincremented id for internal usage object - your unique module name, with vendor prefix, lowercase and spaces are underscored priority - priority, allowed values from 0.0 to 1.0 changefreq - how frequently contents change, allowed values: always, hourly, daily, weekly, monthly, yearly, never class_name - your custom class name class_file - file where your class_name is stored order - order in which this sitemap is generated active - is object active, allowed values 0 or 1 You can refer to BoonEx modules for sample record in this table.
Esempio n. 1
0
 protected function _genChangeFreq($a)
 {
     // calculate the date which is closest to now
     $iDiffMin = PHP_INT_MAX;
     $aDateFields = array('Date', 'EventStart', 'EventEnd');
     foreach ($aDateFields as $sField) {
         $iDiff = abs(time() - $a[$sField]);
         if ($iDiff < $iDiffMin) {
             $iDiffMin = $iDiff;
         }
     }
     if ($iDiffMin != PHP_INT_MAX) {
         $a[$this->_aQueryParts['field_date']] = time() - $iDiffMin;
     }
     return parent::_genChangeFreq($a);
 }
Esempio n. 2
0
 protected function __construct($aSystem)
 {
     parent::__construct($aSystem);
     $this->_aQueryParts = array('fields' => "`ID`, `EntryUri`, `DateTime`", 'field_date' => "DateTime", 'field_date_type' => "timestamp", 'table' => "`bx_ads_main`", 'join' => "", 'where' => "AND `Status` = 'active' AND `AllowView` = '" . BX_DOL_PG_ALL . "'", 'order' => " `DateTime` ASC ");
     $this->_oModule = BxDolModule::getInstance('BxAdsModule');
 }
Esempio n. 3
0
 protected function __construct($aSystem)
 {
     parent::__construct($aSystem);
     $this->_aQueryParts = array('fields' => "`id`, `uri`, `created`", 'field_date' => "created", 'field_date_type' => "timestamp", 'table' => "`bx_groups_main`", 'join' => "", 'where' => "AND `status` = 'approved' AND `allow_view_group_to` = '" . BX_DOL_PG_ALL . "'", 'order' => " `created` ASC ");
     $this->_oModule = BxDolModule::getInstance('BxGroupsModule');
 }
 protected function __construct($aSystem)
 {
     parent::__construct($aSystem);
     $this->_aQueryParts = array('fields' => "`ID`, `Uri`, `Date`, `Owner`", 'field_date' => "Date", 'field_date_type' => "timestamp", 'table' => "`sys_albums`", 'join' => "", 'where' => "AND `Type` = 'bx_videos' AND `Status` = 'active' AND `ObjCount` > 0 AND `AllowAlbumView` = '" . BX_DOL_PG_ALL . "'", 'order' => " `Date` ASC ");
     $this->_oModule = BxDolModule::getInstance('BxVideosModule');
 }
Esempio n. 5
0
 protected function __construct($aSystem)
 {
     parent::__construct($aSystem);
     $this->_aQueryParts = array('fields' => "`id`, `uri`, `date`", 'field_date' => "date", 'field_date_type' => "timestamp", 'table' => "`bx_fdb_entries`", 'join' => "", 'where' => "AND `status` = '" . BX_TD_STATUS_ACTIVE . "'", 'order' => " `date` ASC ");
     $this->_oModule = BxDolModule::getInstance('BxFdbModule');
 }
 protected function __construct($aSystem)
 {
     parent::__construct($aSystem);
     $this->_aQueryParts = array('fields' => "`PostID`, `PostUri`, `PostDate`", 'field_date' => "PostDate", 'field_date_type' => "timestamp", 'table' => "`bx_blogs_posts`", 'join' => "", 'where' => "AND `PostStatus` = 'approval' AND `allowView` = '" . BX_DOL_PG_ALL . "'", 'order' => " `PostDate` ASC ");
     $this->_oModule = BxDolModule::getInstance('BxBlogsModule');
 }
Esempio n. 7
0
 protected function __construct($aSystem)
 {
     parent::__construct($aSystem);
     $this->_aQueryParts = array('fields' => "`id_poll`, `poll_date`", 'field_date' => "poll_date", 'field_date_type' => "timestamp", 'table' => "`bx_poll_data`", 'join' => "", 'where' => "AND `poll_status` = 'active' AND `allow_view_to` = '" . BX_DOL_PG_ALL . "'", 'order' => " `poll_date` ASC ");
     $this->_oModule = BxDolModule::getInstance('BxPollModule');
 }
 protected function __construct($aSystem)
 {
     parent::__construct($aSystem);
     $this->_aQueryParts = array('fields' => "`ID`, `DateLastEdit`", 'field_date' => "DateLastEdit", 'field_date_type' => "datetime", 'table' => "`Profiles`", 'join' => "", 'where' => "AND `Profiles`.`Status` = 'Active' AND `allow_view_to` = '" . BX_DOL_PG_ALL . "' AND (`Profiles`.`Couple` = 0 OR `Profiles`.`Couple` > `Profiles`.`ID`)", 'order' => " `DateLastNav` ASC ");
 }
Esempio n. 9
0
 function __construct()
 {
     $aCustomForm = array('form_attrs' => array('id' => 'sys-adm-sitemap', 'name' => 'sys-adm-sitemap', 'method' => 'post'), 'inputs' => array('sys_sitemap_generated' => array('type' => 'custom', 'content' => mb_strlen(@file_get_contents(BxDolSiteMaps::getSiteMapIndexPath())) > 32 ? '<span class="sys-adm-enabled">' . _t('_Yes') . '</span>' : '<span class="sys-adm-disabled">' . _t('_No') . '</span>', 'caption' => _t('_sys_sitemap_form_caption_sitemap_generated')), 'sys_sitemap_enable' => array('type' => 'checkbox', 'name' => 'sys_sitemap_enable', 'value' => 'on', 'checked' => 'on' == getParam('sys_sitemap_enable') ? true : false, 'caption' => _t('_sys_sitemap_form_caption')), 'Submit' => array('type' => 'submit', 'name' => 'sitemap_enable', 'value' => _t('_Submit'))));
     parent::__construct($aCustomForm);
 }
 protected function __construct($aSystem)
 {
     parent::__construct($aSystem);
     $this->_aQueryParts = array('fields' => "`e`.`ID`, `e`.`Uri`, `e`.`Date`", 'field_date' => "Date", 'field_date_type' => "timestamp", 'table' => "`RayVideoFiles` AS `e`", 'join' => " INNER JOIN `sys_albums_objects` AS `o` ON (`o`.`id_object` = `e`.`ID`)\n                        INNER JOIN `sys_albums` AS `a` ON (`a`.`Type` = 'bx_videos' AND `a`.`Status` = 'active' AND `a`.`AllowAlbumView` = '" . BX_DOL_PG_ALL . "' AND `a`.`ID` = `o`.`id_album`)", 'where' => "AND `e`.`Status` = 'approved'", 'order' => " `e`.`Date` ASC ");
     $this->_oModule = BxDolModule::getInstance('BxVideosModule');
 }
Esempio n. 11
0
 protected function __construct($aSystem, &$oModule)
 {
     parent::__construct($aSystem);
     $this->_oModule = $oModule;
     $this->_aQueryParts = array('fields' => "`id`, `uri`, `when`", 'field_date' => "when", 'field_date_type' => "timestamp", 'table' => "`" . $this->_oModule->_oConfig->getDbPrefix() . "entries`", 'join' => "", 'where' => "AND `status` = '" . BX_TD_STATUS_ACTIVE . "'", 'order' => " `when` ASC ");
 }
 protected function __construct($aSystem)
 {
     parent::__construct($aSystem);
 }
Esempio n. 13
0
 protected function __construct($aSystem)
 {
     parent::__construct($aSystem);
     $this->_aQueryParts = array('fields' => "`id`, `entryUri`, `date`", 'field_date' => "date", 'field_date_type' => "timestamp", 'table' => "`bx_sites_main`", 'join' => "", 'where' => "AND `status` = 'approved' AND `allowView` = '" . BX_DOL_PG_ALL . "'", 'order' => " `date` ASC ");
     $this->_oModule = BxDolModule::getInstance('BxSitesModule');
 }
Esempio n. 14
0
 protected function __construct($aSystem)
 {
     parent::__construct($aSystem);
     $this->_aQueryParts = array('fields' => "`Name`, 0 AS `Date`", 'field_date' => "Date", 'field_date_type' => "timestamp", 'table' => "`sys_page_compose_pages`", 'join' => "", 'where' => "AND `System` = 0", 'order' => " `Order` ASC ");
 }
Esempio n. 15
0
 protected function __construct($aSystem)
 {
     parent::__construct($aSystem);
     $this->_aQueryParts = array('fields' => "`t`.`topic_id`, `t`.`topic_uri`, `t`.`last_post_when`", 'field_date' => "last_post_when", 'field_date_type' => "timestamp", 'table' => "`bx_forum_topic` AS `t`", 'join' => " INNER JOIN `bx_forum` AS `f` ON (`f`.`forum_id` = `t`.`forum_id` AND `f`.`forum_type` = 'public')", 'where' => "AND `t`.`topic_hidden` = 0 AND `t`.`topic_posts` > 0", 'order' => " `t`.`last_post_when` ASC ");
 }