/
README
77 lines (60 loc) · 1.47 KB
/
README
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
EPastebin
---------
Version: 0.2
Author: Dimitrios Meggidis
Repository: [dmtrs/etbar](http://www.github.com/dmtrs/EPastebin)
###Description
A simple class to start with yii framework extensions. This extension
will render a pastebin submit form to your view.
###Requirements
First of all, you must register to [Pastebin.com](http://www.pastebin.com)
to get a developer key.
###Implement
Add extension to the config file (config/main.php):
~~~
[php]
'imports'=>array(
...
'application.extensions.EPastebin.*'
...
~~~
In controller add:
~~~
[php]
public function actions()
{
return array(
....
'epastebin'=>array(
'class'=>'CPastebinAction'
),
....
);
}
~~~
In view add:
Minimal options:
~~~
[php]
$this->widget('EPastebin', array(
"loginKey"=>"Your developer key from pastebin.com"));
~~~
All available options:
~~~
[php]
$this->widget('EPastebin', array(
"loginKey"=>"Your developer key from pastebin.com",
// The view that contains the form under extension/EPastebin/views/
"form"=>"_form",
"default"=>array(
"format"=>"php", //Default for format selection check options.php
"expire"=>"10M" //Default for expire seltion check options.php
),
));
~~~
##TODO
~~~~
- better messages to be returned
- create hide button on flash message
- css of flash message to overlay the other divs.
~~~