Авторизация
Логин:
Пароль:
Забыли свой пароль?
Войти как пользователь:
Войти как пользователь
Вы можете войти на сайт, если вы зарегистрированы на одном из этих сервисов:
Подписка на рассылку
Реклама
11 лет сервису WM.mk.ua - WebMoney Exchange in Nikolaev
Расскажи о нас


Пользовательские движки шаблонизации

02.10.2009

Пример подключения движка Smarty:

В массиве $arCustomTemplateEngines регистрируется движок Smarty:

global $arCustomTemplateEngines;
$
arCustomTemplateEngines = array(
   "smarty" => array(
      "templateExt" => array("tpl"),
      "function" => "SmartyEngine"
   ),
);

В функции SmartyEngine инициализируются параметры движка в соответствии с требованиями Smarty (см. систему помощи Smarty). Далее в Smarty передаются переменные результатов работы компонента, входных параметров, языковых сообщений и т.д., а в конце вызывается метод обработки и показа шаблона Smarty:

function SmartyEngine($templateFile, $arResult, $arParams, $arLangMessages, $templateFolder, $parentTemplateFolder, $template)
{
   if (!defined("SMARTY_DIR"))
      define("SMARTY_DIR", "<
абсолютныйпутькдвижку Smarty>/libs/");

   require_once( '<
абсолютныйпутькдвижку Smarty>/libs/Smarty.class.php' );

   $smarty = new Smarty;

   $smarty->compile_dir = "<
абсолютныйпутькдвижку Smarty>/templates_c/";
   $smarty->config_dir = "<
абсолютныйпутькдвижку Smarty>/configs/";
   $smarty->template_dir = "<
абсолютныйпутькдвижку Smarty>/templates/";
   $smarty->cache_dir = "<
абсолютныйпутькдвижку Smarty>/cache/";

   $smarty->compile_check = true;
   $smarty->debugging = false;

   $smarty->assign("arResult", $arResult);
   $smarty->assign("arParams", $arParams);
   $smarty->assign("MESS", $arLangMessages);
   $smarty->assign("templateFolder", $templateFolder);
   $smarty->assign("parentTemplateFolder", $parentTemplateFolder);

   $smarty->display( $_SERVER["DOCUMENT_ROOT"].$templateFile );
}

В строке "<абсолютныйпутькдвижку Smarty>" указывается абсолютный путь к движку Smarty.


Страница 2 - 2 из 3
Начало | Пред. | 1 2 3 | След. | Конец


Количество показов: 81659110
Рейтинг:  3.3

Возврат к списку

(Голосов: 1, Рейтинг: 3.3)

Материалы по теме:


Страницы: Пред. 1 ... 3521 3522 3523 3524 3525 ... 3563 След.
0  
Glennsob
informative post spy-casino
Имя Цитировать 0  
0  
MichaelNed
Имя Цитировать 0  
0  
DarrenTouse
Elon Musk stood next to President Donald Trump in the Oval Office on Friday, but the physical proximity belied a growing philosophical divide between two of the world's most powerful men, resulting in the tech mogul's abrupt announcement that he is departing Washington — without having achieved his goal of decimating the federal government.
kraken33
Trump took a more charitable view of Musk's tenure during a sprawling news conference in which he also declined to rule out pardoning Sean "Diddy" Combs, who is on trial on charges of sex trafficking and other alleged crimes; said he dislikes "the concept" of former first lady Jill Biden being forced to testify before Congress about her husband's mental fitness; and predicted again that Iran is on the cusp of making a deal that would suspend its pursuit of nuclear weapons.
kra33 СЃСЃ
In a battle of plutocrats against populists, Bannon, a longtime advocate for reducing the size and scope of government, found Musk's methods and policy preferences to be sharply at odds with those of the MAGA movement. So, ultimately, did Musk, who broke with Trump repeatedly on agenda items as narrow as limiting visas for foreign workers and as broad as Trump's signature "big beautiful" budget bill — which Musk belittled for threatening to add trillions of dollars to the national debt.

“I was, like, disappointed to see the massive spending bill, frankly, which increases the budget deficit, not just decrease it, and undermines the work that the DOGE team is doing," Musk said in an interview with CBS' "Sunday Morning," which will air this weekend.
kra33 at
"I love the gold on the ceiling," he said.

Musk has argued that inertia throttled his efforts to reduce government spending — a conclusion that raises questions about whether he was naive about the challenge of the mission he undertook.

“The federal bureaucracy situation is much worse than I realized,” he told The Washington Post this week. “I thought there were problems, but it sure is an uphill battle trying to improve things in D.C., to say the least.”

On Friday, he drew an implicit parallel between American government and the Nazi regime that committed a genocide, invoking the "banality of evil" that Hannah Arendt used to describe the atrocities in Germany.
kra33

https://kra--33---at.ru
Имя Цитировать 0  
0  
Alfredjek
Имя Цитировать 0  
0  
MichaelNuddy
read this  
spy-casino 15 €
Имя Цитировать 0  
0  
GlennAnevy
Имя Цитировать 0  
0  
Glennpiela
see this page  
spy-casino 50 free spins
Имя Цитировать 0  
0  
Michaelsueks
Имя Цитировать 0  
0  
Jamesmib
ссылка на сайт https://beepbeepcasino.ru/zerkalo
Имя Цитировать 0  
0  
CharlieRag
Имя Цитировать 0  
0  
GlennAnevy
Имя Цитировать 0  
0  
MelvinMor
Имя Цитировать 0  
0  
Glennsob
Имя Цитировать 0  
0  
Michaelgaf
посетить сайт https://beepbeepcasino.ru/
Имя Цитировать 0  
0  
Alfredanymn
взгляните на сайте здесь https://marvilcasino.xyz/bonusy/
Имя Цитировать 0  
0  
Michaelsueks
посмотреть в этом разделе https://beepbeepcasino.ru/zerkalo
Имя Цитировать 0  
0  
Michaelsueks
???????, ????? ????????? https://beepbeepcasino.ru/zerkalo
Имя Цитировать 0  
0  
Jamesmib
Имя Цитировать 0  
0  
MichaelLib
browse around this website  
spy casino no deposit bonus
Имя Цитировать 0  
0  
Alfredmoite
Имя Цитировать 0  
0  
MichaelGow
helpful resources  
spy-casino 15 €
Имя Цитировать 0  
0  
MichaelGow
click resources  
spy-casino 15 €
Имя Цитировать 0  
0  
Alfredanymn
Имя Цитировать 0  
0  
Glennpiela
Имя Цитировать 0  
0  
JamesChott
Имя Цитировать 0  
Страницы: Пред. 1 ... 3521 3522 3523 3524 3525 ... 3563 След.
Текст сообщения*
Загрузить файл или картинкуПеретащить с помощью Drag'n'drop
Перетащите файлы
Ничего не найдено
Отправить Отменить
Защита от автоматических сообщений
 
Публикация статей
На данной странице представлены элементы инфоблока статьи, относящиеся к типу Публикации. Статьи опубликованы на странице с помощью комплексного компонента Новостной раздел с указанием параметров инфоблока Статьи. При создании каждой статьи был использован тег <break />, который позволяет осуществить разделение статьи на страницы. В публичном разделе такая статья будет представлена в виде нескольких страниц в зависимости от количества тегов <break />

liqpay webmoney privat24 visa mastercard
2002-2017 © InKey
All rights reserved