Forwarding to Weibo (phpcms, dedecms)

Source: Internet
Author: User
Tags php tutorial

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>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.