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


PHP t3lib_BEfunc::compilePreviewKeyword方法代码示例

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


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

示例1: generateWorkspacePreviewLink

 /**
  * Generates a workspace preview link.
  *
  * @param integer $uid The ID of the record to be linked
  * @return string the full domain including the protocol http:// or https://, but without the trailing '/'
  */
 public function generateWorkspacePreviewLink($uid)
 {
     $ttlHours = intval($GLOBALS['BE_USER']->getTSConfigVal('options.workspaces.previewLinkTTLHours'));
     $ttlHours = ($ttlHours ? $ttlHours : 24 * 2) * 3600;
     $linkParams = array('ADMCMD_prev' => t3lib_BEfunc::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'], $ttlHours, $this->getCurrentWorkspace()), 'id' => $uid);
     return t3lib_BEfunc::getViewDomain($uid) . '/index.php?' . t3lib_div::implodeArrayForUrl('', $linkParams);
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:13,代码来源:ActionHandler.php

示例2: mkPreviewLinks

 function mkPreviewLinks()
 {
     $previewUrls = array();
     foreach ($this->pageIds as $pageId) {
         $ttlHours = intval($GLOBALS['BE_USER']->getTSConfigVal('options.workspaces.previewLinkTTLHours'));
         $ttlHours = $ttlHours ? $ttlHours : 24 * 2;
         $params = 'id=' . $pageId . '&L=' . $this->sysLang . '&ADMCMD_previewWS=' . $this->workspaceId;
         $previewUrls[$pageId] = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . 'index.php?ADMCMD_prev=' . t3lib_BEfunc::compilePreviewKeyword($params, $GLOBALS['BE_USER']->user['uid'], 60 * 60 * $ttlHours);
     }
     return $previewUrls;
 }
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:11,代码来源:class.tx_l10nmgr_mkPreviewLinkService.php

示例3: workspaceMgm

 /**
  * Management of workspace for page ID
  * Called when $this->id is set.
  *
  * @return	void
  */
 function workspaceMgm()
 {
     // Perform workspace publishing action if buttons are pressed:
     $errors = $this->publishAction();
     // Generate workspace overview:
     $WSoverview = $this->displayWorkspaceOverview();
     // Buttons for publish / swap:
     $actionLinks = '<br />';
     if ($GLOBALS['BE_USER']->workspace !== 0) {
         if ($this->publishAccess) {
             $actionLinks .= '<input type="submit" name="_publish" value="' . $GLOBALS['LANG']->getLL('publishPage') . '" onclick="return confirm(\'' . sprintf($GLOBALS['LANG']->getLL('publishPageQuestion'), $GLOBALS['BE_USER']->workspaceRec['publish_access'] & 1 ? $GLOBALS['LANG']->getLL('publishPageQuestionStage') : '') . '\');"/>';
             if ($GLOBALS['BE_USER']->workspaceSwapAccess()) {
                 $actionLinks .= '<input type="submit" name="_swap" value="' . $GLOBALS['LANG']->getLL('swapPage') . '" onclick="return confirm(\'' . sprintf($GLOBALS['LANG']->getLL('swapPageQuestion'), $GLOBALS['BE_USER']->workspaceRec['publish_access'] & 1 ? $GLOBALS['LANG']->getLL('publishPageQuestionStage') : '') . '\');" />';
             }
         } else {
             $actionLinks .= $this->doc->icons(1) . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:no_publish_permission');
         }
     }
     $actionLinks .= '<input type="submit" name="_" value="' . $GLOBALS['LANG']->getLL('refresh') . '" />';
     $actionLinks .= '<input type="submit" name="_previewLink" value="' . $GLOBALS['LANG']->getLL('previewLink') . '" />';
     $actionLinks .= '<input type="checkbox" class="checkbox" name="_previewLink_wholeWorkspace" id="_previewLink_wholeWorkspace" value="1" /><label for="_previewLink_wholeWorkspace">' . $GLOBALS['LANG']->getLL('allowPreviewOfWholeWorkspace') . '</label>';
     $actionLinks .= $this->displayWorkspaceOverview_allStageCmd();
     if ($actionLinks || count($errors)) {
         $this->content .= $this->doc->section('', $actionLinks . (count($errors) ? '<h3>' . $GLOABLS['LANG']->getLL('errors') . '</h3><br />' . implode('<br />', $errors) . '<hr />' : ''), 0, 1);
     }
     if (t3lib_div::_POST('_previewLink')) {
         $ttlHours = intval($GLOBALS['BE_USER']->getTSConfigVal('options.workspaces.previewLinkTTLHours'));
         $ttlHours = $ttlHours ? $ttlHours : 24 * 2;
         if (t3lib_div::_POST('_previewLink_wholeWorkspace')) {
             $previewUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . 'index.php?ADMCMD_prev=' . t3lib_BEfunc::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'], 60 * 60 * $ttlHours, $GLOBALS['BE_USER']->workspace) . '&id=' . intval($this->id);
         } else {
             $params = 'id=' . $this->id . '&ADMCMD_previewWS=' . $GLOBALS['BE_USER']->workspace;
             $previewUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . 'index.php?ADMCMD_prev=' . t3lib_BEfunc::compilePreviewKeyword($params, $GLOBALS['BE_USER']->user['uid'], 60 * 60 * $ttlHours);
         }
         $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('previewUrl'), sprintf($GLOBALS['LANG']->getLL('previewInstruction'), $ttlHours) . '<br /><br /><a target="_blank" href="' . htmlspecialchars($previewUrl) . '">' . $previewUrl . '</a>', 0, 1);
     }
     // Output overview content:
     $this->content .= $this->doc->spacer(15);
     $this->content .= $this->doc->section($this->details ? $GLOBALS['LANG']->getLL('versionDetails') : $GLOBALS['LANG']->getLL('wsManagement'), $WSoverview, 0, 1);
 }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:46,代码来源:index.php

示例4: moduleContent_publish

    /**
     * Rendering the content for the publish and review panel in the workspace manager
     *
     * @return	string		HTML content
     */
    function moduleContent_publish()
    {
        global $LANG;
        // Initialize:
        $content = '';
        $details = t3lib_div::_GP('details');
        // Create additional menus:
        $menu = '';
        if ($GLOBALS['BE_USER']->workspace === 0) {
            $menu .= t3lib_BEfunc::getFuncMenu(0, 'SET[filter]', $this->MOD_SETTINGS['filter'], $this->MOD_MENU['filter']);
            $menu .= t3lib_BEfunc::getFuncMenu(0, 'SET[display]', $this->MOD_SETTINGS['display'], $this->MOD_MENU['display']);
        }
        $menu .= t3lib_BEfunc::getFuncMenu(0, 'SET[diff]', $this->MOD_SETTINGS['diff'], $this->MOD_MENU['diff']);
        if ($GLOBALS['BE_USER']->workspace !== 0) {
            $menu .= t3lib_BEfunc::getFuncCheck(0, 'SET[expandSubElements]', $this->MOD_SETTINGS['expandSubElements'], '', '', 'id="checkExpandSubElements"') . ' <label for="checkExpandSubElements">' . $LANG->getLL('label_showsubelements') . '</label> ';
        }
        // Create header:
        $title = '';
        $description = '';
        switch ($GLOBALS['BE_USER']->workspace) {
            case 0:
                $title = t3lib_iconWorks::getIconImage('sys_workspace', array(), $this->doc->backPath, ' align="top"') . '[' . $LANG->getLL('shortcut_onlineWS') . ']';
                $description = $LANG->getLL('workspace_description_live');
                break;
            case -1:
                $title = t3lib_iconWorks::getIconImage('sys_workspace', array(), $this->doc->backPath, ' align="top"') . '[' . $LANG->getLL('shortcut_offlineWS') . ']';
                $description = $LANG->getLL('workspace_description_draft');
                break;
            case -99:
                $title = $this->doc->icons(3) . '[' . $LANG->getLL('shortcut_noWSfound') . ']';
                $description = $LANG->getLL('workspace_description_no_access');
                break;
            default:
                $title = t3lib_iconWorks::getIconImage('sys_workspace', $GLOBALS['BE_USER']->workspaceRec, $this->doc->backPath, ' align="top"') . '[' . $GLOBALS['BE_USER']->workspace . '] ' . t3lib_BEfunc::getRecordTitle('sys_workspace', $GLOBALS['BE_USER']->workspaceRec, TRUE);
                $description = $GLOBALS['BE_USER']->workspaceRec['description'] ? htmlspecialchars($GLOBALS['BE_USER']->workspaceRec['description']) : '<em>[' . $LANG->getLL('shortcut_noWSfound') . ']</em>';
                break;
        }
        // Buttons for publish / swap:
        $actionLinks = '';
        if ($GLOBALS['BE_USER']->workspace !== 0) {
            if ($this->publishAccess) {
                $confirmation = $LANG->JScharCode($LANG->getLL($GLOBALS['BE_USER']->workspaceRec['publish_access'] & 1 ? 'submit_publish_workspace_confirmation_1' : 'submit_publish_workspace_confirmation_2'));
                $actionLinks .= '<input type="submit" name="_publish" value="' . $LANG->getLL('submit_publish_workspace') . '" onclick="if (confirm(' . $confirmation . ')) window.location.href=\'publish.php?swap=0\';return false"/>';
                if ($GLOBALS['BE_USER']->workspaceSwapAccess()) {
                    $confirmation = $LANG->JScharCode($LANG->getLL($GLOBALS['BE_USER']->workspaceRec['publish_access'] & 1 ? 'submit_swap_workspace_confirmation_1' : 'submit_swap_workspace_confirmation_2'));
                    $actionLinks .= '<input type="submit" name="_swap" value="' . $LANG->getLL('submit_swap_workspace') . '" onclick="if (confirm(' . $confirmation . ')) window.location.href=\'publish.php?swap=1\';return false ;" />';
                }
            } else {
                $actionLinks .= $this->doc->icons(1) . $LANG->getLL('no_publish_permission');
            }
            // Preview of workspace link
            if (t3lib_div::_POST('_previewLink')) {
                $ttlHours = intval($GLOBALS['BE_USER']->getTSConfigVal('options.workspaces.previewLinkTTLHours'));
                $ttlHours = $ttlHours ? $ttlHours : 24 * 2;
                $previewUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . 'index.php?ADMCMD_prev=' . t3lib_BEfunc::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'], 60 * 60 * $ttlHours, $GLOBALS['BE_USER']->workspace) . '&id=' . intval($GLOBALS['BE_USER']->workspaceRec['db_mountpoints']);
                $actionLinks .= '<br />Any user can browse the workspace frontend using this link for the next ' . $ttlHours . ' hours (does not require backend login):<br /><br /><a target="_blank" href="' . htmlspecialchars($previewUrl) . '">' . $previewUrl . '</a>';
            } else {
                $actionLinks .= '<input type="submit" name="_previewLink" value="Generate Workspace Preview Link" />';
            }
        }
        $wsAccess = $GLOBALS['BE_USER']->checkWorkspace($GLOBALS['BE_USER']->workspaceRec);
        // Add header to content variable:
        $content = '
		<table border="0" cellpadding="0" cellspacing="0" id="t3-user-ws-wsinfotable" class="t3-table t3-table-info">
			<tr>
				<td class="t3-col-header" nowrap="nowrap">' . $LANG->getLL('label_workspace') . '&nbsp;</th>
				<td nowrap="nowrap">' . $title . '</td>
			</tr>
			<tr>
				<td class="t3-col-header" nowrap="nowrap">' . $LANG->getLL('label_description') . '&nbsp;</td>
				<td>' . $description . '</td>
			</tr>' . ($GLOBALS['BE_USER']->workspace != -99 && !$details ? '
			<tr>
				<td class="t3-col-header" nowrap="nowrap">' . $LANG->getLL('label_options') . '&nbsp;</td>
				<td>' . $menu . $actionLinks . '</td>
			</tr>
			<tr>
				<td class="t3-col-header" nowrap="nowrap">' . $LANG->getLL('label_status') . '&nbsp;</td>
				<td>' . $LANG->getLL('label_access_level') . ' ' . $GLOBALS['LANG']->getLL('workspace_list_access_' . $wsAccess['_ACCESS']) . '</td>
			</tr>' : '') . '
		</table>
		<br />
		';
        // Add publishing and review overview:
        if ($GLOBALS['BE_USER']->workspace != -99) {
            if ($details) {
                $content .= $this->displayVersionDetails($details);
            } else {
                $content .= $this->displayWorkspaceOverview();
            }
            $content .= '<br />';
        }
        // Return content:
        return $content;
    }
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:100,代码来源:index.php


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