0

が付いたYoutubeサムネイルリストが必要embedです。すでにTubepressを入手していて、PrestashopのSmartyテンプレートと統合しようとしていますが、何か問題があります。

初期化された正しい変数をtplに入れました:

{$searchvideo = $product->name|escape:'htmlall':'UTF-8'} 
{searchvid} 

$searchvideo製品名の文字列です。Prestashopのプラグインディレクトリからですsearchvidfunction.searchvid.php

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}です。どんな助けでもいただければ幸いです。

4

1 に答える 1

0

プラグイン関数は、出力するのではなく、文字列を返すことになっています。あなたはそれを試しましたか?そのチューブプレスクラスは適切にロードされていますか?

于 2012-03-02T18:19:34.410 に答える