Get the App
SLTechnology News&Howtos  ›  Servers  › 

The method of automatically updating the content of DEDECMS site to Sina Weibo

Shulou Source: shulou.com Published: 2022-06-02 05:00:40 10月05日 Update

Editor to share with you the DEDECMS site content automatically updated to Sina Weibo method, I believe that most people do not know much, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to understand it!

How to automatically update the content of DEDECMS site to Sina Weibo?

DEDECMS site content is automatically updated to Sina Weibo

Recommended study: dream weaving cms

Sina Weibo uses feed to find and update articles. As long as you assign him an feed address, you can successfully associate.

Now start to simply modify the dream weaving template, because dream weaving can not generate the site-wide xml file, so it is necessary to establish a php program to generate the site-wide XML.

1. Set up feed.php

The above note is to modify the path of the template to ensure that feed.htm can be found in the template and directory

2. Establish the feed.htm template file

{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='60' col='1' titlelen='100' orderby='pubdate'} [field:arcurl/] [field:writer/] [field:typename/] [field:pubdate function='strftime ("% a] % d% b% Y% H:%M:%S + 0800 ", @ me)'/] [field:arcurl/] {/ dede:arclist}

It is important to note that don't forget to change my URL to what you need.

3. Modify the index.htm home page template

Because Sina Weibo can only verify the URL, can not write the complete path, for example, I wrote:. The result indicates that the association failed, and the solution is to add the following code between and

Through the above methods, we can successfully associate Sina Weibo.

The above is all the content of the DEDECMS site content automatically updated to Sina Weibo, thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Sina content update template site method connection success whole site file article URL path learning generation not much home page he refers to code method Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple OPPO Reno Shulou Tech Info Shulou Information Linux