DEDECMS Update article sync posted to Sina Weibo, dedecms Sina _php Tutorial

Source: Internet
Author: User
Tags cdata

DEDECMS Update article sync posted to Sina Weibo, Dedecms Sina


If in the website promotion process can use the good microblogging this tool, will give the website promotion work to bring the huge convenience. The following is an example of how to automatically sync website content to Sina Weibo with the Dede program.

In the Sina Weibo tool has an auto-related blog function, the use of this feature will be the site of the new release of content automatically synced to Sina blog. As shown in the following:

Before using this feature, you need to make an RSS feed of your website beforehand, and below take Dede as an example to explain how to make an RSS feed for your website.

Create a new feed.php file, as shown in the code below. After saving, upload this file to the root directory of your website.

 
  

  

Create a new feed.htm file, as shown in the code below. Upload this file to the Dede template directory.

  
 
   
 
    
  
    {dede:global.cfg_webname/} 
  
    {dede:global.cfg_basehost/} 
    
     {dede:global.cfg_description/}
     
    
     ZH-CN
     
    
     {dede:global.cfg_webname/}
     
    
     {dede:global.cfg_adminemail/}
     
  {dede:arclist row= ' col= ' 1 ' titlelen= ' orderby= ' pubdate '} 
     
      http://www.ijinfa.cn[field:arcurl/] 
   
     <! [Cdata[[field:title function= ' Html2text (@me) '/]]]>[field:writer/] 
     
      [field:typename/]
      
     
      [Field:pubdate function= ' strftime ("%a,%d%b%Y%h:%m:%s +0800", @me) '/]
      
     
      http://www.ijinfa.cn[field:arcurl/]
      { 
     
      /dede:arclist [field:description function='html2text(@me)'/] &hellip;  
   
       
    
    
    
  
     } 
   
   
  
     

  
  

  

Finally, add the following statement between the index.htm template files:

  
   ="alternate" type="application/rss+xml" href="http://www.ijinfa.cn/feed.php" title=  

Regenerate the homepage of the website in the background of Dede so that the RSS feed of your website has been finished.

http://www.bkjia.com/PHPjc/1077134.html www.bkjia.com true http://www.bkjia.com/PHPjc/1077134.html techarticle dedecms Update article sync posted to Sina Weibo, Dedecms Sina if in the website promotion process can use good microblogging this tool, will give the website promotion work bring great convenience ...

  • Related Article

    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.