-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
80 lines (51 loc) · 2.56 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
78
79
80
The `sfFacebookSliderPlugin` is an interface to facebook facepile. It easily add 'facebook' slider component to the project
Prerequisites
-------------
This plugin for symfony 1.3/1.4. Facebook.com requires app registration on it's site to get app id.
More info at [https://developers.facebook.com/apps]
Installation
------------
1 - Install the plugin.
The easiest way to install `sfFacebookSlider` is to use the symfony command line:
> php symfony plugin:install sfFacebookSlider
Prefered method is to use github. Lastest commits are always there
> git clone https://github.com/zdanozdan/sfFacebookSliderPlugin
However recommended method is to fork the latest package from my git hub [https://github.com/zdanozdan/sfFacebookSlider]
2 - Register app on facebook.com and get key, and href forum parameters.
3 - Configure app.yml
> facebook_slider:
> app_id: my app id from facebook
> data_href: href to facebook app
Those 2 are required to put in user app.yml config. Plugin however have more params to config in plugin/config directory and they can be user do further configure the plugin but they have default values
> facebook_slider:
> class: fb-like-box
> style: background-color:white
> data_width: 190
> data_height: 380
> data_show_faces: "true"
> data_colorscheme: white
> data_stream: "false"
> data_header: "true"
4 - Clear the cache to enable the autoloading to find the new classes:
> php symfony cc
5 - Use helper to display javascript
Add js and css to view.yml
> stylesheets: [/sfFacebookSliderPlugin/css/facebook.css ]
> javascripts: [/sfFacebookSliderPlugin/js/slider.js ]
In the template you can use sfFacebookSliderHelper do bind popup
> php use_helper('FacebookSlider');
> php echo add_facebook_slider_js($sf_user->getCulture())
> php echo render_facebook_slider()
This should be added before </body> element so probably the best place would be layout.php (and every layout you want to display user voice feedback
> <body>
> HTML code here
> <p>this is apps/frontend/templates/layout.php</p>
> <?php use_helper('FacebookSlider'); ?>
> <?php echo add_facebook_slider_js($sf_user->getCulture()) ?>
> <?php echo render_facebook_slider() ?>
> </body>
Culture should be in form 'en_US'. If you have symfony culture in form 'en' you can baypass that using second param
> <?php echo add_facebook_slider_js($sf_user->getCulture(),'US') ?>
TODO
----
* add some testing