Авторизация
Логин:
Пароль:
Забыли свой пароль?
Войти как пользователь:
Войти как пользователь
Вы можете войти на сайт, если вы зарегистрированы на одном из этих сервисов:
Подписка на рассылку
Реклама
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 | След. | Конец


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

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

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

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


Страницы: Пред. 1 ... 2720 2721 2722 2723 2724 ... 2746 След.
0  
MichaelInozy
AquaSculpt weight loss is here to stay! With AquaSculpt capsules, you get fast AquaSculpt results thanks to natural AquaSculpt ingredients. No worries about AquaSculpt side effects—users confirm it in AquaSculpt reviews. Curious AquaSculpt how to use? It’s easy and effective. AquaSculpt where to buy? Visit https://aquasculpt.best and transform your body now!
Имя Цитировать 0  
0  
PingPap
dark web marketplaces  dark web markets
Имя Цитировать 0  
0  
Travismit
UnagiSwap is a cutting-edge decentralized exchange (DEX) that provides fast, secure, and transparent crypto trading. Designed for traders looking to swap digital assets efficiently without intermediaries, UnagiSwap offers low fees, deep liquidity, and seamless smart contract execution. Whether you're a casual trader or a professional investor, UnagiSwap’s non-custodial platform ensures full control over your assets in a decentralized environment. https://unagiswap.org
Имя Цитировать 0  
0  
FNDavidchirl
darknet links  dark web market
Имя Цитировать 0  
0  
Robertoccut
HyperDrive is transforming the way data is stored and managed through decentralized storage and blockchain hosting solutions. Built for security, scalability, and efficiency, HyperDrive enables businesses, developers, and blockchain projects to store and distribute data without relying on centralized servers. By leveraging Web3 technology and distributed networks, HyperDrive ensures reliable, censorship-resistant, and high-performance storage solutions for the digital era. https://hyperdrive.ink
Имя Цитировать 0  
0  
ShaneDer
Say hello to AquaSculpt—a game-changer in weight loss! These AquaSculpt capsules use natural AquaSculpt ingredients to shed pounds and boost confidence. No AquaSculpt side effects, just pure AquaSculpt results—see why in AquaSculpt reviews. Learn AquaSculpt how to use and join thousands who love it. AquaSculpt buy today at https://aquasculpt.lifestyle !
Имя Цитировать 0  
0  
KxyuTyday
darknet market lists  darkmarket
Имя Цитировать 0  
0  
KxyuTyday
dark web market urls  darknet links
Имя Цитировать 0  
0  
RabyVag
bitcoin dark web  darknet markets 2025
Имя Цитировать 0  
0  
ErnestSkype
http://canadianpharmacyaapd.com/# canada pharmacy online
п»їlegitimate online pharmacies india
Имя Цитировать 0  
0  
DonaldRah
dark web market list  darkmarket url
Имя Цитировать 0  
0  
MorganNains
mexican pharmacy acp: mexican pharmacy acp - mexican pharmacy acp
Имя Цитировать 0  
0  
Michaelzed
GUD Tech is at the forefront of blockchain innovation, providing secure, scalable, and efficient decentralized technology solutions. Whether you’re looking for blockchain infrastructure, smart contract development, or enterprise-grade decentralized applications, GUD Tech offers cutting-edge solutions to enhance security and efficiency. Designed for businesses and developers, GUD Tech ensures seamless integration of blockchain technology into real-world applications. https://gudchain.net
Имя Цитировать 0  
0  
DonaldRah
Имя Цитировать 0  
0  
Pingunisp
dark websites  darkmarket list
Имя Цитировать 0  
0  
ShaneNeigh
DEQ Finance is revolutionizing decentralized trading by offering a seamless, secure, and efficient crypto exchange experience. Built with cutting-edge blockchain technology, DEQ Finance provides traders with fast transaction speeds, deep liquidity, and a transparent trading environment. Whether you're a beginner or a professional trader, DEQ Finance delivers high-performance DeFi solutions tailored to modern trading needs. https://deq.li
Имя Цитировать 0  
0  
Tolikovemo
darknet websites  dark web sites
Имя Цитировать 0  
0  
Pingunisp
dark market url  darknet drug store
Имя Цитировать 0  
0  
ShaneDer
Cytonic is revolutionizing blockchain security with advanced cybersecurity solutions tailored for Web3 applications. By integrating decentralized encryption, AI-powered threat detection, and smart contract auditing, Cytonic ensures maximum protection against cyber threats. Whether you’re securing DeFi protocols, NFTs, or enterprise blockchain systems, Cytonic’s cutting-edge security technology provides the highest level of data integrity and protection. https://cytonic.cc
Имя Цитировать 0  
0  
RobertSeple
Nucleus Earn is revolutionizing DeFi staking and passive income generation by offering secure, high-yield crypto rewards. With smart contract-powered staking pools, Nucleus Earn allows users to earn rewards effortlessly while maintaining full control over their assets. Whether you're a beginner or an experienced investor, Nucleus Earn’s decentralized staking platform ensures transparency, security, and optimal returns in the fast-growing world of DeFi. https://nucleusearn.org
Имя Цитировать 0  
0  
FNDavidHaigo
darknet marketplace  dark market link
Имя Цитировать 0  
0  
WilliamIRPap
dark websites  darknet markets links
Имя Цитировать 0  
0  
JosephLox
Exponent Finance is redefining DeFi lending by providing secure, transparent, and high-yield investment solutions. Through smart contract-powered lending pools, Exponent Finance DeFi platform allows users to borrow and lend crypto assets with optimal efficiency and minimal risk. Whether you're looking to earn passive income through staking or access instant liquidity, Exponent Finance offers a decentralized, non-custodial, and user-friendly solution to meet all your financial goals in the crypto ecosystem. https://exponent.ink
Имя Цитировать 0  
0  
Kxyupen
darknet drug links  dark web marketplaces
Имя Цитировать 0  
0  
Shanekah
AquaSculpt weight loss is here to stay! With AquaSculpt capsules, you get fast AquaSculpt results thanks to natural AquaSculpt ingredients. No worries about AquaSculpt side effects—users confirm it in AquaSculpt reviews. Curious AquaSculpt how to use? It’s easy and effective. AquaSculpt where to buy? Visit https://aquasculpt.best and transform your body now!
Имя Цитировать 0  
Страницы: Пред. 1 ... 2720 2721 2722 2723 2724 ... 2746 След.
Текст сообщения*
Загрузить файл или картинкуПеретащить с помощью Drag'n'drop
Перетащите файлы
Ничего не найдено
Отправить Отменить
Защита от автоматических сообщений
 
Публикация статей
На данной странице представлены элементы инфоблока статьи, относящиеся к типу Публикации. Статьи опубликованы на странице с помощью комплексного компонента Новостной раздел с указанием параметров инфоблока Статьи. При создании каждой статьи был использован тег <break />, который позволяет осуществить разделение статьи на страницы. В публичном разделе такая статья будет представлена в виде нескольких страниц в зависимости от количества тегов <break />

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