source: extensions/FacebookPlug/Plugin/tpl/admin.tpl @ 27588

Revision 27588, 17.4 KB checked in by plg, 5 years ago (diff)

comment feature upload_picture, since it hasn't been working for months (changes on Facebook)

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