Forward to Weibo (php Tutorial cms, dedecms)
Dedecms modification method:
<A href = "webpage effect: void (0)" onclick = "posttowb (); "class =" tmblog "> </a>
<Script type = "text/javascript">
Function posttowb (){
Var _ t = encodeuri ('fcbao. com-[{dede: field. title/}] {dede: field. description} '); // modify the fallen leaves, that is, add the title and summary tags in cms.
Var _ url = encodeuricomponent (document. location );
Var _ appkey = encodeuri ("appkey"); // The appkey you obtained from Tencent
Var _ pic = encodeuri (''); // (for example, var _ pic = 'image url1 | Image url2 | Image url3 ...)
Var _ site = ''; // your website address
Var _ u = 'http: // v.t.qq.com/#/developer.php? Title = '+ _ t +' & url = '+ _ url +' & appkey = '+ _ appkey +' & site = '+ _ site +' & pic = '+ _ pic;
Window. open (_ u, '', 'width = 700, height = 680, top = 0, left = 0, toolbar = no, menubar = no, scrollbars = no, location = yes, resizable = no, status = no ');
}
</Script>
Phpcms forwards code to Weibo
<A href = "javascript: void (0)" onclick = "posttowb (); "class =" tmblog "> </a> <script type =" text/javascript ">
Function posttowb (){
Var tt = document. getelementbyid ('T1'); // t1 is changed to the id of the div outside the content page title or the id of h1;
Var dd = document. getelementbyid ('d1 '); // change "d1" to the id of the div that displays the abstract under the content page title;
Var pre = 'site name or website domain name'; // if it is a website domain name, do not add http: // otherwise it will be converted by the Weibo url
Var _ t = encodeuri (pre + '-[' + tt + ']' + dd); // You do not need to modify this sentence.
Var _ url = encodeuricomponent (document. location );
Var _ appkey = encodeuri ("appkey"); // The appkey you obtained from Tencent
Var _ pic = encodeuri (''); // (for example, var _ pic = 'image url1 | Image url2 | Image url3 ...)
Var _ site = ''; // your website address
Var _ u = 'http: // v.t.qq.com/#/developer.php? Title = '+ _ t +' & url = '+ _ url +' & appkey = '+ _ appkey +' & site = '+ _ site +' & pic = '+ _ pic;
Window. open (_ u, '', 'width = 700, height = 680, top = 0, left = 0, toolbar = no, menubar = no, scrollbars = no, location = yes, resizable = no, status = no ');
}
</Script>