2011-04-09 4 views

답변

0

Smarty에는 plugins 하위 디렉토리가 있습니다. 거기에 스크립트를 던지면 거기에 플러그인이 있습니다.

당신이 수행하여 자신을 플러그인을 필요로 할 수 있습니다 귀하의 플러그인이 서로에 의존하는 경우 당신은 $smarty->plugins_dir[]

$smarty->plugins_dir[] = 'includes/my_smarty_plugins'; 

에 다른 디렉토리를 추가하여 해당 경로를 확장 할 수 있습니다

:

require_once $smarty->_get_plugin_filepath('function', 'html_options'); 

이는 것 function.html_options.php이라는 plugin_dir에 플러그인을로드하십시오.

+0

하지만 내 플러그인은'function'이 아니고'class'입니다. –

0

주 유식 폴더에 "플러그인"하위 디렉토리에 복사 및 붙여 넣기 테마, 파일 이름이 멋지의 최신 버전에서 function.filename.php

0

선도해야합니다, 당신은 플러그인 폴더를 추가하는 방법을 :

// Add a folder of plugins 
$smarty->addPluginsDir('./plugins_1/'); 

// Check what plugins folders are registered 
var_dump($smarty->getPluginsDir()); 

/* DUMP: 
array(2) { 
    [0]=>string() "./plugins/" 
    [1]=> string() "./plugins_1/" 
} 
*/ 

자세한 내용은 the addPluginsDir() documentation을 참조하십시오.

관련 문제