/
plugins.txt
196 lines (140 loc) · 4.59 KB
/
plugins.txt
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
Plugins
=======
File
----
Allows you to upload a file. A filetype icon will be assigned based on the file extension.
For installation be sure you have the following in the ``INSTALLED_APPS`` setting
in your project's ``settings.py`` file::
INSTALLED_APPS = (
# ...
'cms.plugins.file',
# ...
)
Flash
-----
Allows you to upload and display a Flash SWF file on your page.
For installation be sure you have the following in the ``INSTALLED_APPS`` setting
in your project's ``settings.py`` file::
INSTALLED_APPS = (
# ...
'cms.plugins.flash',
# ...
)
GoogleMap
---------
Displays a map of an address on your page.
For installation be sure you have the following in the ``INSTALLED_APPS``
setting in your project's ``settings.py`` file::
INSTALLED_APPS = (
# ...
'cms.plugins.googlemap',
# ...
)
The Google Maps API key is also required.
You can either put this in a project setting called ``GOOGLE_MAPS_API_KEY``
or be sure the template context has a variable with the same name.
Link
----
Displays a link to an arbitrary URL or to a page. If a page is moved the URL will still be correct.
For installation be sure to have the following in the ``INSTALLED_APPS``
setting in your project's ``settings.py`` file::
INSTALLED_APPS = (
# ...
'cms.plugins.link',
# ...
)
Picture
-------
Displays a picture in a page.
For installation be sure you have the following in the ``INSTALLED_APPS``
setting in your project's ``settings.py`` file::
INSTALLED_APPS = (
# ...
'cms.plugins.picture',
# ...
)
If you want to resize the picture you can get a thumbnail library. We recommend
`sorl.thumbnail <http://code.google.com/p/sorl-thumbnail/>`_.
In your project template directory create a folder called ``cms/plugins`` and create a file
called ``picture.html`` in there.
Here is an example ``picture.html`` template::
{% load i18n thumbnail %}
{% spaceless %}
{% if picture.url %}<a href="{{ picture.url }}">{% endif %}
{% ifequal placeholder "content" %}
<img src="{% thumbnail picture.image.name 484x1500 upscale %}" {% if picture.alt %}alt="{{ picture.alt }}" {% endif %}/>
{% endifequal %}
{% ifequal placeholder "teaser" %}
<img src="{% thumbnail picture.image.name 484x1500 upscale %}" {% if picture.alt %}alt="{{ picture.alt }}" {% endif %}/>
{% endifequal %}
{% if picture.url %}</a>{% endif %}
{% endspaceless %}
In this template the picture is scaled differently based on which placeholder it was placed in.
Snippet
-------
Just renders some HTML snippet. Mostly used for development or hackery.
For installation be sure you have the following in the ``INSTALLED_APPS``
setting in your project's ``settings.py`` file::
INSTALLED_APPS = (
# ...
'cms.plugins.snippet',
# ...
)
Teaser
------
Displays a teaser box for another page or a URL. A picture and a description can be added.
For installation be sure you have the following in the ``INSTALLED_APPS`` settings
in your project's ``settings.py`` file::
INSTALLED_APPS = (
# ...
'cms.plugins.teaser',
# ...
)
Text
----
Displays text.
If plugins are text-enabled they can be placed inside the text-flow. At this moment the following plugins are text-enabled:
- link
- picture
- file
- snippet
The current editor is `Wymeditor <http://www.wymeditor.org/>`_.
If you want to use TinyMce you need to install `django-tinymce <http://code.google.com/p/django-tinymce/>`_.
If ``tinymce`` is in your ``INSTALLED_APPS`` it will be automatically enabled. If you have tinymce installed but don't
want to use it in the cms put the following in your ``settings.py``::
CMS_USE_TINYMCE = False
For installation be sure you have the following in your project's ``INSTALLED_APPS`` setting::
INSTALLED_APPS = (
# ...
'cms.plugins.text',
# ...
)
Video
-----
Plays Video Files or Youtube / Vimeo Videos. Uses the `OSFlashVideoPlayer <http://github.com/FlashJunior/OSFlashVideoPlayer>`_.
If you upload a file use .flv files or h264 encoded video files.
For installation be sure you have the following in your project's ``INSTALLED_APPS`` setting::
INSTALLED_APPS = (
# ...
'cms.plugins.video',
# ...
)
Twitter
-------
Displays the last number of post of a twitter user.
For installation be sure you have the following in your project's ``INSTALLED_APPS`` setting::
INSTALLED_APPS = (
# ...
'cms.plugins.twitter',
# ...
)
Inherit
-------
Displays all plugins of an other page or an other language. Great if you need always the same
plugins on a lot of pages.
For installation be sure you have the following in your project's ``INSTALLED_APPS`` setting::
INSTALLED_APPS = (
# ...
'cms.plugins.inherit',
# ...
)