本文整理汇总了PHP中Plugin::GetTemplatePath方法的典型用法代码示例。如果您正苦于以下问题:PHP Plugin::GetTemplatePath方法的具体用法?PHP Plugin::GetTemplatePath怎么用?PHP Plugin::GetTemplatePath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plugin
的用法示例。
在下文中一共展示了Plugin::GetTemplatePath方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: InitAction
public function InitAction()
{
/**
* Подключаем JS
*/
$this->Viewer_AppendScript(Plugin::GetTemplatePath(__CLASS__) . 'js/template.js');
}
示例2: ajaxGetBlogs
/**
* Возвращает html для вставки в блок сообществ
*/
protected function ajaxGetBlogs()
{
$this->Viewer_SetResponseAjax('json');
$sCatName = getRequest('blog_cat', '');
$sCatName = $sCatName == 'ALL' ? '' : $sCatName;
if ($sCatName) {
if (!($sCatName = $this->PluginCommunitycats_ModuleCategory_GetFullCategoryName($sCatName))) {
return '';
}
}
//Исходим из того, что у нас двухуровненвые каталоги
$aCatName = explode(':', $sCatName);
array_pop($aCatName);
$sTemplateName = 'actions/' . strtolower(implode('_', $aCatName)) . 'blogs.tpl';
//загоняем данные в фильтр
if ($sCatName) {
$aFilter = array('beginLike' => array('blog_cat' => $sCatName));
} else {
$aFilter = array();
}
$aFilter['in'] = array('blog_type' => array('open', 'close'));
$aOrder = array('blog_count_user' => 'desc');
$aLimit = array('iPage' => 1, 'iElementsPerPage' => Config::Get('plugin.communitycats.blockBlogCount'));
$aBlogsCat = $this->PluginCommunitycats_ModuleCategory_GetBlogsByFilter($aFilter, $aOrder, $aLimit, false);
$oViewerLocal = $this->Viewer_GetLocalViewer();
$oViewerLocal->Assign('aBlogsCatatalog', $aBlogsCat);
$this->Viewer_AssignAjax('sToggleText', $oViewerLocal->Fetch(Plugin::GetTemplatePath(__CLASS__) . $sTemplateName));
}
示例3: Init
public function Init()
{
$this->oUserCurrent = $this->User_GetUserCurrent();
$this->Viewer_AddMenu('receptiondesk', Plugin::GetTemplatePath(__CLASS__) . 'menu.receptiondesk.tpl');
$this->Viewer_Assign('sReceptiondeskTemplatePath', Plugin::GetTemplatePath(__CLASS__));
$this->Viewer_AddHtmlTitle($this->Lang_Get('plugin.receptiondesk.receptiondesk_receptiondesk'));
}
示例4: ProfileView
/**
* Add ignore button to user profile
*
* @param array $aData
*
* @return string
*/
public function ProfileView($aData)
{
/* @var $oUserProfile ModuleUser_EntityUser */
$oUserProfile = $aData['oUserProfile'];
/* @var $oUserCurrent ModuleUser_EntityUser */
$oUserCurrent = $this->User_GetUserCurrent();
if ($oUserCurrent) {
$aForbidIgnore = $this->User_GetForbidIgnoredUsers();
if (in_array($oUserProfile->getId(), $aForbidIgnore)) {
$this->Viewer_Assign('bForbidIgnore', true);
} else {
if ($oUserCurrent->getId() != $oUserProfile->getId()) {
$bIgnoredTopics = $this->User_IsUserIgnoredByUser($oUserCurrent->getId(), $oUserProfile->getId(), PluginIgnore_ModuleUser::TYPE_IGNORE_TOPICS);
$bIgnoredComments = $this->User_IsUserIgnoredByUser($oUserCurrent->getId(), $oUserProfile->getId(), PluginIgnore_ModuleUser::TYPE_IGNORE_COMMENTS);
$this->Viewer_Assign('bIgnoredTopics', $bIgnoredTopics);
$this->Viewer_Assign('bIgnoredComments', $bIgnoredComments);
}
}
$aUserBlacklist = $this->Talk_GetBlacklistByUserId($oUserCurrent->getId());
if (isset($aUserBlacklist[$oUserProfile->getId()])) {
$bIgnoredTalks = 1;
} else {
$bIgnoredTalks = 0;
}
$this->Viewer_Assign('bIgnoredTalks', $bIgnoredTalks);
return $this->Viewer_Fetch(Plugin::GetTemplatePath(__CLASS__) . 'profile_ignore.tpl');
}
}
示例5: BodyBegin
public function BodyBegin()
{
if (Config::Get('plugin.popupinfo.Only_Registered_Users_Can_See_Info_Tips') and !$this->User_IsAuthorization()) {
return false;
}
return $this->Viewer_Fetch(Plugin::GetTemplatePath(__CLASS__) . 'body_begin.tpl');
}
示例6: InsertSendtofriendTpl
/**
* Выводим HTML
*
*/
public function InsertSendtofriendTpl()
{
if ($this->User_IsAuthorization()) {
return $this->Viewer_Fetch(Plugin::GetTemplatePath(__CLASS__) . 'sendtofriend.tpl');
}
return '';
}
示例7: sendCastNotifyToUser
protected function sendCastNotifyToUser($sTarget, $oTarget, $oParentTarget, $oUser)
{
if (!$this->oMapper->castExist($sTarget, $oTarget->getId(), $oUser->getId())) {
$this->oUserCurrent = $this->User_GetUserCurrent();
$oViewerLocal = $this->Viewer_GetLocalViewer();
$oViewerLocal->Assign('oUser', $this->oUserCurrent);
$oViewerLocal->Assign('oTarget', $oTarget);
$oViewerLocal->Assign('oParentTarget', $oParentTarget);
$oViewerLocal->Assign('oUserMarked', $oUser);
$aAssigin = array('oUser' => $this->oUserCurrent, 'oTarget' => $oTarget, 'oParentTarget' => $oParentTarget, 'oUserMarked' => $oUser);
$sTemplateName = 'notify.' . $sTarget . '.tpl';
$sLangDir = Plugin::GetTemplatePath('castuser') . 'notify/' . $this->Lang_GetLang();
if (is_dir($sLangDir)) {
$sPath = $sLangDir . '/' . $sTemplateName;
} else {
$sPath = Plugin::GetTemplatePath('castuser') . 'notify/' . $this->Lang_GetLangDefault() . '/' . $sTemplateName;
}
$sText = $oViewerLocal->Fetch($sPath);
$aTitles = $this->Lang_Get('plugin.castuser.notify_title');
$sTitle = $aTitles[$sTarget];
$oTalk = $this->Talk_SendTalk($sTitle, $sText, $this->oUserCurrent, array($oUser), false, false);
$this->Notify_Send($oUser, $sTemplateName, $sTitle, $aAssigin, 'castuser');
$this->Talk_DeleteTalkUserByArray($oTalk->getId(), $this->oUserCurrent->getId());
$this->oMapper->saveExist($sTarget, $oTarget->getId(), $oUser->getId());
}
}
示例8: StreamEventAddTestimonial
public function StreamEventAddTestimonial($aParams = array())
{
if (isset($aParams['oStreamEvent'])) {
$this->Viewer_Assign('oStreamEvent', $aParams['oStreamEvent']);
return $this->Viewer_Fetch(Plugin::GetTemplatePath(__CLASS__) . 'event.add_testimonial.tpl');
}
}
示例9: InjectProfileLink
public function InjectProfileLink()
{
$sTemplatePath = Plugin::GetTemplatePath(__CLASS__) . 'inject_profile_link.tpl';
if (E::ModuleViewer()->TemplateExists($sTemplatePath)) {
return E::ModuleViewer()->Fetch($sTemplatePath);
}
}
示例10: Init
/**
* Инициализация плагина
*/
public function Init()
{
$this->Viewer_Assign("sTemplatePathEstheme", Plugin::GetTemplatePath(__CLASS__));
E::ModuleViewer()->AppendStyle(Plugin::GetTemplateDir(__CLASS__) . "assets/css/style.min.css");
E::ModuleViewer()->AppendScript(Plugin::GetTemplateDir(__CLASS__) . "assets/js/develop/jquery.color.js");
E::ModuleViewer()->AppendScript(Plugin::GetTemplateDir(__CLASS__) . "assets/js/develop/colorPicker.js");
E::ModuleViewer()->AppendScript(Plugin::GetTemplateDir(__CLASS__) . "assets/js/develop/esTheme.js");
}
示例11: Init
public function Init()
{
if (getRequest('set-theme', false, 'get') == 'on') {
// setcookie('theme',1,time()+60*60*24*30,Config::Get('sys.cookie.path'),Config::Get('sys.cookie.host'),false);
$this->Viewer_AppendStyle(Plugin::GetTemplatePath(__CLASS__) . "css/dark.css");
// Добавление своего CSS
}
}
示例12: InjectDoMany
public function InjectDoMany()
{
$oUserCurrent = $this->User_GetUserCurrent();
if ($oUserCurrent) {
$this->Viewer_Assign('sTWPTalkbell', rtrim(Plugin::GetTemplateWebPath('talkbell'), '/'));
return $this->Viewer_Fetch(Plugin::GetTemplatePath('talkbell') . 'window_message.tpl');
}
}
示例13: Init
/**
* Инициализация плагина
*
* @return void
*/
public function Init()
{
$this->Viewer_Assign("sTemplateWebPathLsgallery", Plugin::GetTemplateWebPath(__CLASS__));
$this->Viewer_Assign("sTemplatePathLsgallery", Plugin::GetTemplatePath(__CLASS__));
$this->Viewer_AppendStyle(Plugin::GetTemplateWebPath('lsgallery') . 'css/gallery-style.css');
$this->Viewer_AppendScript(Plugin::GetTemplateWebPath('lsgallery') . 'lib/jQuery/plugins/jquery.tools.min.js');
$this->Viewer_AppendScript(Plugin::GetTemplateWebPath('lsgallery') . 'js/common.js');
}
示例14: Init
public function Init()
{
$this->Viewer_AppendStyle(Plugin::GetTemplatePath(__CLASS__) . "css/style.css");
// Добавление своего CSS
$this->Viewer_AppendScript(Plugin::GetTemplatePath(__CLASS__) . "js/script.js");
// Добавление своего JS
//$this->Viewer_AddMenu('blog',Plugin::GetTemplatePath(__CLASS__).'menu.blog.tpl'); // например, задаем свой вид меню
}
示例15: InsertBlogosphereTpl
/**
* Выводим HTML
*
*/
public function InsertBlogosphereTpl()
{
$aConfig = PluginBlogosphere::getTimePeriod();
for ($iCurTime = $aConfig['timeStart']; $iCurTime < $aConfig['timeEnd']; $iCurTime += Config::Get('plugin.blogosphere.interval')) {
$aConfig['aTimeStamp'][] = $iCurTime;
}
$this->Viewer_Assign('aBlogosphere', $aConfig);
return $this->Viewer_Fetch(Plugin::GetTemplatePath(__CLASS__) . 'Blogosphere.tpl');
}