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


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

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 | След. | Конец


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

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

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

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


Страницы: Пред. 1 ... 4616 4617 4618 4619 4620 ... 4673 След.
0  
LloydErymn
Имя Цитировать 0  
0  
Brettpurgy
Имя Цитировать 0  
0  
LloydErymn
Имя Цитировать 0  
0  
BrettGreks
this content Darkweb Polska
Имя Цитировать 0  
0  
MichaelDaf
important source Dostep do darknetu Polska
Имя Цитировать 0  
0  
Brettpurgy
go to this website Rynek Tor Polska
Имя Цитировать 0  
0  
LloydRus
Имя Цитировать 0  
0  
LloydTer
visit this web-site Polskie forum darknet
Имя Цитировать 0  
0  
RussellGywow
Имя Цитировать 0  
0  
Brettpurgy
click to find out more Spolecznosc darkweb Polska
Имя Цитировать 0  
0  
Call Girls in Lahore

We are the best call girls service provider in Lahore. We have a large collection of beautiful, young and talented Call Girls in Lahore who provide amazing Call Girl` services to our clients. All our girls are well-educated and highly talented. They know how to satisfy their clients and provide them with utmost satisfaction.

Имя Цитировать 0  
0  
College call girls in Lahore

Hire Our call girl service in Lahore and get a chance to show your skills and bedroom nature. You can seduce the College call girls in Lahore with your skills. We provide you with overnight services with our Call Girls.

Имя Цитировать 0  
0  
LloydRus
his comment is here Polskie spolecznosci darknet
Имя Цитировать 0  
0  
LloydRus
Имя Цитировать 0  
0  
Brettpurgy
YOURURL.com Darkweb Polska
Имя Цитировать 0  
0  
LloydTer
take a look at the site here Polskojezyczne forum darknet
Имя Цитировать 0  
0  
Brettpurgy
my latest blog post Polskie fora darkweb
Имя Цитировать 0  
0  
LloydTer
more info here Forum Tor dla Polakow
Имя Цитировать 0  
0  
Brettpurgy
read the article Wiadomosci darknet Polska
Имя Цитировать 0  
0  
Russellinjus
Имя Цитировать 0  
0  
Karachi Call Girl services

We offer Karachi Call Girl services, such as pretty Russian girls in Karachi. You can have our most stunningly beautiful, sexiest, and amazing Call Girl. I promise that we will be safe because you are sure of our most amazing sexual experience and won't use privacy as an excuse. If you are under 18, you can still use our hot sexual services, but you are not allowed to look at our website at all. You are welcome at any time, even at midnight or late at night, because we are open 24 hours a day, seven days a week for adults.

Имя Цитировать 0  
0  
Robertmaf
Имя Цитировать 0  
0  
BrettRat
Имя Цитировать 0  
0  
Karachi Call Girls

You've come to the right place if you want to find a great Call Girl in that area. You can now hire a woman from there. Our Karachi Call Girls have gone to good schools and learned a lot. There are no whores or independent workers among them; they are smart women from wonderful families. If you hire a woman from that place, you will never be sorry.

Имя Цитировать 0  
0  
Russellinjus
Имя Цитировать 0  
Страницы: Пред. 1 ... 4616 4617 4618 4619 4620 ... 4673 След.
Текст сообщения*
Загрузить файл или картинкуПеретащить с помощью Drag'n'drop
Перетащите файлы
Ничего не найдено
Отправить Отменить
Защита от автоматических сообщений
 
Публикация статей
На данной странице представлены элементы инфоблока статьи, относящиеся к типу Публикации. Статьи опубликованы на странице с помощью комплексного компонента Новостной раздел с указанием параметров инфоблока Статьи. При создании каждой статьи был использован тег <break />, который позволяет осуществить разделение статьи на страницы. В публичном разделе такая статья будет представлена в виде нескольких страниц в зависимости от количества тегов <break />

1QH.net - Unique Quality Hosting.network
liqpay webmoney privat24 visa mastercard
2002-2017 © InKey
All rights reserved