forked from frost-nzcr4/sfMultipleAjaxUploadGalleryPlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README_EN
91 lines (73 loc) · 4 KB
/
README_EN
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
/************************************************************************************************************************
* sfMultipleAjaxUploadGalleryPlugin *
* EN : *
* This plugin generates a gallery management module with an ajax multiple photo uploader. *
* Internationalization supports (En - Fr) *
*************************************************************************************************************************/
/************************************************************************************************************************
* Requirements *
* To manipulate pictures, you have to install on your server the GD library or imagemagick *
*************************************************************************************************************************/
__________________________________________________________________________________________________________________________
/*************************************************************************************************************************
* TUTORIAL : you can get a screencast here : http://www.vimeo.com/sisko/sfMultipleAjaxUploadGalleryPlugin *
* you can follow the instructions below *
* you can follow the instructions in my website : *
* http://www.leny-bernard.com/en/blog/show/sfMultipleAjaxUploadGalleryPlugin *
**************************************************************************************************************************/
EN:
Installation: ____________________________________________________________
In order to install the plugin sfMultipleAjaxUploadGalleryPlugin
Type one of these symfony commands :
plugin:install sfMultipleAjaxUploadGalleryPlugin
OR
plugin:install http://www.leny-bernard.com/uploads/plugins/sfMultipleAjaxUploadGalleryPlugin.zip
OR
Download the file http://www.leny-bernard.com/uploads/plugins/sfMultipleAjaxUploadGalleryPlugin.zip
Then extract its content in the plugins directory of your project
then type plugin:install sfMultipleAjaxUploadGalleryPlugin
Get the plugin's resources by typing :
symfony publish-assets
Then clear the cache
symfony cc
A last task to do is to enable the gallery and photos modules (backend) and the portfolio module (frontend) in the settings.yml specific app config's folder.
/apps/backend/settings.yml
You have to enter if it doesn't already exist this line
all:
.settings:
enabled_modules: [gallery, photos]
If it does exists, you just have to add in the list the gallery module like below :
all:
.settings:
enabled_modules: [myOthersModule, gallery, photos]
/apps/frontend/settings.yml
same procedure that before
all:
.settings:
enabled_modules: [portfolio]
----------- or -----
all:
.settings:
enabled_modules: [myOthersModule, portfolio]
You can now access to the gallery and get its awesome functionnalities.
The plugin is customizable :
So you can :
# choose the different sizes that you want for your thumbnails :
sfMultipleAjaxUploadGalleryPlugin:
thumbnails_sizes:
- 50
- 150
- 300
# choose the default thumbnail size : :
sfMultipleAjaxUploadGalleryPlugin:
default_size: 50 # default, if not in thumbnails_sizes array new thumbnail is created
# Choose the portfolio thumbnail size :
sfMultipleAjaxUploadGalleryPlugin:
portfolio_thumbnails_size: 150
# Chose the behavior when deleting a gallery :
sfMultipleAjaxUploadGalleryPlugin:
onDelete: cascade # none or cascade, cascade remove all gallery's photos
# the galleries path :
sfMultipleAjaxUploadGalleryPlugin:
path_gallery: <?php echo sfConfig::get("sf_upload_dir")."/gallery/" ;?>
The plugin use an extern library (GD is set by default but you can totally use imagemagick instead) in order to save your photos in some widths {by default : 50px, 150px, 300px, orignal size}