Get the App
SLTechnology News&Howtos  ›  Servers  › 

The method of automatically updating the content of dream-weaving site to Sina Weibo

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

This article is about how to automatically update the content of the dream weaving site to Sina Weibo. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

How to automatically update the content of dream weaving site to Sina Weibo?

Dream weaving 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.

Thank you for reading! So much for the method of automatically updating the content of the dream weaving site to Sina Weibo. I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.

Tags: Sina content update template site method association success whole site file article more URL path generation good practical home page he means code Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi OPPO Reno Xiaomi Huawei MariaDB