Feed on
Posts
Comments
Email訂閱

第一層為辛卯行春。
第二層為各縣市,顯示各縣市所屬景點之推薦匯總結果。

//顯示推薦景點彙總
function rendergfcrecommendarea(recommendtopicid, ht, layername)
{
var skin = initialfcrecommendareaskin(ht+’推薦景點’);
layername = layername || “div-topic-recommendarea”;

google.friendconnect.container.renderOpenSocialGadget(
{ id: layername,
url:’http://www.google.com/friendconnect/gadgets/recommended_pages.xml’,
site: ‘10224843841355873816’,
‘view-params’:{“docId”:”recommendedTopic”+recommendtopicid}
},
skin);

};

第三層為推薦景點,可由網友新增景點,並由網友互相按推薦

//顯示景點推薦按鈕
function rendergfcrecommendbutton(topicid, recommendtopicid, dct, ht)
{
var skin = initialfcrecommendbuttonskin(‘我推薦到’+dct+’!’, ht+’何處去?’);

google.friendconnect.container.renderOpenSocialGadget(
{ id: ‘div-topic-recommendbutton’,
url:’http://www.google.com/friendconnect/gadgets/recommended_pages.xml’,
height: 73,
site: ‘10224843841355873816’,
‘view-params’:{“pageUrl”:(“http://www.waytogo.cc/topic_”+topicid),”pageTitle”:dct,”docId”:(“recommendedTopic”+recommendtopicid)}
},
skin);

};

顯示主題時(topic),視推薦區或推薦按鈕區塊(div)是否存在,來決定是否顯示推薦區或推薦按鈕

//show recommend button,2010.1.31, because the div was created at rumtime(showtopic.inc.php),there we must render it again anyway
var recommendbtn = document.getElementById(‘div-topic-recommendbutton’);
if(recommendbtn != null)
{
var topicid = recommendbtn.getAttribute(“topicid”);
var recommendtopic = recommendbtn.getAttribute(“recommendtopicid”);
var dct= recommendbtn.getAttribute(“dct”);
var ht= recommendbtn.getAttribute(“ht”);
rendergfcrecommendbutton(topicid, recommendtopic, dct, ht);
}

//show recommend area
var recommendarea = document.getElementById(‘div-topic-recommendarea’);
if(recommendarea != null)
{
var recommendtopic = recommendarea.getAttribute(“recommendtopicid”);
var ht= recommendarea.getAttribute(“ht”);
rendergfcrecommendarea(recommendtopic, ht);
}

相關文章

留言區