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

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

问题描述

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



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



以下帖子由Gábor显示了他如何做到这一点,但我不知道他如何编写一个自定义模块来执行此操作。 >

任何指针都将不胜感激。

解决方案

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



从他的帖子:


Tweets有一些特殊的项目,如
@username引用和#hashtags。
这些应该链接到他们的
相应的twitter.com页面,
twitter模块有
的输入过滤器,我可以用它来建立
输入格式。 (给我的用例,我
没有用于其余的twitter
模块,所以我采取格式代码到
我的站点特定的模块,不要
实际上使用twitter.module。)
twitter feed还包括我的用户名
在开头,我的网站
读者将知道或不要
关心,所以我也写了一个快速的
过滤器,它将我的
用户名转换为节点正文末尾
的twitter链接。


您需要使用feed模块开始导入tweet。然后,您需要将Twitter模块中的输入格式添加到默认导入(可能是Filtered HTML)。


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.

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.

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.

Any pointers would be appreciated.

解决方案

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

From his post:

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.

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的Twitter作为节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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