source: extensions/FacebookPlug/Plugin/tpl/admin.config.tpl @ 8386

Last change on this file since 8386 was 8386, checked in by rub, 13 years ago

Add social plugin activity feed
Add convert function on admin page config
Add missing options on social plugins
Add activity tab sheet on admin config page

  • Property svn:eol-style set to LF
File size: 16.4 KB
Line 
1{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"}
2{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js"}
3{known_script id="jquery.ui.dialog" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.dialog.packed.js"}
4{known_script id="jquery.tipTip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.tipTip.minified.js" }
5
6{html_head}
7<link rel="stylesheet" type="text/css" href="{$FBP_PATH|@cat:'/css/admin.config.css'}">
8{/html_head}
9
10<div class="titrePage">
11  <h2>FacebookPlug</h2>
12</div>
13<br>
14
15<form method="post" class="properties" action="{$FBP_ACTION}">
16{if isset($social_plugin)}
17<h3>{'On picture pages'|@translate}</h3>
18<fieldset>
19  <legend><a href="{$social_plugin.like_button.FB_PAGE}" onclick="window.open(this.href); return false;">{'Like button'|@translate}</a></legend>
20  <ul>
21    <li>
22      <label>
23        <span class="property">{'Enabled'|@translate}</span>
24        <input type="checkbox" name="FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ENABLED" {$social_plugin.like_button.ENABLED} />
25      </label>
26    </li>
27
28    <div id='like_button'>
29      <li>
30        <label>
31          <span class="property">{'Layout style'|@translate}</span>
32          <select name="FBP_SOCIAL_PLUGIN_LIKE_BUTTON_LAYOUT" size="1">
33            {html_options options=$social_plugin.like_button.LAYOUT_OPTIONS selected=$social_plugin.like_button.LAYOUT_OPTIONS_SELECTED}
34          </select>
35        </label>
36      </li>
37      <li>
38        <label>
39          <span class="property">{'Show faces'|@translate}</span>
40          <input type="checkbox" name="FBP_SOCIAL_PLUGIN_LIKE_BUTTON_SHOW_FACES" {$social_plugin.like_button.SHOW_FACES} />
41        </label>
42      </li>
43      <li>
44        <label>
45          <span class="property">{'Verb to display'|@translate}</span>
46          <select name="FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ACTION" size="1">
47            {html_options options=$social_plugin.like_button.ACTION_OPTIONS selected=$social_plugin.like_button.ACTION_OPTIONS_SELECTED}
48          </select>
49        </label>
50      </li>
51      <li>
52        <label>
53          <span class="property">{'Color scheme'|@translate}</span>
54          <select name="FBP_SOCIAL_PLUGIN_LIKE_BUTTON_COLORSCHEME" size="1">
55            {html_options options=$social_plugin.like_button.COLORSCHEME_OPTIONS selected=$social_plugin.like_button.COLORSCHEME_OPTIONS_SELECTED}
56          </select>
57        </label>
58      </li>
59    </div>
60  </ul>
61</fieldset>
62
63<fieldset>
64  <legend><a href="{$social_plugin.facepile.FB_PAGE}" onclick="window.open(this.href); return false;">{'Facepile'|@translate}</a> {'on slideshow pages'|@translate}</legend>
65  <ul>
66    <li>
67      <label>
68        <span class="property">{'Enabled'|@translate}</span>
69        <input type="checkbox" name="FBP_SOCIAL_PLUGIN_FACEPILE_ENABLED" {$social_plugin.facepile.ENABLED} />
70      </label>
71    </li>
72
73    <div id='facepile'>
74      <li>
75        <label>
76          <span class="property">{'Num rows'|@translate}</span>
77          <input type="text" size="3" maxlength="4" name="FBP_SOCIAL_PLUGIN_FACEPILE_MAX_ROWS" value="{$social_plugin.facepile.MAX_ROWS}" />
78        </label>
79      </li>
80    </div>
81  </ul>
82</fieldset>
83
84<fieldset>
85  <legend><a href="{$social_plugin.comments.FB_PAGE}" onclick="window.open(this.href); return false;">{'Comments'|@translate}</a></legend>
86  <ul>
87    <li>
88      <label>
89        <span class="property">{'Enabled'|@translate}</span>
90        <input type="checkbox" name="FBP_SOCIAL_PLUGIN_COMMENTS_ENABLED" {$social_plugin.comments.ENABLED} />
91      </label>
92    </li>
93
94    <div id='comments'>
95      <li>
96        <label>
97          <span class="property">{'Num posts'|@translate}</span>
98          <input type="text" size="3" maxlength="4" name="FBP_SOCIAL_PLUGIN_COMMENTS_NUMPOSTS" value="{$social_plugin.comments.NUMPOSTS}" />
99        </label>
100      </li>
101      <li>
102        <label>
103          <span class="property">{'Title'|@translate}</span>
104          <input type="text" size="39" name="FBP_SOCIAL_PLUGIN_COMMENTS_TITLE" value="{$social_plugin.comments.TITLE}" />
105        </label>
106      </li>
107      <li>
108        <label>
109          <span class="property">{'Simple'|@translate}</span>
110          <input type="checkbox" name="FBP_SOCIAL_PLUGIN_COMMENTS_SIMPLE" {$social_plugin.comments.SIMPLE} />
111        </label>
112      </li>
113      <li>
114        <label>
115          <span class="property">{'Reverse'|@translate}</span>
116          <input type="checkbox" name="FBP_SOCIAL_PLUGIN_COMMENTS_REVERSE" {$social_plugin.comments.REVERSE} />
117        </label>
118      </li>
119      <li>
120        <label>
121          <span class="property">{'Publish feed'|@translate}</span>
122          <input type="checkbox" name="FBP_SOCIAL_PLUGIN_COMMENTS_PUBLISH_FEED" {$social_plugin.comments.PUBLISH_FEED} />
123        </label>
124      </li>
125    </div>
126  </ul>
127</fieldset>
128
129<h3>{'On menu of main pages'|@translate}</h3>
130<fieldset>
131  <legend><a href="{$social_plugin.activity_feed.FB_PAGE}" onclick="window.open(this.href); return false;">{'Activity feed'|@translate}</a></legend>
132  <ul>
133    <li>
134      <label>
135        <span class="property">{'Enabled'|@translate}</span>
136        <input type="checkbox" name="FBP_SOCIAL_PLUGIN_ACTIVITY_FEED_ENABLED" {$social_plugin.activity_feed.ENABLED} />
137      </label>
138    </li>
139
140    <div id='activity_feed'>
141      <li>
142        <label>
143          <span class="property">{'Color scheme'|@translate}</span>
144          <select name="FBP_SOCIAL_PLUGIN_ACTIVITY_FEED_COLORSCHEME" size="1">
145            {html_options options=$social_plugin.activity_feed.COLORSCHEME_OPTIONS selected=$social_plugin.activity_feed.COLORSCHEME_OPTIONS_SELECTED}
146          </select>
147        </label>
148      </li>
149      <li>
150        <label>
151          <span class="property">{'Show header'|@translate}</span>
152          <input type="checkbox" name="FBP_SOCIAL_PLUGIN_ACTIVITY_FEED_HEADER" {$social_plugin.activity_feed.HEADER} />
153        </label>
154      </li>
155      <li>
156        <label>
157          <span class="property">{'Show recommendations'|@translate}</span>
158          <input type="checkbox" name="FBP_SOCIAL_PLUGIN_ACTIVITY_FEED_RECOMMENDATIONS" {$social_plugin.activity_feed.RECOMMENDATIONS} />
159        </label>
160      </li>
161      <li>
162        <label>
163          <span class="property">{'Height'|@translate}</span>
164          <input type="text"  size="3" maxlength="4" name="FBP_SOCIAL_PLUGIN_ACTIVITY_FEED_HEIGHT" value="{$social_plugin.activity_feed.HEIGHT}" />
165        </label>
166      </li>
167    </div>
168  </ul>
169</fieldset>
170
171<fieldset>
172  <legend><a href="{$social_plugin.like_box.FB_PAGE}" onclick="window.open(this.href); return false;">{'Like box'|@translate}</a></legend>
173  <ul>
174    <li>
175      <label>
176        <span class="property">{'Enabled'|@translate}</span>
177        <input type="checkbox" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_ENABLED" {$social_plugin.like_box.ENABLED} />
178      </label>
179    </li>
180
181    <div id='like_box'>
182      <li>
183        <label>
184          <span class="property">{'Facebook Page URL'|@translate}</span>
185          <input type="text" size="39" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_URL" value="{$social_plugin.like_box.URL}" />
186        </label>
187      </li>
188      <li>
189        <label>
190          <span class="property">{'Color scheme'|@translate}</span>
191          <select name="FBP_SOCIAL_PLUGIN_LIKE_BOX_COLORSCHEME" size="1">
192            {html_options options=$social_plugin.like_box.COLORSCHEME_OPTIONS selected=$social_plugin.like_box.COLORSCHEME_OPTIONS_SELECTED}
193          </select>
194        </label>
195      </li>
196      <li>
197        <label>
198          <span class="property">{'Show faces'|@translate}</span>
199          <input type="checkbox" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_SHOW_FACES" {$social_plugin.like_box.SHOW_FACES} />
200        </label>
201      </li>
202      <li>
203        <label>
204          <span class="property">{'Show stream'|@translate}</span>
205          <input type="checkbox" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_STREAM" {$social_plugin.like_box.STREAM} />
206        </label>
207      </li>
208      <li>
209        <label>
210          <span class="property">{'Show header'|@translate}</span>
211          <input type="checkbox" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_HEADER" {$social_plugin.like_box.HEADER} />
212        </label>
213      </li>
214      <li>
215        <label>
216          <span class="property">{'Height'|@translate}</span>
217          <input type="text"  size="3" maxlength="4" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_HEIGHT" value="{$social_plugin.like_box.HEIGHT}" />
218        </label>
219      </li>
220    </div>
221  </ul>
222</fieldset>
223<p><i>{'Other options are available by programming'|@translate}</i></p>
224{/if}{* isset $social_plugin*}
225
226{if isset($advanced)}
227<fieldset>
228  <legend>{'Options'|@translate}</legend>
229  <ul>
230      <li>
231      <label>
232        <span class="property">{'Facebook application identifient'|@translate}</span>
233        <a class="HelptipTip" href="#" title="{'To fill only if you want to use a specific Facebook application. It\'s recommended to leave blank.'|@translate}"><sup>{' (?)'|@translate}</sup></a>
234        <input type="text" size="15" name="FBP_FACEBOOK_APP_ID" value="{$advanced.FBP_FACEBOOK_APP_ID}" />
235      </label>
236    </li>
237{*    <li>
238      <label>
239        <span class="property">{'Asynchronous Facebook access'|@translate}</span>
240        <a class="HelptipTip" href="#" title="{'Todo'|@translate}"><sup>{' (?)'|@translate}</sup></a>
241        <input type="checkbox" name="FBP_ASYNC_SCRIPT" {$advanced.FBP_ASYNC_SCRIPT} />
242      </label>
243    </li>*}
244    <li>
245      <label>
246        <span class="property">{'Always initialize Facebook'|@translate}</span>
247        <a class="HelptipTip" href="#" title="{'Useful for personal templates, plugins. A event if also defined for plugins.'|@translate}"><sup>{' (?)'|@translate}</sup></a>
248        <input type="checkbox" name="FBP_FORCE_FACEBOOK_INIT" {$advanced.FBP_FORCE_FACEBOOK_INIT} />
249      </label>
250    </li>
251    <li>
252      <label>
253        <span class="property">{'Picture URL type'|@translate}</span>
254        <a class="HelptipTip" href="#" title="{'Page type allows to reference the page and Facebook can get informations (title, ...). Image type allows to reference image url and Facebook cannot get informations but works always with private albums.'|@translate}"><sup>{' (?)'|@translate}</sup></a>
255        <select name="FBP_PICTURE_URL_TYPE" size="1">
256          {html_options options=$advanced.FBP_PICTURE_URL_TYPE_OPTIONS selected=$advanced.FBP_PICTURE_URL_TYPE_OPTIONS_SELECTED}
257        </select>
258      </label>
259    </li>
260    <li>
261      <label>
262        <span class="property">{'Allow Facebook to see private page'|@translate}</span>
263        <a class="HelptipTip" href="#" title="{'Recommended in order to Facebook get title, ... of your pages for wall display'|@translate}"><sup>{' (?)'|@translate}</sup></a>
264        <input type="checkbox" name="FBP_ALLOW_FB_ACCESS_PRIVATE_PAGE" {$advanced.FBP_ALLOW_FB_ACCESS_PRIVATE_PAGE} />
265      </label>
266    </li>
267  </ul>
268</fieldset>
269<fieldset>
270  <legend>{'Promote'|@translate}</legend>
271  <ul class="OldVersion">
272    <li>
273      <label>
274        <span class="property">{'Add informations on about page'|@translate}</span>
275        <a class="HelptipTip" href="#" title="{'Add a paragraph with Facebook link on about page'|@translate}"><sup>{' (?)'|@translate}</sup></a>
276        <input type="checkbox" name="FBP_ADD_ABOUT_INFORMATIONS" {$advanced.FBP_ADD_ABOUT_INFORMATIONS} />
277      </label>
278    </li>
279  </ul>
280  <ul>
281    <li>
282      <label>
283        <span class="property">{'Add Facebook Piwigo group on footer'|@translate}</span>
284        <a class="HelptipTip" href="#" title="{'Add a link on each page footer'|@translate}"><sup>{' (?)'|@translate}</sup></a>
285        <input type="checkbox" name="FBP_ADD_GROUP_FOOTER" {$advanced.FBP_ADD_GROUP_FOOTER} />
286      </label>
287    </li>
288  </ul>
289  <ul>
290    <li>
291      <label>
292        <span class="property">{'Add Facebook Piwigo application on footer'|@translate}</span>
293        <a class="HelptipTip" href="#" title="{'Add a link on each page footer'|@translate}"><sup>{' (?)'|@translate}</sup></a>
294        <input type="checkbox" name="FBP_ADD_APPLICATION_FOOTER" {$advanced.FBP_ADD_APPLICATION_FOOTER} />
295      </label>
296    </li>
297  </ul>
298</fieldset>
299{/if}{* isset $advanced*}
300
301{if isset($activity)}
302<center>
303  <div>
304  <fb:activity
305    width="550"
306    height="950"
307    recommendations="true"
308    header="true"
309  ></fb:activity>
310</center>
311{/if}{* isset $activity*}
312
313{if ! isset($activity)}
314  <p>
315    <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}">
316    <input class="submit" type="reset" name="reset" value="{'Reset'|@translate}">
317  </p>
318{/if}{* isset $activity*}
319
320  <p>
321{'Develop by'|@translate} <a href="{$FACEBOOK_PIWIGO_RUB_URL}" target="_bank">Ruben ARNAUD</a>
322 - <a href="{$FACEBOOK_PIWIGO_GROUP_URL}" target="_bank">{'Join Facebook Piwigo group'|@translate}</a>
323 - <a href="{$FACEBOOK_PIWIGO_APPLICATION_URL}" target="_bank">{'Via Facebook Piwigo application'|@translate}</a>
324  <p>
325
326</form>
327
328<div id="dialog_modal_like_button_comments" title="{'Informations'|@translate}">{'Like button and comments cannot be enabled together'|@translate}</div>
329{*<div id="dialog_modal_can_close" title="{'Informations'|@translate}">{'Data are modified but not saved! Are you sure to quit this tabsheet?'|@translate}</div>*}
330
331{literal}
332<script type="text/javascript">
333  function show_hide(checkbox_name, div_name)
334  {
335    if ($("input[name="+checkbox_name+"]").attr('checked'))
336    {
337      $("#"+div_name).show();
338    }
339    else
340    {
341      $("#"+div_name).hide();
342    }
343  }
344
345  function inverse_check_value(checkbox_name_1, checkbox_name_2)
346  {
347    if ($("input[name="+checkbox_name_1+"]").attr('checked') && $("input[name="+checkbox_name_2+"]").attr('checked'))
348    {
349      $("input[name="+checkbox_name_1+"]").attr('checked', false);
350      $("#dialog_modal_like_button_comments").dialog('open');
351    }
352  }
353
354  function init_checkbox(checkbox_name, div_name)
355  {
356    $("input[name="+checkbox_name+"]").click(
357      function()
358      {
359        show_hide(checkbox_name, div_name);
360      }
361    );
362    show_hide(checkbox_name, div_name);
363  }
364
365  function init_checkbox_with_inverse_value(checkbox_name_1, checkbox_name_2)
366  {
367    $("input[name="+checkbox_name_1+"]").click(
368      function()
369      {
370        inverse_check_value(checkbox_name_1, checkbox_name_2);
371      }
372    );
373    $("input[name="+checkbox_name_2+"]").click(
374      function()
375      {
376        inverse_check_value(checkbox_name_2, checkbox_name_1);
377      }
378    );
379  }
380
381  $(document).ready(
382    function()
383    {
384      //Init all main checkbox
385      init_checkbox_with_inverse_value("FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ENABLED", "FBP_SOCIAL_PLUGIN_COMMENTS_ENABLED");
386      init_checkbox("FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ENABLED", "like_button");
387      init_checkbox("FBP_SOCIAL_PLUGIN_FACEPILE_ENABLED", "facepile");
388      init_checkbox("FBP_SOCIAL_PLUGIN_COMMENTS_ENABLED", "comments");
389      init_checkbox("FBP_SOCIAL_PLUGIN_ACTIVITY_FEED_ENABLED", "activity_feed");
390      init_checkbox("FBP_SOCIAL_PLUGIN_LIKE_BOX_ENABLED", "like_box");
391      // Init message box
392      $("#dialog_modal_like_button_comments").dialog({
393        autoOpen: false, modal: true, dialogClass: 'admin_config', // necessary to have a specific class because there are conflic with main menu accordeon
394        buttons: { "{/literal}{'Continue'|@translate}{literal}": function() { $(this).dialog("close"); } },
395      });
396      $("#dialog_modal_can_close").dialog({
397        autoOpen: false, modal: true, dialogClass: 'admin_config', // necessary to have a specific class because there are conflic with main menu accordeon
398        buttons: { "Cancel": function() { $(this).dialog("close"); }, "{/literal}{'Submit'|@translate}{literal}": function() { IsDataChanged = false; $(this).dialog("close"); } },
399      });
400      // Init help tips
401      $('.HelptipTip').tipTip({
402        'delay' : 0,
403        'fadeIn' : 200,
404        'fadeOut' : 200,
405      });
406{/literal}
407{if $FBP_OLD_VERSION}
408      // Hide non compatible option
409      $('.OldVersion').hide();
410{/if}
411{*      // Detect data change
412      IsDataChanged = false;
413      $("input, select").change(function() { IsDataChanged = true; });
414      //~ $(".tabsheet").click(function()
415      $(window).unload(function()
416        {
417          if (IsDataChanged)
418          {
419            //~ alert($(this).attr("name"));
420           //~ $("#dialog_modal_can_close").dialog( "option", "buttons", { "{/literal}{'Submit'|@translate}{literal}": function() { $(this).dialog("close"); } } );
421            $("#dialog_modal_can_close").dialog('open');
422           
423            //~ return true;
424            return false
425          }
426          else
427          {
428            return true;
429          }
430          //return ! IsDataChanged;
431        });
432*}
433{literal}
434    });
435</script>
436{/literal}
437
Note: See TracBrowser for help on using the repository browser.