Bastien Sevajol 6 jaren geleden
bovenliggende
commit
25259d3309
3 gewijzigde bestanden met toevoegingen van 428 en 16 verwijderingen
  1. 408 0
      app/config/config.yml.template
  2. 0 16
      app/config/parameters.ini~
  3. 20 0
      app/config/parameters.yml.template

+ 408 - 0
app/config/config.yml.template Bestand weergeven

@@ -0,0 +1,408 @@
1
+imports:
2
+    - { resource: parameters.yml }
3
+    - { resource: security.yml }
4
+
5
+framework:
6
+    #esi:             ~
7
+    #translator:      { fallback: %locale% }
8
+    default_locale:  fr
9
+    secret:          %secret%
10
+    router:
11
+      strict_requirements: %kernel.debug%
12
+      resource:            "%kernel.root_dir%/config/routing.yml"
13
+    trusted_proxies: false
14
+    form:            true
15
+    csrf_protection: true
16
+    validation:
17
+        enable_annotations:      true
18
+#        annotations:
19
+#          namespaces:
20
+#              Muzich: Muzich\CoreBundle\Validator\
21
+        
22
+    templating:      { engines: ['twig'] } #assets_version: SomeVersionScheme
23
+    session:
24
+        #                      14 jours
25
+        cookie_lifetime:       1209600
26
+        #cookie_path:       \
27
+        #cookie_domain:     example.com
28
+        #cookie_secure:     true
29
+        #cookie_httponly:   true
30
+    translator: { fallback: fr }
31
+
32
+fos_facebook:
33
+    #file:   %kernel.root_dir%/../vendor/facebook/php-sdk/src/base_facebook.php
34
+    alias:  facebook
35
+    app_id: %api_facebook_id%
36
+    secret: %api_facebook_secret%
37
+    cookie: true
38
+    permissions: [email]
39
+    #permissions: [email, user_location]
40
+
41
+services:
42
+  
43
+    core.twig.extension:
44
+      class: Muzich\CoreBundle\Twig\Extensions\MyTwigExtension
45
+      tags:
46
+        -  { name: twig.extension }
47
+      arguments: 
48
+        - "@translator"
49
+        - %twig_extension_parameters%
50
+        - "@service_container"
51
+    
52
+    muzich.security.authentication.success_handler:
53
+      class: %muzich.security.authentication.success_handler.class%
54
+      public: false
55
+      arguments:  ['@router', '@doctrine.orm.entity_manager']
56
+    
57
+    muzich.security.authentication.failure_handler:
58
+      class: %muzich.security.authentication.failure_handler.class%
59
+      public: false
60
+      arguments:  ['@router', '@doctrine.orm.entity_manager', '@translator']
61
+    
62
+    muzich_user_manager:
63
+      class:        Muzich\UserBundle\Entity\UserManager
64
+      arguments:    
65
+        - "@security.encoder_factory"
66
+        #- "%fos_user.encoder.algorithm%"
67
+        - "@fos_user.util.username_canonicalizer"
68
+        - "@fos_user.util.email_canonicalizer"
69
+        - "@fos_user.entity_manager"
70
+        - "%fos_user.model.user.class%"
71
+    
72
+    muzich.manager.playlist:
73
+      class: Muzich\CoreBundle\Managers\PlaylistManager
74
+      arguments:
75
+        - "@doctrine.orm.entity_manager"
76
+    
77
+    muzich.mining.tag.miner:
78
+      class: Muzich\CoreBundle\Mining\Tag\TagMiner
79
+      arguments:
80
+        - "@doctrine.orm.entity_manager"
81
+        - "@doctrine_mongodb"
82
+    
83
+    muzich.mining.tag.data:
84
+      class: Muzich\CoreBundle\Mining\Tag\TagData
85
+      arguments:
86
+        - "@doctrine.orm.entity_manager"
87
+        - "@doctrine_mongodb"
88
+    
89
+    my_user.facebook_provider:
90
+      class: %my_user.facebook_provider.class%
91
+      arguments:
92
+        - "@fos_facebook.api"
93
+        - "@muzich_user_manager"
94
+        - "@validator"
95
+        - "@service_container"
96
+        - "%my_user.facebook_provider.class%"
97
+    
98
+    muzich_tag_manager:
99
+      class:        Muzich\CoreBundle\Managers\TagManager
100
+      arguments:    
101
+        - "@fos_user.util.username_canonicalizer"
102
+    
103
+    muzich_user.registration.form.type:
104
+        class: Muzich\UserBundle\Form\Type\RegistrationFormType
105
+        arguments: [%fos_user.model.user.class%]
106
+        tags:
107
+            - { name: form.type, alias: muzich_user_registration }
108
+    
109
+    muzich_user.registration.form.handler:
110
+        class: Muzich\UserBundle\Form\Handler\RegistrationFormHandler
111
+        arguments:
112
+          - "@fos_user.registration.form"
113
+          - "@request"
114
+          - "@fos_user.user_manager"
115
+          - "@fos_user.mailer"
116
+          - "@fos_user.util.token_generator"
117
+          - "@translator"
118
+          - "@doctrine"
119
+        scope: request
120
+        public: false
121
+        tags:
122
+            - { name: muzich_user_registration_form_handler }
123
+        
124
+    # validateurs
125
+    
126
+    validator.tags:
127
+        class: Muzich\CoreBundle\Validator\TagsValidator
128
+        arguments: ["@doctrine.orm.entity_manager"]
129
+        tags:
130
+            - { name: validator.constraint_validator, alias: validator.tags }
131
+       
132
+    validator.groupownedorpublic:
133
+        class: Muzich\CoreBundle\Validator\GroupOwnedOrPublicValidator
134
+        arguments: ["@doctrine.orm.entity_manager", "@security.context"]
135
+        tags:
136
+            - { name: validator.constraint_validator, alias: validator.groupownedorpublic }
137
+           
138
+    #
139
+    
140
+    muzich_strict_canonicalizer:
141
+        class: Muzich\CoreBundle\Util\StrictCanonicalizer
142
+        public: false
143
+    
144
+    admingenerator.menu.moderation:
145
+        class: %admingenerator.menu_builder.class%
146
+        factory_service: admingenerator.menu_builder
147
+        factory_method: createModerationMenu
148
+        arguments: ["@request"]
149
+        scope: request
150
+        tags:
151
+            - { name: knp_menu.menu, alias: moderation }
152
+    
153
+    muzich.socialBarHelper:
154
+        class: Muzich\CoreBundle\Templating\Helper\SocialBarHelper
155
+        tags: 
156
+            - { name: templating.helper, alias: social-buttons }
157
+        arguments:
158
+            - "@templating"
159
+
160
+    twig.extension.muzich_social_bar:
161
+        class: Muzich\CoreBundle\Twig\Extensions\MuzichTwigSocialBar
162
+        tags:
163
+            - { name: twig.extension }
164
+        arguments:
165
+            - "@service_container"
166
+            - "@translator"
167
+           
168
+#sonata_admin:
169
+#  #security_handler: sonata.admin.security.handler.acl
170
+#  security_handler: sonata.admin.security.handler.noop
171
+##  dashboard_groups:
172
+##    muzich:
173
+##      items:
174
+##        - muzich.admin.element
175
+
176
+# Twig Configuration
177
+twig:
178
+    debug:            %kernel.debug%
179
+    strict_variables: %kernel.debug%
180
+    globals:
181
+          cloud_tags_limit_to_display  :  %tag_cloud_limit_display%
182
+          player_config_youtube_width  :  %youtube_player_width%
183
+          player_config_youtube_height :  %youtube_player_height%
184
+          playlist_tags_count_displayed_max : %playlist_tags_count_displayed_max%
185
+    form:
186
+        resources:
187
+            - "ShtumiUsefulBundle::fields.html.twig"
188
+
189
+shtumi_useful:
190
+    autocomplete_entities:
191
+        users:
192
+            class: MuzichCoreBundle:User
193
+            role: ROLE_ADMIN
194
+            property: slug
195
+            search: contains
196
+        tags:
197
+            class: MuzichCoreBundle:Tag
198
+            property: slug
199
+            search: contains
200
+        groups:
201
+            class: MuzichCoreBundle:Group
202
+            property: slug
203
+            search: contains
204
+        elements:
205
+            class: MuzichCoreBundle:Element
206
+            property: name
207
+            search: contains
208
+
209
+admingenerator_generator:
210
+    # choose only one
211
+    use_propel:           false
212
+    use_doctrine_orm:     true
213
+    use_doctrine_odm:     false
214
+    # choose and uncomment only one
215
+#    base_admin_template: AdmingeneratorGeneratorBundle::base_admin.html.twig
216
+    base_admin_template: MuzichAdminBundle::base_admin_assetic_less.html.twig
217
+    dashboard_welcome_path:  AdmingeneratorDashboard_welcome
218
+
219
+knp_menu:
220
+    twig:
221
+        template: AdmingeneratorGeneratorBundle:KnpMenu:knp_menu_trans.html.twig
222
+
223
+jms_security_extra:
224
+    expressions: true
225
+    
226
+# Assetic Configuration
227
+assetic:
228
+    debug:          %kernel.debug%
229
+    use_controller: false
230
+    bundles:
231
+      - "MuzichCoreBundle"
232
+    java: "/usr/bin/java"
233
+    filters:
234
+        cssrewrite: ~
235
+        # closure:
236
+        #     jar: %kernel.root_dir%/java/compiler.jar
237
+        # yui_css:
238
+        #     jar: %kernel.root_dir%/java/yuicompressor-2.4.2.jar
239
+        yui_css:
240
+            jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.8pre.jar"
241
+        yui_js:
242
+            jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.8pre.jar"
243
+
244
+# Doctrine Configuration
245
+doctrine:
246
+    dbal:
247
+        driver:   %database_driver%
248
+        host:     %database_host%
249
+        port:     %database_port%
250
+        dbname:   %database_name%
251
+        user:     %database_user%
252
+        password: %database_password%
253
+        charset:  utf8
254
+
255
+    orm:
256
+        auto_generate_proxy_classes: %kernel.debug%
257
+        auto_mapping: true
258
+
259
+doctrine_mongodb:
260
+    connections:
261
+        default:
262
+            server: mongodb://10.6.0.4:27017
263
+            options: {}
264
+    default_database: muzichmdb
265
+    document_managers:
266
+        default:
267
+            auto_mapping: true
268
+
269
+# Swiftmailer Configuration
270
+swiftmailer:
271
+    transport:  smtp
272
+    username:   secret
273
+    password:   secret
274
+    host:       in-v3.mailjet.com
275
+    port:       587
276
+    encryption: tls
277
+    auth_mode:  login
278
+    #spool: { type: memory } # conflict with monolog sending emails
279
+
280
+stof_doctrine_extensions:
281
+    default_locale: fr_FR
282
+#    orm:
283
+#        tree: true
284
+#        timestampable: false
285
+
286
+fos_user:
287
+    db_driver:               orm
288
+    firewall_name:           main
289
+    use_listener:            false
290
+    user_class:              Muzich\CoreBundle\Entity\User
291
+    from_email:
292
+        address: contact@muzi.ch
293
+        sender_name: Muzi.ch
294
+#    encoder:
295
+#        algorithm: sha512
296
+#        encode_as_base64: false
297
+#        iterations: 10
298
+    service:
299
+        user_manager:           muzich_user_manager
300
+        username_canonicalizer: muzich_strict_canonicalizer
301
+        
302
+    registration:
303
+        form:
304
+            type: muzich_user_registration
305
+            handler: muzich_user.registration.form.handler
306
+    
307
+    resetting:
308
+        email:
309
+            template: MuzichUserBundle:User:resetting.email.twig
310
+
311
+gregwar_image: ~
312
+    
313
+parameters:
314
+  
315
+    supported_langs:
316
+      - fr
317
+      - en
318
+    
319
+    test.client.class: Muzich\CoreBundle\lib\Test\Client
320
+    admingenerator.menu_builder.class: Muzich\AdminBundle\Menu\MenuBuilder
321
+    muzich.security.authentication.success_handler.class: Muzich\CoreBundle\Security\Http\Authentication\AuthenticationSuccessHandler
322
+    muzich.security.authentication.failure_handler.class: Muzich\CoreBundle\Security\Http\Authentication\AuthenticationFailureHandler
323
+    my_user.facebook_provider.class: Muzich\CoreBundle\Security\User\Provider\FacebookProvider
324
+    
325
+    # Ce siteurl permet au str_replace de changeLanguage d'obtenir l'url 
326
+    siteurl:      https://muzi.ch
327
+    siteurl_www:  https://www.muzi.ch
328
+    emails_from:  contact@muzi.ch
329
+    emails_from_name: Muzi.ch
330
+    
331
+    sitebase: /home/bux/projets/muzich/
332
+    video_embed_config_file: src/Muzich/CoreBundle/Resources/config/video_embed.yaml
333
+    video_embed_debug: true
334
+    
335
+    search_default_count: 10
336
+    search_ajax_more:     10
337
+    search_default_favorites_tags_count: 999
338
+    
339
+    comment_add_min_length:      3
340
+    comment_add_max_length:      512
341
+  
342
+    tag_add_min_length:          2
343
+    tag_add_max_length:          64
344
+    
345
+    changeemail_security_delay:  3600
346
+    
347
+    playlist_tags_count_displayed_max: 7
348
+    
349
+    soundcloud_player_height:    81
350
+    
351
+    jamendo_player_width:        200
352
+    jamendo_player_height:       300
353
+    
354
+    youtube_player_width:        590
355
+    youtube_player_height:       300
356
+    
357
+    vimeo_player_width:        590
358
+    vimeo_player_height:       300
359
+    
360
+    dailymotion_player_width:    590
361
+    dailymotion_player_height:   300
362
+    
363
+    deezer_player_width:         590
364
+    deezer_player_height:        200
365
+    
366
+    tag_cloud_limit_display:     40
367
+      
368
+    factories:
369
+      - youtube.com
370
+      - youtu.be
371
+      - dailymotion.com
372
+      - soundcloud.com
373
+      - snd.sc
374
+      - jamendo.com
375
+      - deezer.com
376
+      - vimeo.com
377
+      - spotify.com
378
+      - mixcloud.com
379
+      
380
+    autoplay_sites_enabled:
381
+      - youtube.com
382
+      - youtu.be
383
+      - soundcloud.com
384
+      - snd.sc
385
+      - jamendo.com
386
+      
387
+    twig_extension_parameters:
388
+      autoplay_sites_enabled: %autoplay_sites_enabled%
389
+      
390
+    autoplay_contexts:
391
+      - home
392
+      - show
393
+      - show_user
394
+      - show_group
395
+      - favorite
396
+      - favorite_user
397
+      - favorite_my
398
+      
399
+    autoplay_max_elements: 256
400
+    
401
+    reputation_element_point_value:                  1
402
+    reputation_element_favorite_value:               5
403
+    reputation_element_follow_value:                10
404
+    reputation_element_tags_element_prop_value:     12
405
+    reputation_element_added_to_playlist:           1
406
+    
407
+    search_global_elements_word_min_length:         3
408
+    email_confirmation_email_interval:              3600

+ 0 - 16
app/config/parameters.ini~ Bestand weergeven

@@ -1,16 +0,0 @@
1
-; These parameters can be imported into other config files
2
-; by enclosing the key with % (like %database_user%)
3
-; Comments start with ';', as in php.ini
4
-[parameters]
5
-    database_driver="pdo_mysql"
6
-    database_host="localhost"
7
-    database_port="5432"
8
-    database_name="muzich"
9
-    database_user="muzich"
10
-    database_password="toto"
11
-    mailer_transport="smtp"
12
-    mailer_host="localhost"
13
-    mailer_user=""
14
-    mailer_password=""
15
-    locale="fr"
16
-    secret="secret"

+ 20 - 0
app/config/parameters.yml.template Bestand weergeven

@@ -0,0 +1,20 @@
1
+parameters:
2
+    database_driver:   pdo_mysql
3
+    database_host:     10.6.0.5
4
+    database_port:     3306
5
+    database_name:     muzich
6
+    database_user:     muzich
7
+    database_password: secret
8
+
9
+    mailer_transport:  smtp
10
+    mailer_host:       localhost
11
+    mailer_user:       ~
12
+    mailer_password:   ~
13
+
14
+    locale:            fr
15
+    secret:            secret
16
+
17
+    api_facebook_id:      secret
18
+    api_facebook_secret:  secret
19
+    api_facebook_name:    http://apps.facebook.com/muzi-ch/
20
+    api_facebook_server:  https://muzi.ch/