当前位置: 首页>>代码示例>>PHP>>正文


PHP BxDolSubscription::getButton方法代码示例

本文整理汇总了PHP中BxDolSubscription::getButton方法的典型用法代码示例。如果您正苦于以下问题:PHP BxDolSubscription::getButton方法的具体用法?PHP BxDolSubscription::getButton怎么用?PHP BxDolSubscription::getButton使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BxDolSubscription的用法示例。


在下文中一共展示了BxDolSubscription::getButton方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getBlockAction

 function getBlockAction($sUri)
 {
     $aEntry = $this->_oDb->getEntries(array('sample_type' => 'uri', 'uri' => $sUri));
     $sModuleUri = $this->_oConfig->getUri();
     $sModuleBaseUri = $this->_oConfig->getBaseUri();
     if ($aEntry['status'] != BX_TD_STATUS_ACTIVE) {
         return MsgBox(_t('_' . $sModuleUri . '_msg_no_results'));
     }
     $sModuleUri = $this->_oConfig->getUri();
     $oSubscription = new BxDolSubscription();
     $aButton = $oSubscription->getButton($this->getUserId(), $this->_oConfig->getSubscriptionsSystemName(), '', $aEntry['id']);
     $aReplacement['sbs_' . $sModuleUri . '_title'] = $aButton['title'];
     $aReplacement['sbs_' . $sModuleUri . '_script'] = $aButton['script'];
     $aReplacement['del_' . $sModuleUri . '_title'] = '';
     if ($this->_isDeleteAllowed()) {
         $this->_oTemplate->addJsTranslation(array('_' . $sModuleUri . '_msg_success_delete', '_' . $sModuleUri . '_msg_failed_delete'));
         $aReplacement['del_' . $sModuleUri . '_title'] = _t('_' . $sModuleUri . '_actions_delete');
         $aReplacement['del_' . $sModuleUri . '_script'] = $this->_oConfig->getJsObject() . '.deleteEntry(' . $aEntry['id'] . ')';
     }
     $aReplacement['share_' . $sModuleUri . '_title'] = '';
     if ($this->_isShareAllowed($aEntry)) {
         $aReplacement['share_' . $sModuleUri . '_title'] = _t('_Share');
         $aReplacement['share_' . $sModuleUri . '_script'] = "showPopupAnyHtml('" . $sModuleBaseUri . "share_popup/" . $aEntry['id'] . "')";
     }
     return $oSubscription->getData() . $GLOBALS['oFunctions']->genObjectsActions($aReplacement, $this->_oConfig->getActionsViewSystemName());
 }
开发者ID:Arvindvi,项目名称:dolphin,代码行数:26,代码来源:BxDolTextModule.php

示例2: isLogged

 /**
  * News Letters block
  */
 function getBlockCode_Subscribe()
 {
     global $site;
     $iUserId = isLogged() ? getLoggedId() : 0;
     $oSubscription = new BxDolSubscription();
     $aButton = $oSubscription->getButton($iUserId, 'system', '');
     $sContent = $oSubscription->getData() . $GLOBALS['oSysTemplate']->parseHtmlByName('home_page_subscribe.html', array('message' => _t('_SUBSCRIBE_TEXT', $site['title']), 'button_title' => $aButton['title'], 'button_script' => $aButton['script']));
     return array($sContent, array(), array(), false);
 }
开发者ID:noormcs,项目名称:studoro,代码行数:12,代码来源:BxBaseIndexPageView.php

示例3: BxDolSubscription

 function getBlockCode_ActionList()
 {
     $sCode = null;
     bx_import('BxDolSubscription');
     $oSubscription = new BxDolSubscription();
     $aButton = $oSubscription->getButton($this->iProfileId, $this->oConfig->getMainPrefix(), '', (int) $this->aFileInfo['medID']);
     $aReplacement = array('favorited' => $this->aFileInfo['favorited'] == false ? '' : 'favorited', 'moduleUrl' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri(), 'fileUri' => $this->aFileInfo['medUri'], 'iViewer' => $this->iProfileId, 'ID' => (int) $this->aFileInfo['medID'], 'Owner' => (int) $this->aFileInfo['medProfId'], 'OwnerName' => $this->aFileInfo['NickName'], 'AlbumUri' => $this->aFileInfo['albumUri'], 'sbs_' . $this->oConfig->getMainPrefix() . '_title' => $aButton['title'], 'sbs_' . $this->oConfig->getMainPrefix() . '_script' => $aButton['script']);
     $sActionsList = $GLOBALS['oFunctions']->genObjectsActions($aReplacement, $this->oConfig->getMainPrefix());
     if (!is_null($sActionsList)) {
         $sCode = $oSubscription->getData() . $sActionsList;
     }
     return $sCode;
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:13,代码来源:BxVideosPageView.php

示例4: BxDolSubscription

 function getBlockCode_Actions()
 {
     global $oFunctions;
     if ($this->_oMain->_iProfileId || $this->_oMain->isAdmin()) {
         $oSubscription = new BxDolSubscription();
         $aSubscribeButton = $oSubscription->getButton($this->_oMain->_iProfileId, 'bx_store', '', (int) $this->aDataEntry['id']);
         $aInfo = array('BaseUri' => $this->_oMain->_oConfig->getBaseUri(), 'iViewer' => $this->_oMain->_iProfileId, 'ownerID' => (int) $this->aDataEntry['author_id'], 'ID' => (int) $this->aDataEntry['id'], 'URI' => (int) $this->aDataEntry['uri'], 'ScriptSubscribe' => $aSubscribeButton['script'], 'TitleSubscribe' => $aSubscribeButton['title'], 'TitleEdit' => $this->_oMain->isAllowedEdit($this->aDataEntry) ? _t('_bx_store_action_title_edit') : '', 'TitleDelete' => $this->_oMain->isAllowedDelete($this->aDataEntry) ? _t('_bx_store_action_title_delete') : '', 'TitleShare' => $this->_oMain->isAllowedShareProduct($this->aDataEntry) ? _t('_bx_store_action_title_share') : '', 'TitleBroadcast' => $this->_oMain->isAllowedBroadcast($this->aDataEntry) ? _t('_bx_store_action_title_broadcast') : '', 'AddToFeatured' => $this->_oMain->isAllowedMarkAsFeatured($this->aDataEntry) ? $this->aDataEntry['featured'] ? _t('_bx_store_action_remove_from_featured') : _t('_bx_store_action_add_to_featured') : '');
         if (!$aInfo['TitleEdit'] && !$aInfo['TitleDelete'] && !$aInfo['TitleShare'] && !$aInfo['AddToFeatured'] && !$aInfo['TitleBroadcast'] && !$aInfo['TitleSubscribe']) {
             return '';
         }
         return $oSubscription->getData() . $oFunctions->genObjectsActions($aInfo, 'bx_store');
     }
     return '';
 }
开发者ID:Arvindvi,项目名称:dolphin,代码行数:14,代码来源:BxStorePageView.php

示例5: BxDolSubscription

 function getBlockCode_Actions()
 {
     global $oFunctions;
     if ($this->_oMain->_iProfileId || $this->_oMain->isAdmin()) {
         $oSubscription = new BxDolSubscription();
         $aSubscribeButton = $oSubscription->getButton($this->_oMain->_iProfileId, 'bx_groups', '', (int) $this->aDataEntry['id']);
         $isFan = $this->_oDb->isFan((int) $this->aDataEntry['id'], $this->_oMain->_iProfileId, 0) || $this->_oDb->isFan((int) $this->aDataEntry['id'], $this->_oMain->_iProfileId, 1);
         $aInfo = array('BaseUri' => $this->_oMain->_oConfig->getBaseUri(), 'iViewer' => $this->_oMain->_iProfileId, 'ownerID' => (int) $this->aDataEntry['author_id'], 'ID' => (int) $this->aDataEntry['id'], 'URI' => $this->aDataEntry['uri'], 'ScriptSubscribe' => $aSubscribeButton['script'], 'TitleSubscribe' => $aSubscribeButton['title'], 'TitleEdit' => $this->_oMain->isAllowedEdit($this->aDataEntry) ? _t('_bx_groups_action_title_edit') : '', 'TitleDelete' => $this->_oMain->isAllowedDelete($this->aDataEntry) ? _t('_bx_groups_action_title_delete') : '', 'TitleJoin' => $this->_oMain->isAllowedJoin($this->aDataEntry) ? $isFan ? _t('_bx_groups_action_title_leave') : _t('_bx_groups_action_title_join') : '', 'IconJoin' => $isFan ? 'signout' : 'signin', 'TitleInvite' => $this->_oMain->isAllowedSendInvitation($this->aDataEntry) ? _t('_bx_groups_action_title_invite') : '', 'TitleShare' => $this->_oMain->isAllowedShare($this->aDataEntry) ? _t('_bx_groups_action_title_share') : '', 'TitleBroadcast' => $this->_oMain->isAllowedBroadcast($this->aDataEntry) ? _t('_bx_groups_action_title_broadcast') : '', 'AddToFeatured' => $this->_oMain->isAllowedMarkAsFeatured($this->aDataEntry) ? $this->aDataEntry['featured'] ? _t('_bx_groups_action_remove_from_featured') : _t('_bx_groups_action_add_to_featured') : '', 'TitleManageFans' => $this->_oMain->isAllowedManageFans($this->aDataEntry) ? _t('_bx_groups_action_manage_fans') : '', 'TitleUploadPhotos' => $this->_oMain->isAllowedUploadPhotos($this->aDataEntry) ? _t('_bx_groups_action_upload_photos') : '', 'TitleUploadVideos' => $this->_oMain->isAllowedUploadVideos($this->aDataEntry) ? _t('_bx_groups_action_upload_videos') : '', 'TitleUploadSounds' => $this->_oMain->isAllowedUploadSounds($this->aDataEntry) ? _t('_bx_groups_action_upload_sounds') : '', 'TitleUploadFiles' => $this->_oMain->isAllowedUploadFiles($this->aDataEntry) ? _t('_bx_groups_action_upload_files') : '');
         if (!$aInfo['TitleEdit'] && !$aInfo['TitleDelete'] && !$aInfo['TitleJoin'] && !$aInfo['TitleInvite'] && !$aInfo['TitleShare'] && !$aInfo['TitleBroadcast'] && !$aInfo['AddToFeatured'] && !$aInfo['TitleManageFans'] && !$aInfo['TitleUploadPhotos'] && !$aInfo['TitleUploadVideos'] && !$aInfo['TitleUploadSounds'] && !$aInfo['TitleUploadFiles']) {
             return '';
         }
         return $oSubscription->getData() . $oFunctions->genObjectsActions($aInfo, 'bx_groups');
     }
     return '';
 }
开发者ID:noormcs,项目名称:studoro,代码行数:15,代码来源:BxGroupsPageView.php

示例6: BxDolSubscription

 function getBlockCode_ActionList()
 {
     $sCode = null;
     bx_import('BxDolSubscription');
     $oSubscription = new BxDolSubscription();
     $aButton = $oSubscription->getButton($this->iProfileId, $this->oConfig->getMainPrefix(), '', (int) $this->aFileInfo['medID']);
     $aReplacement = array('featured' => (int) $this->aFileInfo['Featured'], 'featuredCpt' => '', 'moduleUrl' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri(), 'fileUri' => $this->aFileInfo['medUri'], 'iViewer' => $this->iProfileId, 'favorited' => $this->aFileInfo['favorited'] == false ? '' : 'favorited', 'ID' => (int) $this->aFileInfo['medID'], 'Owner' => (int) $this->aFileInfo['medProfId'], 'OwnerName' => $this->aFileInfo['NickName'], 'AlbumUri' => $this->aFileInfo['albumUri'], 'sbs_' . $this->oConfig->getMainPrefix() . '_title' => $aButton['title'], 'sbs_' . $this->oConfig->getMainPrefix() . '_script' => $aButton['script'], 'shareCpt' => $this->oModule->isAllowedShare($this->aFileInfo) ? _t('_Share') : '', 'downloadCpt' => $this->oModule->isAllowedDownload($this->aFileInfo) ? _t('_Download') : '');
     if (isAdmin($this->iProfileId)) {
         $sMsg = $aReplacement['featured'] > 0 ? 'un' : '';
         $aReplacement['featuredCpt'] = _t('_' . $this->oConfig->getMainPrefix() . '_action_' . $sMsg . 'feature');
     }
     $sActionsList = $GLOBALS['oFunctions']->genObjectsActions($aReplacement, $this->oConfig->getMainPrefix());
     if (!is_null($sActionsList)) {
         $sCode = $oSubscription->getData() . $sActionsList;
     }
     return $sCode;
 }
开发者ID:noormcs,项目名称:studoro,代码行数:17,代码来源:BxFilesPageView.php

示例7: array

    function getBlockCode_ViewActions()
    {
        global $oFunctions;
        if ($this->_oSites->iOwnerId || $this->_oSites->isAdmin()) {
            $aInfo = array('iViewer' => $this->_oSites->iOwnerId, 'ownerID' => (int) $this->_aSite['ownerid'], 'ID' => (int) $this->_aSite['id'], 'TitleEdit' => $this->_oSites->isAllowedEdit($this->_aSite) ? _t('_bx_sites_action_title_edit') : '', 'TitleDelete' => $this->_oSites->isAllowedDelete($this->_aSite) ? _t('_bx_sites_action_title_delete') : '', 'TitleShare' => $this->_oSites->isAllowedShareSite($this->_aSite) ? _t('_bx_sites_action_title_share') : '', 'AddToFeatured' => $this->_oSites->isAllowedMarkAsFeatured($this->_aSite) && (int) $this->_aSite['allowView'] == BX_DOL_PG_ALL ? (int) $this->_aSite['featured'] == 1 ? _t('_bx_sites_action_remove_from_featured') : _t('_bx_sites_action_add_to_featured') : '');
            $oSubscription = new BxDolSubscription();
            $aButton = $oSubscription->getButton($this->_oSites->iOwnerId, 'bx_sites', '', $this->_aSite['id']);
            $aInfo['sbs_sites_title'] = $aButton['title'];
            $aInfo['sbs_sites_script'] = $aButton['script'];
            if (!$aInfo['TitleEdit'] && !$aInfo['TitleDelete'] && !$aInfo['TitleShare'] && !$aInfo['AddToFeatured'] && !$aInfo['sbs_sites_title']) {
                return '';
            }
            $sScript = '';
            if ($aInfo['TitleShare']) {
                $sUrlSharePopup = BX_DOL_URL_ROOT . $this->_oSites->_oConfig->getBaseUri() . "share_popup/" . $this->_aSite['id'];
                $sScript = <<<EOF
                    <script type="text/javascript">
                    function bx_site_show_share_popup ()
                    {
                        if (!\$('#bx_sites_share_popup').length) {
                            \$('<div id="bx_sites_share_popup" style="display: none;"></div>').prependTo('body');
                        }

                        \$('#bx_sites_share_popup').load(
                            '{$sUrlSharePopup}',
                            function() {
                                \$(this).dolPopup({fog: {color: '#fff', opacity: .7}});
                            }
                        );
                    }
                    </script>
EOF;
            }
            return $oSubscription->getData() . $sScript . $oFunctions->genObjectsActions($aInfo, 'bx_sites');
        }
        return '';
    }
开发者ID:Arvindvi,项目名称:dolphin,代码行数:37,代码来源:BxSitesPageView.php

示例8: array

 /**
  * Function will generate the view message block ;
  *
  * @return   : Html presentation data ;
  */
 function getBlockCode_ViewMessage()
 {
     global $oSysTemplate;
     global $oFunctions;
     global $site;
     global $oTemplConfig;
     // init some needed variables;
     $sOutputHtml = null;
     $sActionsList = null;
     // generate page toggle ellements ;
     $aToggleItems = array('inbox' => _t('_Inbox'), 'outbox' => _t('_Outbox'), 'trash' => _t('_Trash'), 'compose' => _t('_Compose'));
     $sRequest = 'mail.php' . '?';
     foreach ($aToggleItems as $sKey => $sValue) {
         $aTopToggleEllements[$sValue] = array('href' => $sRequest . '&mode=' . $sKey, 'dynamic' => false, 'active' => false);
     }
     // language keys ;
     $aLanguageKeys = array('back_inbox' => _t('_Back') . ' ' . _t('_to') . ' ' . _t('_Inbox'), 'back_outbox' => _t('_Back') . ' ' . _t('_to') . ' ' . _t('_Outbox'), 'back_trash' => _t('_Back') . ' ' . _t('_to') . ' ' . _t('_Trash'), 'spam_message' => _t('_Spam report'), 'delete_message' => _t('_Delete'), 'reply_message' => _t('_Reply'), 'restore_message' => _t('_Restore'), 'are_you_sure' => _t('_Are you sure?'), 'more' => _t('_More actions'), 'mark_read' => _t('_Mark as old'), 'mark_unread' => _t('_Mark as New'));
     $sQuery = "\r\n                SELECT \r\n                    *,\r\n                    DATE_FORMAT(`Date`, '%d.%m.%Y %H:%i') AS `Date`\r\n                FROM \r\n                    `sys_messages` \r\n                WHERE \r\n                    `ID` = {$this->aMailBoxSettings['messageID']} \r\n                AND\r\n                    (\r\n                        `Sender` = {$this->aMailBoxSettings['member_id']}\r\n                            OR\r\n                        `Recipient` = {$this->aMailBoxSettings['member_id']}\r\n                    )\r\n            ";
     $rResult = db_res($sQuery);
     while (true == ($aRow = mysql_fetch_assoc($rResult))) {
         // ** generate member's information ;
         $sMemberIcon = get_member_thumbnail($aRow['Sender'], 'none');
         $aMemberInfo = getProfileInfo($aRow['Sender']);
         // define the back link;
         if ($aRow['Trash'] == 'recipient') {
             $sBackCaption = $aLanguageKeys['back_trash'];
             $sBackUrl = 'mail.php' . '?mode=trash';
         } else {
             if ($aRow['Sender'] == $this->aMailBoxSettings['member_id']) {
                 $sBackCaption = $aLanguageKeys['back_outbox'];
                 $sBackUrl = 'mail.php' . '?mode=outbox';
             } else {
                 $sBackCaption = $aLanguageKeys['back_inbox'];
                 $sBackUrl = 'mail.php' . '?mode=inbox';
             }
         }
         $sMemberNickName = $aMemberInfo['NickName'];
         $sMemberLocation = getProfileLink($aMemberInfo['ID']);
         $sMemberSexImage = isset($aMemberInfo['Sex']) ? $oFunctions->genSexIcon($aMemberInfo['Sex']) : null;
         $sMemberAge = isset($aMemberInfo['DateOfBirth']) && $aMemberInfo['DateOfBirth'] != "0000-00-00" ? _t("_y/o", age($aMemberInfo['DateOfBirth'])) : null;
         $sMemberCountry = isset($aMemberInfo['Country']) && $aMemberInfo['Country'] ? $aMemberInfo['Country'] : null;
         $sMemberFlag = $sMemberCountry ? $site['flags'] . strtolower($sMemberCountry) . $this->sMembersFlagExtension : null;
         if ($sMemberCountry) {
             $sMemberCountryFlag = '<img src="' . $sMemberFlag . '" alt="' . $sMemberCountry . '" />';
         }
         $sCity = isset($aMemberInfo['City']) && $aMemberInfo['City'] ? $aMemberInfo['City'] . ', ' : null;
         // member's city and country;
         $sMemberCountry = $sCity . $sMemberCountry;
         // generate the member's actions list;
         if ($aRow['Sender'] != $this->aMailBoxSettings['member_id']) {
             // prepare all needed keywords ;
             $aMemberInfo['window_width'] = $oTemplConfig->popUpWindowWidth;
             $aMemberInfo['window_height'] = $oTemplConfig->popUpWindowHeight;
             $aMemberInfo['anonym_mode'] = $oTemplConfig->bAnonymousMode;
             $aMemberInfo['member_pass'] = $aMemberInfo['Password'];
             $aMemberInfo['member_id'] = $aMemberInfo['ID'];
             $bDisplayType = getParam('enable_new_dhtml_popups') == 'on' ? 0 : 1;
             $aMemberInfo['display_type'] = $bDisplayType;
             $aMemberInfo['url'] = BX_DOL_URL_ROOT;
             //--- Subscription integration ---//
             $oSubscription = new BxDolSubscription();
             $sAddon = $oSubscription->getData();
             $aButton = $oSubscription->getButton((int) $this->aMailBoxSettings['member_id'], 'profile', '', (int) $aRow['Sender']);
             $aMemberInfo['sbs_profile_title'] = $aButton['title'];
             $aMemberInfo['sbs_profile_script'] = $aButton['script'];
             //--- Subscription integration ---//
             $aMemberInfo['cpt_edit'] = '';
             $aMemberInfo['cpt_send_letter'] = _t('_SendLetter');
             $aMemberInfo['cpt_remove_friend'] = _t('_Remove friend');
             $aMemberInfo['cpt_fave'] = _t('_Fave');
             $aMemberInfo['cpt_befriend'] = _t('_Befriend');
             $aMemberInfo['cpt_greet'] = _t('_Greet');
             $aMemberInfo['cpt_get_mail'] = _t('_Get E-mail');
             $aMemberInfo['cpt_share'] = _t('_Share');
             $aMemberInfo['cpt_report'] = _t('_Report');
             $aMemberInfo['cpt_block'] = _t('_Block');
             $aMemberInfo['cpt_unblock'] = _t('_Unblock');
             $aMemberInfo['member_id'] = $this->aMailBoxSettings['member_id'];
             $sActionsList = $sAddon . $oFunctions->genObjectsActions($aMemberInfo, 'Profile');
         }
         // try to define the message status ;
         if ($aRow['Sender'] == $this->aMailBoxSettings['member_id']) {
             if (strstr($aRow['Trash'], 'sender')) {
                 $this->aMailBoxSettings['mailbox_mode'] = 'trash';
             } else {
                 $this->aMailBoxSettings['mailbox_mode'] = 'outbox';
             }
             $sRelocateParameter = 'outbox';
         } else {
             if ($aRow['Sender'] != $this->aMailBoxSettings['member_id']) {
                 if (strstr($aRow['Trash'], 'recipient')) {
                     $this->aMailBoxSettings['mailbox_mode'] = 'trash';
                 } else {
                     $this->aMailBoxSettings['mailbox_mode'] = 'inbox';
                 }
//.........这里部分代码省略.........
开发者ID:dalinhuang,项目名称:shopexts,代码行数:101,代码来源:BxBaseMailBox.php

示例9: MsgBox

 /**
  * Function will generate block with actions;
  */
 function getBlockCode_ActionsBlock()
 {
     if (!$this->aPollInfo) {
         return MsgBox(_t('_Empty'));
     }
     $iOwnerId = (int) $this->aPollInfo['id_profile'];
     $aOwnerInfo = getProfileInfo($iOwnerId);
     // prepare all needed keys
     $aOwnerInfo['PollId'] = (int) $this->aPollInfo['id_poll'];
     $aOwnerInfo['ID'] = $this->iMemberId;
     $aOwnerInfo['BaseUri'] = $this->oModule->_oConfig->getBaseUri();
     $oSubscription = new BxDolSubscription();
     $aButton = $oSubscription->getButton($this->iMemberId, 'bx_poll', '', $this->aPollInfo['id_poll']);
     $aOwnerInfo['sbs_poll_title'] = $aButton['title'];
     $aOwnerInfo['sbs_poll_script'] = $aButton['script'];
     $sActions = $GLOBALS['oFunctions']->genObjectsActions($aOwnerInfo, 'bx_poll');
     return $oSubscription->getData() . $sActions;
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:21,代码来源:BxPollView.php

示例10: serviceViewBlock

    function serviceViewBlock($mixed, $iStart = -1, $iPerPage = -1, $sFilter = '', $sTimeline = '', $sType = 'id', $aModules = array())
    {
        $sContent = '';
        $aOwner = $this->_oDb->getUser($mixed, $sType);
        $this->_iOwnerId = $aOwner['id'];
        $oSubscription = new BxDolSubscription();
        $aButton = $oSubscription->getButton($this->getUserId(), 'bx_wall', '', $this->_iOwnerId);
        $aTopMenu = array('wall-view-all' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:' . $this->_sJsViewObject . '.changeFilter(this)', 'title' => _t('_wall_view_all'), 'active' => 1), 'wall-view-owner' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:' . $this->_sJsViewObject . '.changeFilter(this)', 'title' => _t('_wall_view_owner', getNickName($aOwner['id']))), 'wall-view-other' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:' . $this->_sJsViewObject . '.changeFilter(this)', 'title' => _t('_wall_view_other')), 'wall-get-rss' => array('href' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'rss/' . $aOwner['username'] . '/', 'target' => '_blank', 'title' => _t('_wall_get_rss')), 'wall-subscription' => array('href' => 'javascript:void(0);', 'onclick' => 'javascript:' . $aButton['script'] . '', 'title' => $aButton['title']));
        if ($iStart == -1) {
            $iStart = 0;
        }
        if ($iPerPage == -1) {
            $iPerPage = $this->_oConfig->getPerPage();
        }
        if (empty($sFilter)) {
            $sFilter = BX_WALL_FILTER_ALL;
        }
        //--- Prepare JavaScript paramaters ---//
        $oJson = new Services_JSON();
        ob_start();
        ?>
        var <?php 
        echo $this->_sJsViewObject;
        ?>
 = new BxWallView({
            sActionUrl: '<?php 
        echo BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri();
        ?>
',
            sObjName: '<?php 
        echo $this->_sJsViewObject;
        ?>
',
            iOwnerId: <?php 
        echo $this->_iOwnerId;
        ?>
,
            sAnimationEffect: '<?php 
        echo $this->_oConfig->getAnimationEffect();
        ?>
',
            iAnimationSpeed: '<?php 
        echo $this->_oConfig->getAnimationSpeed();
        ?>
',
            oRequestParams: <?php 
        echo $oJson->encode(array('WallOwnerId' => $this->_iOwnerId, 'WallStart' => $iStart, 'WallPerPage' => $iPerPage, 'WallFilter' => $sFilter, 'WallTimeline' => $sTimeline, 'WallModules' => $aModules));
        ?>
        });
<?php 
        $sJsContent = ob_get_clean();
        //--- Is used with common Pagination
        //$oPaginate = $this->_getPaginate($sFilter, $sTimeline, $aModules);
        $aVariables = array('timeline' => $this->_getTimeline($iStart, $iPerPage, $sFilter, $sTimeline, $aModules), 'content' => $this->_getPosts('desc', $iStart, $iPerPage, $sFilter, $sTimeline, $aModules), 'view_js_content' => $sJsContent);
        $GLOBALS['oTopMenu']->setCurrentProfileID((int) $this->_iOwnerId);
        $this->_oTemplate->addCss(array('forms_adv.css', 'view.css'));
        $this->_oTemplate->addJs(array('main.js', 'view.js'));
        return array($this->_oTemplate->parseHtmlByName('view.html', $aVariables), $aTopMenu, LoadingBox('bx-wall-view-loading'), false, 'getBlockCaptionMenu');
    }
开发者ID:noormcs,项目名称:studoro,代码行数:59,代码来源:BxWallModule.php

示例11: getActionsBlock

 function getActionsBlock()
 {
     if ($this->iPostViewType == 3 && $this->iViewingPostID > 0) {
         $iMemberID = (int) $this->aViewingPostInfo['OwnerID'];
         $aOwnerInfo = getProfileInfo($iMemberID);
         $sOwnerNickname = getNickName($iMemberID);
         $aUser = array('Permalink' => $aOwnerInfo['NickName'], 'Link' => $iMemberID);
         $sOwnerBlogLinkSub = $this->genBlogLink('show_member_blog_home', $aUser, '', '', '', true);
         $sApproveC = _t('_Approve');
         $sDisApproveC = _t('_Disapprove');
         $sFeatureItC = _t('_Feature it');
         $sDeFeatureItC = _t('_De-Feature it');
         $bApproveAllowed = $this->isAllowedApprove() ? 'true' : 'false';
         if ($this->_iVisitorID == $iMemberID && $iMemberID > 0 || $this->bAdminMode || $bApproveAllowed) {
             $iFeaturedStatus = $this->_oDb->getFeaturedStatus($this->iViewingPostID);
             $sFeatureC = (int) $iFeaturedStatus == 1 ? $sDeFeatureItC : $sFeatureItC;
             if ($this->bAdminMode || $bApproveAllowed == 'true') {
                 $iApproved = 0;
                 //0 = not changed; 1 = app; 2 = disapp;
                 if (bx_get('sa') == 'approve') {
                     //approve this post
                     $this->_oDb->setPostStatus($this->iViewingPostID, 'approval');
                     $this->onPostApproveDisapprove($this->iViewingPostID, true);
                     $iApproved = 1;
                 }
                 if (bx_get('sa') == 'disapprove') {
                     //disapprove this post
                     $this->_oDb->setPostStatus($this->iViewingPostID);
                     $this->onPostApproveDisapprove($this->iViewingPostID, false);
                     $iApproved = 2;
                 }
                 $sCurPostStatus = $this->_oDb->getActiveStatus($this->iViewingPostID);
                 switch ($iApproved) {
                     case 0:
                         $sSAAction = $sCurPostStatus == 'disapproval' ? 'approve' : 'disapprove';
                         $sSACaption = $sCurPostStatus == 'disapproval' ? $sApproveC : $sDisApproveC;
                         break;
                     case 1:
                         $sSAAction = 'disapprove';
                         $sSACaption = $sDisApproveC;
                         break;
                     case 2:
                         $sSAAction = 'approve';
                         $sSACaption = $sApproveC;
                         break;
                 }
             }
         }
         $sLink = $this->genBlogLink('show_member_blog_home', $aUser);
         $sViewingPostUri = $this->_oDb->getPostUriByID($this->iViewingPostID);
         $aViewingPost = array('Permalink' => $sViewingPostUri, 'Link' => $this->iViewingPostID);
         $sViewingPostLink = $this->genBlogLink('show_member_post', $aUser, '', $aViewingPost);
         $sLink = $this->genBlogLink('show_member_post', $aUser, '', $aViewingPost, '', true);
         $sProcessingFile = $this->genBlogSubUrl();
         bx_import('BxDolSubscription');
         $oSubscription = new BxDolSubscription();
         $aButton = $oSubscription->getButton($this->_iVisitorID, 'bx_' . $this->_oConfig->getUri(), '', $this->iViewingPostID);
         $aActionKeys = array('edit_allowed' => $this->isAllowedPostEdit(-1) ? 'true' : 'false', 'visitor_id' => $this->_iVisitorID, 'owner_id' => $iMemberID, 'blog_owner_link' => $sOwnerBlogLinkSub, 'owner_title' => $sOwnerNickname, 'owner_name' => $aOwnerInfo['NickName'], 'admin_mode' => "'" . $this->bAdminMode . "'", 'post_id' => $this->iViewingPostID, 'post_featured' => (int) $iFeaturedStatus, 'sure_label' => _t('_Are you sure?'), 'post_entry_url' => $sLink, 'post_inside_entry_url' => $sViewingPostLink, 'sSACaption' => $sSACaption, 'sSAAction' => $sSAAction, 'work_url' => $sProcessingFile, 'only_menu' => 0, 'sbs_blogs_title' => $aButton['title'], 'sbs_blogs_script' => $aButton['script'], 'site_url' => BX_DOL_URL_ROOT, 'allow_approve' => $bApproveAllowed, 'base_url' => $this->sHomeUrl);
         $sActionsVal = $GLOBALS['oFunctions']->genObjectsActions($aActionKeys, 'bx_blogs', false);
         $sSubsAddon = $oSubscription->getData();
         return $sSubsAddon . $sActionsVal;
     }
 }
开发者ID:Arvindvi,项目名称:dolphin,代码行数:63,代码来源:BxBlogsModule.php

示例12: serviceViewBlock

    function serviceViewBlock($mixed, $iStart = -1, $iPerPage = -1, $sFilter = '', $sType = 'id')
    {
        $aOwner = $this->_oDb->getUser($mixed, $sType);
        $this->_iOwnerId = $aOwner['id'];
        $oSubscription = new BxDolSubscription();
        $aButton = $oSubscription->getButton($this->getUserId(), 'bx_wall', '', $this->_iOwnerId);
        $aTopMenu = array('wall-view-all' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:' . $this->_sJsViewObject . '.filterPosts(this)', 'title' => _t('_wall_view_all'), 'active' => 1), 'wall-view-owner' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:' . $this->_sJsViewObject . '.filterPosts(this)', 'title' => _t('_wall_view_owner', $aOwner['username'])), 'wall-view-other' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript:' . $this->_sJsViewObject . '.filterPosts(this)', 'title' => _t('_wall_view_other')), 'wall-get-rss' => array('href' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'rss/' . $aOwner['username'] . '/', 'target' => '_blank', 'title' => _t('_wall_get_rss')), 'wall-subscription' => array('href' => 'javascript:void(0);', 'onclick' => 'javascript:' . $aButton['script'] . '', 'title' => $aButton['title']));
        if ($iStart == -1) {
            $iStart = 0;
        }
        if ($iPerPage == -1) {
            $iPerPage = $this->_oConfig->getPerPage();
        }
        if (empty($sFilter)) {
            $sFilter = BX_WALL_FILTER_ALL;
        }
        $sContent = $this->_getPosts('desc', $iStart, $iPerPage, $sFilter);
        //--- Prepare JavaScript paramaters ---//
        ob_start();
        ?>
        var <?php 
        echo $this->_sJsViewObject;
        ?>
 = new BxWallView({
            sActionUrl: '<?php 
        echo BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri();
        ?>
',
            sObjName: '<?php 
        echo $this->_sJsViewObject;
        ?>
',
            iOwnerId: <?php 
        echo $this->_iOwnerId;
        ?>
,
            sAnimationEffect: '<?php 
        echo $this->_oConfig->getAnimationEffect();
        ?>
',
            iAnimationSpeed: '<?php 
        echo $this->_oConfig->getAnimationSpeed();
        ?>
'
        });
<?php 
        $sJsContent = ob_get_clean();
        $sHomeUrl = $this->_oConfig->getHomeUrl();
        $oPaginate = $this->_getPaginate($sFilter);
        $aVariables = array('content' => $sContent, 'view_js_content' => $sJsContent, 'view_js_object' => $this->_sJsViewObject, 'paginate' => $oPaginate->getPaginate());
        $GLOBALS['oTopMenu']->setCurrentProfileID((int) $this->_iOwnerId);
        $this->_oTemplate->addCss('view.css');
        $this->_oTemplate->addJs(array('main.js', 'view.js'));
        return array($this->_oTemplate->parseHtmlByName('view.html', $aVariables), $aTopMenu, array(), true, 'getBlockCaptionMenu');
    }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:55,代码来源:BxWallModule.php

示例13: BxDolSubscription

 /**
  * News Letters block
  */
 function getBlockCode_Subscribe()
 {
     global $site;
     $oSubscription = new BxDolSubscription();
     $aButton = $oSubscription->getButton(0, 'system', 'mass_mailer');
     return $oSubscription->getData() . $GLOBALS['oSysTemplate']->parseHtmlByName('home_page_subscribe.html', array('message' => _t('_SUBSCRIBE_TEXT', $site['title']), 'button_title' => $aButton['title'], 'button_script' => $aButton['script']));
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:10,代码来源:BxBaseIndexPageView.php

示例14: getProfileInfo

if (isset($_GET['ID']) && (int) $_GET['ID'] > 0) {
    $iProfId = (int) $_GET['ID'];
    $aProfileInfo = getProfileInfo($iProfId);
    $aMemberInfo = getProfileInfo($iMemberId);
    $aProfileInfo['window_width'] = $oTemplConfig->popUpWindowWidth;
    $aProfileInfo['window_height'] = $oTemplConfig->popUpWindowHeight;
    $aProfileInfo['anonym_mode'] = $oTemplConfig->bAnonymousMode;
    $aProfileInfo['member_pass'] = $aMemberInfo['Password'];
    $aProfileInfo['member_id'] = $iMemberId;
    $bDisplayType = getParam('enable_new_dhtml_popups') == 'on' ? 0 : 1;
    $aProfileInfo['display_type'] = $bDisplayType;
    $aProfileInfo['url'] = BX_DOL_URL_ROOT;
    $aProfileInfo['status_message'] = process_line_output($aProfileInfo['UserStatusMessage']);
    //--- Subscription integration ---//
    $oSubscription = new BxDolSubscription();
    $aButton = $oSubscription->getButton($iMemberId, 'profile', '', $iProfId);
    $aProfileInfo['sbs_profile_title'] = $aButton['title'];
    $aProfileInfo['sbs_profile_script'] = $aButton['script'];
    //--- Subscription integration ---//
    //--- Check for member/non-member ---//
    if (isMember()) {
        $aProfileInfo['cpt_edit'] = _t('_EditProfile');
        $aProfileInfo['cpt_send_letter'] = _t('_SendLetter');
        $aProfileInfo['cpt_fave'] = _t('_Fave');
        $aProfileInfo['cpt_befriend'] = _t('_Befriend');
        $aProfileInfo['cpt_remove_friend'] = _t('_Remove friend');
        $aProfileInfo['cpt_greet'] = _t('_Greet');
        $aProfileInfo['cpt_get_mail'] = _t('_Get E-mail');
        $aProfileInfo['cpt_share'] = _t('_Share');
        $aProfileInfo['cpt_report'] = _t('_Report Spam');
        $aProfileInfo['cpt_block'] = _t('_Block');
开发者ID:dalinhuang,项目名称:shopexts,代码行数:31,代码来源:short_profile_info.php

示例15: serviceActionBlock

 function serviceActionBlock($sUri)
 {
     $aParams = is_numeric($sUri) ? array('sample_type' => 'id', 'id' => $sUri) : array('sample_type' => 'uri', 'uri' => $sUri);
     $aEntry = $this->_oDb->getEntries($aParams);
     $sModuleUri = $this->_oConfig->getUri();
     if ($aEntry['status'] != BX_TD_STATUS_ACTIVE) {
         return MsgBox(_t('_' . $sModuleUri . '_msg_no_results'));
     }
     $sModuleUri = $this->_oConfig->getUri();
     $oSubscription = new BxDolSubscription();
     $aButton = $oSubscription->getButton($this->getUserId(), 'bx_' . $sModuleUri, '', $aEntry['id']);
     $aReplacement['sbs_' . $sModuleUri . '_title'] = $aButton['title'];
     $aReplacement['sbs_' . $sModuleUri . '_script'] = $aButton['script'];
     if ($this->_isDeleteAllowed()) {
         $this->_oTemplate->addJsTranslation(array('_' . $sModuleUri . '_msg_success_delete', '_' . $sModuleUri . '_msg_failed_delete'));
         $aReplacement['del_' . $sModuleUri . '_title'] = _t('_' . $sModuleUri . '_actions_delete');
         $aReplacement['del_' . $sModuleUri . '_script'] = $this->_oConfig->getJsObject() . '.deleteEntry(' . $aEntry['id'] . ')';
     } else {
         $aReplacement['del_' . $sModuleUri . '_title'] = '';
     }
     return $oSubscription->getData() . $GLOBALS['oFunctions']->genObjectsActions($aReplacement, 'bx_' . $this->_oConfig->getUri());
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:22,代码来源:BxDolTextModule.php


注:本文中的BxDolSubscription::getButton方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。