phile / twitter
解析内容并包装Twitter提及和标签
dev-master
2014-10-09 17:45 UTC
Requires
This package is auto-updated.
Last update: 2024-08-29 04:08:58 UTC
README
解析内容并包装Twitter提及和标签
特性
- 包装
@
提及 - 包装
#
标签 - 控制输出(标题,目标,类名)
1.1 安装(composer)
php composer.phar require phile/twitter:*
1.2 安装(下载)
- 安装 Phile
- 将此仓库克隆到
plugins/phile/twitter
2. 激活
安装插件后,您需要将以下行添加到您的 config.php
文件中
$config['plugins']['phile\\twitter'] = array('active' => true);
``
### Markdown Usage
All you have to do is use the `@` and `#` signs like you normally would in a tweet.
#### Basic Examples:
Put the code in there. Watch the HTML spew out.
```html
You can now mention twitter people like @james2doyle or even use hash tags like #philecms.
输出
<p>You can now mention twitter people like <a target="_blank" class="twitter-link" title="@james2doyle" href="http://twitter.com/james2doyle">@james2doyle</a> or even use hash tags like <a target="_blank" class="twitter-link" title="#philecms" href="https://twitter.com/search?q=%23philecms&src=hash">#philecms</a>.</p>
配置
以下是设置。请参阅上面的输出以了解所有内容的去向。
'class' => 'twitter-link', // class to apply to the a tag, false is off
'target' => '_blank', // target for the a tag, false is off
'title' => true, // show a title on the a tag, false is off
为什么要使用?
客户很疯狂。您想确保HTML输出良好,而不是一团糟。这也是某些人的一个很好的卖点。自动完成
总是如此。