0
我需要一個Youtube縮略圖列表與embed
。我已經有了Tubepress,並且正在嘗試將它與Prestashop的Smarty模板集成在一起,但有些地方是錯誤的。PHP Tubepress親與Smarty,插件問題
我有一個初始化和正確的變量爲TPL:
{$searchvideo = $product->name|escape:'htmlall':'UTF-8'}
{searchvid}
$searchvideo
是產品名稱的字符串。 searchvid
是從function.searchvid.php
到Prestashop的插件目錄。
function.searchvid.php
:
<?php
function smarty_function_searchvid($params, $template) {
$tubepress_base_url = "http://domain.com/folder/tubepress_pro_2_2_9";
include "/home/folder/www/tubepress_pro_2_2_9/sys/classes/TubePressPro.class.php";
$searchvideo = $template->getTemplateVars("searchvideo");
print TubePressPro::getHtmlForHead(true);
print TubePressPro::getHtmlForShortcode('mode="tag" tagValue="intitle:'. $searchvideo .'" thumbHeight="100" thumbWidth="100" embeddedHeight="325" embeddedWidth="534" embeddableOnly="true" resultsPerPage="5"');
}
?>
的問題是,頁面沒有我稱之爲{searchvid}
即使加載任何東西。任何幫助,將不勝感激。