https://github.com/philecms/philetwitter
Parse content and wrap Twitter mentions and hashtags
https://github.com/philecms/philetwitter
philecms-plugin
Last synced: 7 months ago
JSON representation
Parse content and wrap Twitter mentions and hashtags
- Host: GitHub
- URL: https://github.com/philecms/philetwitter
- Owner: PhileCMS
- License: mit
- Created: 2014-04-11T17:19:21.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-10-09T17:45:25.000Z (over 11 years ago)
- Last Synced: 2024-12-28T02:48:47.882Z (over 1 year ago)
- Topics: philecms-plugin
- Language: PHP
- Size: 193 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
phileTwitter
===========
Parse content and wrap Twitter mentions and hashtags
### Features
* wrap `@` mentions
* wrap `#` tags
* control output (title, target, class name)
### 1.1 Installation (composer)
```
php composer.phar require phile/twitter:*
```
### 1.2 Installation (Download)
* Install [Phile](https://github.com/PhileCMS/Phile)
* Clone this repo into `plugins/phile/twitter`
### 2. Activation
After you have installed the plugin. You need to add the following line to your `config.php` file:
```
$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.
```
Output:
```html
You can now mention twitter people like @james2doyle or even use hash tags like #philecms.
```
#### Config
Here are the settings. See the above output for where everything goes.
```
'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
```
### Why Use?
Clients are crazy. You want to make sure the HTML output is good and not a huge mess. It is a pretty good selling point for some people too. Doing things `automagically` always is.