Changeset 11064


Ignore:
Timestamp:
Jun 26, 2009, 10:17:58 AM (16 years ago)
Author:
Alexander Trofimov
Message:

Events title zone actions

Location:
trunk/modules/boonex/events
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/modules/boonex/events/classes/BxEventsModule.php

    r11053 r11064  
    310310        ); 
    311311 
    312         if (!($aForum = $this->_oDb->getForumById ($iForumId))) 
     312        if (!($aForum = $this->_oDb->getForumById ($iForumId))) {             
    313313            return $aFalse; 
    314  
    315         if (!($aDataEntry = $this->_oDb->getEntryByIdAndOwner ($aForum['event_id'], 0, true))) 
     314        } 
     315 
     316        if (!($aDataEntry = $this->_oDb->getEntryByIdAndOwner ($aForum['entry_id'], 0, true))) { 
    316317            return $aFalse; 
     318        } 
    317319 
    318320        $aTrue = array ( 
     
    321323            'post' => $this->isAllowedPostInForum ($aDataEntry, $iMemberId) ? 1 : 0, 
    322324        ); 
    323  
    324325        return $aTrue; 
    325326    } 
  • TabularUnified trunk/modules/boonex/events/classes/BxEventsPageMy.php

    r11045 r11064  
    116116 
    117117    function getBlockCode_Manage() { 
    118         $sForm = $this->_oMain->_manageEvents ('user', $this->_aProfile['NickName'], false, 'bx_events_my_active', array( 
     118        $sForm = $this->_oMain->_manageEntries ('user', $this->_aProfile['NickName'], false, 'bx_events_my_active', array( 
    119119                'action_delete' => '_bx_events_admin_delete', 
    120120        ), 'bx_events_my_active', 7);  
     
    124124 
    125125    function getBlockCode_Pending() { 
    126         $sForm = $this->_oMain->_manageEvents ('my_pending', '', false, 'bx_events_my_pending', array( 
     126        $sForm = $this->_oMain->_manageEntries ('my_pending', '', false, 'bx_events_my_pending', array( 
    127127                'action_delete' => '_bx_events_admin_delete', 
    128128        ), 'bx_events_my_pending', 7);  
  • TabularUnified trunk/modules/boonex/events/classes/BxEventsPageView.php

    r11053 r11064  
    2424class BxEventsPageView extends BxDolTwigPageView {   
    2525 
    26     var $oEventsMain; 
    27     var $_oDb; 
    28     var $aDataEntry; 
    29  
    3026    function BxEventsPageView(&$oEventsMain, &$aEvent) { 
    31         parent::BxDolTwigPageView('bx_events_view', $oEventsMain->_oTemplate); 
    32         $this->oEventsMain = &$oEventsMain; 
    33         $this->_oDb = $oEventsMain->_oDb; 
    34         $this->aDataEntry = &$aEvent;        
     27        parent::BxDolTwigPageView('bx_events_view', $oEventsMain, $aEvent); 
    3528    } 
    3629         
     
    6457        $o = new BxEventsVoting ('bx_events', (int)$this->aDataEntry['ID']); 
    6558        if (!$o->isEnabled()) return ''; 
    66         return $o->getBigVoting ($this->oEventsMain->isAllowedRate($this->aDataEntry)); 
     59        return $o->getBigVoting ($this->_oMain->isAllowedRate($this->aDataEntry)); 
    6760    }         
    6861 
     
    7871        global $oFunctions; 
    7972 
    80         if ($this->oEventsMain->_iProfileId || $this->oEventsMain->isAdmin()) { 
     73        if ($this->_oMain->_iProfileId || $this->_oMain->isAdmin()) { 
    8174 
    82             $this->aInfo['BaseUri']     = $this->oEventsMain->_oConfig->getBaseUri(); 
    83             $this->aInfo['iViewer']     = $this->oEventsMain->_iProfileId; 
     75            $this->aInfo['BaseUri']     = $this->_oMain->_oConfig->getBaseUri(); 
     76            $this->aInfo['iViewer']     = $this->_oMain->_iProfileId; 
    8477            $this->aInfo['ownerID']     = (int)$this->aDataEntry['ResponsibleID']; 
    8578            $this->aInfo['ID']          = (int)$this->aDataEntry['ID']; 
    8679            $this->aInfo['URI']         = (int)$this->aDataEntry['EntryUri']; 
    87             $this->aInfo['TitleEdit']   = $this->oEventsMain->isAllowedEdit($this->aDataEntry) ? _t('_bx_events_action_title_edit') : ''; 
    88             $this->aInfo['TitleDelete'] = $this->oEventsMain->isAllowedDelete($this->aDataEntry) ? _t('_bx_events_action_title_delete') : ''; 
    89             $this->aInfo['TitleJoin']   = $this->oEventsMain->isAllowedJoin($this->aDataEntry) ? _t('_bx_events_action_title_join') : ''; 
    90             $this->aInfo['TitleInvite'] = $this->oEventsMain->isAllowedSendInvitation($this->aDataEntry) ? _t('_bx_events_action_title_invite') : ''; 
    91             $this->aInfo['TitleShare']  = $this->oEventsMain->isAllowedShareEvent($this->aDataEntry) ? _t('_bx_events_action_title_share') : ''; 
    92             $this->aInfo['TitleBroadcast'] = $this->oEventsMain->isAllowedBroadcast($this->aDataEntry) ? _t('_bx_events_action_title_broadcast') : ''; 
    93             $this->aInfo['AddToFeatured']  = $this->oEventsMain->isAllowedMarkAsFeatured($this->aDataEntry) ? ($this->aDataEntry['Featured'] ? _t('_bx_events_action_remove_from_featured') : _t('_bx_events_action_add_to_featured')) : ''; 
     80            $this->aInfo['TitleEdit']   = $this->_oMain->isAllowedEdit($this->aDataEntry) ? _t('_bx_events_action_title_edit') : ''; 
     81            $this->aInfo['TitleDelete'] = $this->_oMain->isAllowedDelete($this->aDataEntry) ? _t('_bx_events_action_title_delete') : ''; 
     82            $this->aInfo['TitleJoin']   = $this->_oMain->isAllowedJoin($this->aDataEntry) ? _t('_bx_events_action_title_join') : ''; 
     83            $this->aInfo['TitleInvite'] = $this->_oMain->isAllowedSendInvitation($this->aDataEntry) ? _t('_bx_events_action_title_invite') : ''; 
     84            $this->aInfo['TitleShare']  = $this->_oMain->isAllowedShareEvent($this->aDataEntry) ? _t('_bx_events_action_title_share') : ''; 
     85            $this->aInfo['TitleBroadcast'] = $this->_oMain->isAllowedBroadcast($this->aDataEntry) ? _t('_bx_events_action_title_broadcast') : ''; 
     86            $this->aInfo['AddToFeatured']  = $this->_oMain->isAllowedMarkAsFeatured($this->aDataEntry) ? ($this->aDataEntry['Featured'] ? _t('_bx_events_action_remove_from_featured') : _t('_bx_events_action_add_to_featured')) : ''; 
    9487 
    9588            if (!$this->aInfo['TitleEdit'] && !$this->aInfo['TitleDelete'] && !$this->aInfo['TitleJoin'] && !$this->aInfo['TitleInvite'] && !$this->aInfo['TitleShare'] && !$this->aInfo['AddToFeatured'] && !$this->aInfo['TitleBroadcast'])  
     
    10497    function getBlockCode_Participants() { 
    10598 
    106         if (!$this->oEventsMain->isAllowedViewParticipants($this->aDataEntry)) return ''; 
     99        if (!$this->_oMain->isAllowedViewParticipants($this->aDataEntry)) return ''; 
    107100 
    108101        $iMaxNum = $this->_oDb->getParam('bx_events_perpage_participants'); 
     
    113106 
    114107        $aProfiles = array (); 
    115         $iNum = $this->oEventsMain->_oDb->getParticipants($aProfiles, $this->aDataEntry['ID'], $iStart, $iMaxNum); 
     108        $iNum = $this->_oMain->_oDb->getParticipants($aProfiles, $this->aDataEntry['ID'], $iStart, $iMaxNum); 
    116109        if (!$iNum || !$aProfiles) 
    117110            return MsgBox(_t("_Empty")); 
     
    128121        $aDBBottomMenu = array(); 
    129122        if ($iPages > 1) { 
    130             $sUrlStart = BX_DOL_URL_ROOT . $this->oEventsMain->_oConfig->getBaseUri() . "view/".$this->aDataEntry['EntryUri']; 
     123            $sUrlStart = BX_DOL_URL_ROOT . $this->_oMain->_oConfig->getBaseUri() . "view/".$this->aDataEntry['EntryUri']; 
    131124            $sUrlStart .= (false === strpos($sUrlStart, '?') ? '?' : '&');             
    132125            if ($iPage > 1) 
  • TabularUnified trunk/modules/boonex/events/classes/BxEventsTemplate.php

    r10911 r11064  
    3333        parent::BxDolTwigTemplate($oConfig); 
    3434        $this->_iPageIndex = 300;   
     35        $aVars = array ('BaseUri' => $oConfig->getBaseUri()); 
     36        $GLOBALS['oTopMenu']->setCustomSubActions($aVars, 'bx_events_title', false); 
    3537    } 
    3638 
  • TabularUnified trunk/modules/boonex/events/install/langs/en.php

    r11045 r11064  
    2828    '_bx_events_action_remove_from_featured' => 'Remove From Featured', 
    2929    '_bx_events_action_add_to_featured' => 'Add To Featured', 
     30    '_bx_events_action_create_event' => 'Create Event', 
     31    '_bx_events_action_my_events' => 'My Events', 
    3032    '_bx_events_action_title_delete' => 'Delete', 
    3133    '_bx_events_action_title_edit' => 'Edit', 
     
    3335    '_bx_events_action_title_join' => 'Join', 
    3436    '_bx_events_action_title_share' => 'Share', 
    35     '_bx_events_action_title_broadcast' => 'Broadcast', 
     37    '_bx_events_action_title_broadcast' => 'Broadcast',     
    3638    '_bx_events_add_new_event_admin' => 'Create Event', 
    3739    '_bx_events_user_unknown' => 'Unknown', 
  • TabularUnified trunk/modules/boonex/events/install/sql/install.sql

    r11053 r11064  
    252252    ('bx_events_view', '960px', 'Event''s sounds block', '_bx_events_block_sounds', '2', '3', 'Sounds', '', '1', '71', 'non,memb', '0'), 
    253253    ('bx_events_view', '960px', 'Event''s files block', '_bx_events_block_files', '2', '4', 'Files', '', '1', '71', 'non,memb', '0'), 
    254     ('bx_events_view', '960px', 'Event''s comments block', '_bx_events_block_comments', '2', '5', 'Comments', '', '1', '71', 'non,memb', '0'), 
     254    ('bx_events_view', '960px', 'Event''s comments block', '_bx_events_block_comments', '2', '5', 'Comments', '', '1', '71', 'non,memb', '0'),     
    255255 
    256256    ('bx_events_main', '960px', 'Upcoming Events Photo', '_bx_events_block_upcoming_photo', '2', '0', 'UpcomingPhoto', '', '1', '71', 'non,memb', '0'), 
     
    322322    ('{TitleShare}', 'modules/boonex/events/|action_share.png', '', 'showPopupAnyHtml (''{BaseUri}share_popup/{ID}'');', '', '4', 'bx_events'), 
    323323    ('{TitleBroadcast}', 'modules/boonex/events/|action_broadcast.png', '{BaseUri}broadcast/{ID}', '', '', '5', 'bx_events'), 
    324     ('{AddToFeatured}', 'modules/boonex/events/|calendar_add.png', '', 'getHtmlData( ''ajaxy_popup_result_div_{ID}'', ''{evalResult}'');return false;', '$oConfig = $GLOBALS[''oBxEventsModule'']->_oConfig; return BX_DOL_URL_ROOT . $oConfig->getBaseUri() . ''mark_featured/{ID}'';', 6, 'bx_events'); 
     324    ('{AddToFeatured}', 'modules/boonex/events/|calendar_add.png', '', 'getHtmlData( ''ajaxy_popup_result_div_{ID}'', ''{evalResult}'');return false;', '$oConfig = $GLOBALS[''oBxEventsModule'']->_oConfig; return BX_DOL_URL_ROOT . $oConfig->getBaseUri() . ''mark_featured/{ID}'';', 6, 'bx_events'), 
     325    ('{evalResult}', 'modules/boonex/events/|calendar_add.png', '{BaseUri}browse/my?bx_events_filter=add_event', '', 'return $GLOBALS[''logged''][''member''] || $GLOBALS[''logged''][''admin''] ? _t(''_bx_events_action_create_event'') : '''';', '1', 'bx_events_title'), 
     326    ('{evalResult}', 'modules/boonex/events/|events.png', '{BaseUri}browse/my', '', 'return $GLOBALS[''logged''][''member''] || $GLOBALS[''logged''][''admin''] ? _t(''_bx_events_action_my_events'') : '''';', '2', 'bx_events_title'); 
    325327     
    326328-- top menu 
     
    360362SET @iMax = (SELECT MAX(`order`) FROM `sys_menu_admin` WHERE `parent_id` = '2'); 
    361363INSERT IGNORE INTO `sys_menu_admin` (`parent_id`, `name`, `title`, `url`, `description`, `icon`, `order`) VALUES 
    362 (2, 'bx_events', '_bx_events', '../modules/?r=events/administration', 'Events module by BoonEx', 'modules/boonex/events/|events.png', @iMax+1); 
     364(2, 'bx_events', '_bx_events', '../modules/?r=events/administration/', 'Events module by BoonEx', 'modules/boonex/events/|events.png', @iMax+1); 
    363365 
    364366-- email templates 
Note: See TracChangeset for help on using the changeset viewer.
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.
Fork me on GitHub