Drupal 从 Twitter 导入推文作为节点 [英] Drupal import Tweets from Twitter as Nodes

查看:22
本文介绍了Drupal 从 Twitter 导入推文作为节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够将我的推文从 twitter 导入 Drupal 作为 Nndes.我希望能够将 @names#tags 链接回正确的页面.我也不希望 myTweeterName 出现在推文的开头.

I want to be able to import my tweets from twitter into Drupal as Nndes. I want to be able to link @names and #tags back to the correct pages. I also don't want myTweeterName to appear at the start of the tweet.

你会怎么做?twitter 模块不创建节点,而是将数据存储在自己的表中.提要模块可以作为节点从 RSS 提要中读取推文,但会显示我的名字,而不是链接 @names#tags.

How would you go about doing this? The twitter module does not create nodes but stores data in its own table. The feed module can read in the tweets from the RSS feed as nodes, but will display my name and not link @names and #tags.

以下帖子来自 Gábor 展示了他是如何做到的,但我不确定他是如何编写自定义模块来做到这一点的.

The following post by Gábor shows how he has done it but I am not sure how he has written a custom module to do this.

任何指针将不胜感激.

推荐答案

Gabor 正在使用 Feeds 模块以及来自 Twitter 模块的输入过滤器.

Gabor is using the Feeds module along with the input filter from the twitter module.

来自他的帖子:

推文有一些特殊的项目,比如@username 引用和#hashtags.这些应该与他们的各自的 twitter.com 页面,以及twitter 模块有输入过滤器这些我可以用来建立一个输入格式.(鉴于我的用例,我对推特的其余部分没有用模块,所以我把格式代码放进去我的站点特定模块,不要实际上使用 twitter.module.)Twitter 提要还包括我的用户名一开始,我的网站读者要么知道,要么不知道关心,所以我也写了一个quick过滤器将改变我的用户名到来自推特"链接在节点主体的结尾.

Tweets have certain special items like @username references and #hashtags. These should be linked to their respective twitter.com pages, and twitter module has input filters for these which I could use to build up an input format. (Given my use case, I had no use for the rest of the twitter module, so I took the format code into my site-specific module, and do not actually use twitter.module.) The twitter feed also includes my username at the beginning, which my site readers will either know or do not care about, so I also wrote a quick filter which will transform my username to a "from twitter" link at the end of the node body.

您需要开始使用提要模块导入推文.然后,您需要将 Twitter 模块中的输入格式添加到您的默认导入(可能是过滤的 HTML").

You'll need to start importing your tweets using the feeds module. Then you'll need to add the input formats from the Twitter module to your default import (probably "Filtered HTML").

这篇关于Drupal 从 Twitter 导入推文作为节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆