[英]New ads module function error when clicking to hide ad and to display original content (the video player)
我最近在視頻上方添加了廣告框; 我的關閉廣告按鈕有問題,倒計時完成加載並點擊關閉廣告框后,顯示“無效的視頻ID”錯誤。
這是“ PlayVideoNow”功能; 我必須在哪里進行編輯才能使其正確加載視頻? 其他信息:
CMS:phpmelody 1.6.7技術:php / smarty
謝謝。任何建議將不勝感激。 回顧孔腳本: 從此處獲取腳本
function PlayVideoNow()
{
$('#ImgCloseAd').hide();
$('#video-wrapper').css('background' , 'none');
$('#video-wrapper').css('padding-top' , '0px');
$('#BtnPlayNow input[name="closeAd"]').hide();
$.ajax({
type: "GET",
url: MELODYURL2 + "/ajax.php",
dataType: "html",
data: {
"p": "video",
"do": "getplayer",
"vid": "{/literal}{$preroll_ad_player_uniq_id}{literal}",
"aid": "{/literal}{$preroll_ad_data.id}{literal}",
"player": "{/literal}{$preroll_ad_player_page}{literal}"
},
dataType: "html",
success: function(data){
$('#preroll_placeholder').replaceWith(data);
}
});
}
.tpl
文件中的{}
字段將自動解析php變量。
因此,在.tpl
文件中,您無需添加文字標簽。
你試一試:
"vid": "{$preroll_ad_player_uniq_id}",
"aid": "{$preroll_ad_data.id}",
"player": "{$preroll_ad_player_page}"
文字標簽的用法是告訴smarty不要在{}
字段中進行解析
"{literal}{$preroll_ad_player_uniq_id}{/literal}"
// equal to "{$preroll_ad_player_uniq_id}" string, not variable
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.