-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCornify.php
More file actions
28 lines (24 loc) · 883 Bytes
/
Cornify.php
File metadata and controls
28 lines (24 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
/* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://sam.zoy.org/wtfpl/COPYING for more details. */
/**
* This class simplifies the usage of the Cornify webservice within the Yii framework.
*
* @author Da:Sourcerer
* @version 1.0.1
* @license http://sam.zoy.org/wtfpl/COPYING WTFPL 2.0
*/
class Cornify extends CWidget {
public $image='http://www.cornify.com/assets/cornify.gif';
public function init()
{
Yii::app()->getClientScript()->registerScriptFile('http://www.cornify.com/js/cornify.js');
}
public function run()
{
echo CHtml::link(CHtml::image($this->image, 'Cornify'), '#', array('onclick' => 'cornify_add()'));
}
}