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


PHP Templates::getPreviewPath方法代码示例

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


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

示例1: explode

     $parentwindow = $this->params['wid'];
     // Check if we really got sane values
     if ($template != 'template') {
         $templatePreview = '';
         $templateInfo = $templateMgr->getTemplate($template);
         $koala->callJSFunction('Koala.windows[\'wid_' . $parentwindow . '\'].refreshMailingTemplateRoot', $template, $templateInfo['NAME']);
     }
     break;
 case 'setMailingConfigTemplate':
     $template = $this->params['templateId'];
     $parentwindow = $this->params['wid'];
     // Check if we really got sane values
     if ($template != 'template') {
         $templatePreview = '';
         $templateInfo = $templateMgr->getTemplate($template);
         $templateInfo['PREVIEWPATH'] = $templateMgr->getPreviewPath($template);
         if ($templateInfo['FILE'] > 0) {
             $templatePreview = $templateInfo['PREVIEWPATH'];
         }
         $koala->callJSFunction('Koala.windows[\'wid_' . $parentwindow . '\'].refreshMailingTemplate', $templateInfo['NAME'], $templateInfo['FILENAME'], $template, $templatePreview);
     }
     break;
 case 'saveMailingVersion':
     // Cannot use new style of parameters here (function is called by a custom-attribute event - and therefore does not know about named parameters)
     $data = explode('-', $this->reponsedata['null']->yg_id);
     $wid = $data[2];
     $mailingId = $data[0];
     $mailing = $mailingMgr->getMailing($mailingId);
     $new_version = $mailing->newVersion();
     $koala->queueScript('Koala.windows[\'wid_' . $wid . '\'].tabs.select(Koala.windows[\'wid_' . $wid . '\'].tabs.selected, Koala.windows[\'wid_' . $wid . '\'].tabs.params);');
     break;
开发者ID:nrueckmann,项目名称:yeager,代码行数:31,代码来源:mailings.php

示例2: sanitize

<?php

$siteID = $this->request->parameters["site"];
$pageID = $this->request->parameters["page"];
$action = $this->request->parameters["action"];
$template = (int) sanitize($this->request->parameters["template"]);
$templateMgr = new Templates();
if ($template == 0 && $siteID && $pageID) {
    if ($siteID == "mailing") {
        $mailingMgr = new MailingMgr();
        $mailing = $mailingMgr->getMailing($pageID);
        $mailingInfo = $mailing->get();
        $template = $mailingInfo["TEMPLATEID"];
    } else {
        $pageMgr = new PageMgr($siteID);
        $page = $pageMgr->getPage($pageID);
        $pageInfo = $page->get();
        $template = $pageInfo["TEMPLATEID"];
    }
} else {
    $template = (int) sanitize($this->request->parameters["template"]);
}
if ($template != 0) {
    $templateInfo = $templateMgr->getTemplate($template);
    $templateInfo["PREVIEWPATH"] = $templateMgr->getPreviewPath($template);
} else {
    $templateInfo = false;
}
$smarty->assign("templateInfo", $templateInfo);
$smarty->assign("mode", sanitize($this->request->parameters["mode"]));
$smarty->display("file:" . getrealpath($this->page_template));
开发者ID:nrueckmann,项目名称:yeager,代码行数:31,代码来源:template_info.php

示例3: explode

$ygid = $this->request->parameters['yg_id'];
$refresh = $this->request->parameters['refresh'];
$initload = $this->request->parameters['initload'];
$siteID = explode('-', $ygid);
$siteID = $siteID[0];
$siteMgr = new Sites();
$siteinfo = $siteMgr->get($siteID);
if ($siteinfo['FAVICON']) {
    // Favicon is set, get all information about file
    $file = sFileMgr()->getFile($siteinfo['FAVICON']);
    if ($file) {
        $favicon = $file->get();
        $smarty->assign('favicon', $favicon);
    }
}
$templateMgr = new Templates();
$templateInfo = $templateMgr->getTemplate($siteinfo['DEFAULTTEMPLATE']);
$templateInfo['PREVIEWPATH'] = $templateMgr->getPreviewPath($siteinfo['DEFAULTTEMPLATE']);
if ($siteinfo['TEMPLATEROOT']) {
    $templaterootinfo = $templateMgr->getTemplate($siteinfo['TEMPLATEROOT']);
}
$smarty->assign('object', $siteID);
$smarty->assign('siteinfo', $siteinfo);
$smarty->assign('templateInfo', $templateInfo);
$smarty->assign('templaterootinfo', $templaterootinfo);
$smarty->assign('mode', 1);
$smarty->assign('refresh', $refresh);
$smarty->assign('initload', $initload);
$smarty->assign('win_no', $this->request->parameters['win_no']);
$smarty->display('file:' . $this->page_template);
开发者ID:nrueckmann,项目名称:yeager,代码行数:30,代码来源:site_config.php


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