HomeHelpTrac

Changeset 15386 for trunk/modules


Ignore:
Timestamp:
07/27/11 00:08:18 (10 months ago)
Author:
Alexander Trofimov
Message:

Ticket #2565

Location:
trunk/modules/boonex
Files:
1 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/boonex/map_profiles/install/langs/en.php

    r15211 r15386  
    5959    '_bx_map_%d_members' => '%d members', 
    6060    '_bx_map_unknown_city' => 'Unknown', 
     61    '_bx_map_location' => 'Location', 
    6162); 
    6263 
  • trunk/modules/boonex/map_profiles/install/sql/install.sql

    r14515 r15386  
    190190('map_profiles', 'view_location', '_bx_map_privacy_view_location', '3'); 
    191191 
     192-- mobile 
     193 
     194SET @iMaxOrderHomepage = (SELECT MAX(`order`)+1 FROM `sys_menu_mobile` WHERE `menu` = 'homepage'); 
     195SET @iMaxOrderProfile = (SELECT MAX(`order`)+1 FROM `sys_menu_mobile` WHERE `menu` = 'profile'); 
     196INSERT INTO `sys_menu_mobile` (`type`, `menu`, `title`, `icon`, `action`, `action_data`, `eval_bubble`, `eval_hidden`, `order`, `active`) VALUES 
     197('bx_map', 'homepage', '_bx_map_location', 'home_location.png', 2, '', '', '', @iMaxOrderHomepage, 1), 
     198('bx_map', 'profile', '_bx_map_location', '', 2, '', '', '', @iMaxOrderProfile, 1); 
     199 
  • trunk/modules/boonex/map_profiles/install/sql/uninstall.sql

    r11776 r15386  
    3838-- privacy 
    3939DELETE FROM `sys_privacy_actions` WHERE `module_uri` = 'map_profiles'; 
     40 
     41-- mobile 
     42 
     43DELETE FROM `sys_menu_mobile` WHERE `type` = 'bx_map'; 
     44 
  • trunk/modules/boonex/news/classes/BxNewsModule.php

    r15211 r15386  
    162162 
    163163    /** 
     164     * View list of latest news from mobile app 
     165     */ 
     166    function actionMobileLatestNews() { 
     167 
     168        bx_import('BxDolMobileTemplate'); 
     169        $oMobileTemplate = new BxDolMobileTemplate($this->_oConfig, $this->_oDb); 
     170        $oMobileTemplate->pageStart(); 
     171 
     172        $sCaption = _t('_news_bcaption_latest'); 
     173 
     174        $aEntries = $this->_oDb->getEntries(array( 
     175            'sample_type' => 'all', 
     176            'sample_params' => '', 
     177            'viewer_type' => $this->_oTextData->getViewerType(),  
     178            'start' => 0,  
     179            'count' => 10, 
     180            'filter_value' => '', 
     181        )); 
     182 
     183        if (empty($aEntries)) { 
     184            $oMobileTemplate->displayNoData($sCaption); 
     185            return; 
     186        } 
     187 
     188        foreach ($aEntries as $aEntry) { 
     189            $aVars = array ( 
     190                'content' => '<h2>' . $aEntry['caption'] . '</h2>' . getLocaleDate($aEntry['when_uts'], BX_DOL_LOCALE_DATE), 
     191                'url' => bx_js_string(BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'mobile_entry/' . $aEntry['id']), 
     192            ); 
     193            echo $oMobileTemplate->parseHtmlByName('mobile_row.html', $aVars);  
     194        } 
     195 
     196        $oMobileTemplate->pageCode($sCaption, false); 
     197    } 
     198 
     199    /** 
     200     * News entry view from mobile app 
     201     */ 
     202    function actionMobileEntry($iId) { 
     203         
     204        bx_import('BxDolMobileTemplate'); 
     205        $oMobileTemplate = new BxDolMobileTemplate($this->_oConfig, $this->_oDb); 
     206        $oMobileTemplate->pageStart(); 
     207 
     208        $aParams = array( 
     209            'sample_type' => 'id',  
     210            'id' => (int)$iId, 
     211        ); 
     212        $aEntry = $this->_oDb->getEntries($aParams); 
     213 
     214        if (empty($aEntry)) { 
     215            $oMobileTemplate->displayPageNotFound(); 
     216            return; 
     217        } 
     218     
     219        echo '<h1>' . $aEntry['caption'] . '</h1>'; 
     220        echo getLocaleDate($aEntry['when_uts'], BX_DOL_LOCALE_DATE); 
     221        echo $aEntry['content']; 
     222 
     223        $oMobileTemplate->pageCode($aEntry['caption']); 
     224    } 
     225 
     226    /** 
    164227     * Private methods. 
    165228     */ 
  • trunk/modules/boonex/news/install/sql/install.sql

    r14107 r15386  
    201201INSERT INTO `sys_cron_jobs` (`name`, `time`, `class`, `file`, `eval`) VALUES 
    202202('bx_news', '*/5 * * * *', 'BxNewsCron', 'modules/boonex/news/classes/BxNewsCron.php', ''); 
     203 
     204-- mobile 
     205 
     206SET @iMaxOrderHomepage = (SELECT MAX(`order`)+1 FROM `sys_menu_mobile` WHERE `menu` = 'homepage'); 
     207INSERT INTO `sys_menu_mobile` (`type`, `menu`, `title`, `icon`, `action`, `action_data`, `eval_bubble`, `eval_hidden`, `order`, `active`) VALUES 
     208('bx_news', 'homepage', '_news_bcaption_view_main', '{site_url}modules/boonex/news/templates/base/images/icons/mobile_icon.png', 100, '{site_url}modules/?r=news/mobile_latest_news/', '', '', @iMaxOrderHomepage, 0); 
     209 
  • trunk/modules/boonex/news/install/sql/uninstall.sql

    r14001 r15386  
    3838 
    3939DELETE FROM `sys_cron_jobs` WHERE `name`='bx_news'; 
     40 
     41-- mobile 
     42 
     43DELETE FROM `sys_menu_mobile` WHERE `type` = 'bx_news'; 
     44 
  • trunk/modules/boonex/photos/install/sql/install.sql

    r14991 r15386  
    284284SET @iHandler := LAST_INSERT_ID(); 
    285285INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES ('profile', 'delete', @iHandler); 
     286 
     287-- mobile 
     288 
     289SET @iMaxOrderHomepage = (SELECT MAX(`order`)+1 FROM `sys_menu_mobile` WHERE `menu` = 'homepage'); 
     290SET @iMaxOrderProfile = (SELECT MAX(`order`)+1 FROM `sys_menu_mobile` WHERE `menu` = 'profile'); 
     291INSERT INTO `sys_menu_mobile` (`type`, `menu`, `title`, `icon`, `action`, `action_data`, `eval_bubble`, `eval_hidden`, `order`, `active`) VALUES 
     292('[db_prefix]', 'homepage', '_bx_photos', 'home_images.png', 7, '', '', '', @iMaxOrderHomepage, 1), 
     293('[db_prefix]', 'profile', '_bx_photos', '', 7, '', 'return BxDolXMLRPCMedia::_getMediaCount(''photo'', ''{profile_id}'', ''{member_id}'');', '', @iMaxOrderProfile, 1); 
     294 
  • trunk/modules/boonex/photos/install/sql/uninstall.sql

    r12381 r15386  
    6262DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler; 
    6363DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler; 
     64 
     65-- mobile 
     66 
     67DELETE FROM `sys_menu_mobile` WHERE `type` = '[db_prefix]'; 
     68 
  • trunk/modules/boonex/sounds/install/sql/install.sql

    r14991 r15386  
    248248SET @iHandler := LAST_INSERT_ID(); 
    249249INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES ('profile', 'delete', @iHandler); 
     250 
     251-- mobile 
     252 
     253SET @iMaxOrderHomepage = (SELECT MAX(`order`)+1 FROM `sys_menu_mobile` WHERE `menu` = 'homepage'); 
     254SET @iMaxOrderProfile = (SELECT MAX(`order`)+1 FROM `sys_menu_mobile` WHERE `menu` = 'profile'); 
     255INSERT INTO `sys_menu_mobile` (`type`, `menu`, `title`, `icon`, `action`, `action_data`, `eval_bubble`, `eval_hidden`, `order`, `active`) VALUES 
     256('[db_prefix]', 'homepage', '_bx_sounds', 'home_sounds.png', 9, '', '', '', @iMaxOrderHomepage, 1), 
     257('[db_prefix]', 'profile', '_bx_sounds', '', 9, '', 'return BxDolXMLRPCMedia::_getMediaCount(''music'', ''{profile_id}'', ''{member_id}'')', '', @iMaxOrderProfile, 1); 
     258 
  • trunk/modules/boonex/sounds/install/sql/uninstall.sql

    r12381 r15386  
    6363DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler; 
    6464DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler; 
     65 
     66-- mobile 
     67 
     68DELETE FROM `sys_menu_mobile` WHERE `type` = '[db_prefix]'; 
     69 
  • trunk/modules/boonex/videos/install/sql/install.sql

    r14991 r15386  
    251251SET @iHandler := LAST_INSERT_ID(); 
    252252INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES ('profile', 'delete', @iHandler); 
     253 
     254-- mobile 
     255 
     256SET @iMaxOrderHomepage = (SELECT MAX(`order`)+1 FROM `sys_menu_mobile` WHERE `menu` = 'homepage'); 
     257SET @iMaxOrderProfile = (SELECT MAX(`order`)+1 FROM `sys_menu_mobile` WHERE `menu` = 'profile'); 
     258INSERT INTO `sys_menu_mobile` (`type`, `menu`, `title`, `icon`, `action`, `action_data`, `eval_bubble`, `eval_hidden`, `order`, `active`) VALUES 
     259('[db_prefix]', 'homepage', '_bx_videos', 'home_videos.png', 8, '', '', '',  @iMaxOrderHomepage, 1), 
     260('[db_prefix]', 'profile', '_bx_videos', '', 8, '', 'return BxDolXMLRPCMedia::_getMediaCount(''video'', ''{profile_id}'', ''{member_id}'')', '', @iMaxOrderProfile, 1); 
     261 
  • trunk/modules/boonex/videos/install/sql/uninstall.sql

    r12381 r15386  
    6363DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler; 
    6464DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler; 
     65 
     66 
     67-- mobile 
     68 
     69DELETE FROM `sys_menu_mobile` WHERE `type` = '[db_prefix]'; 
     70 
Note: See TracChangeset for help on using the changeset viewer.