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

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

Add share icon on picture and album page

Rename footer.lang.php to common.lang.php
Remove use of target to open a new window

  • Property svn:eol-style set to LF
File size: 17.2 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($share)}
227<fieldset>
228  <legend>{'Options'|@translate}</legend>
229  <ul>
230    <li>
231      <label>
232        <span class="property">{'Share picture page'|@translate}</span>
233        <a class="HelptipTip" href="#" title="{'Add a icon link on each picture page to share on Facebook'|@translate}"><sup>{' (?)'|@translate}</sup></a>
234        <input type="checkbox" name="FBP_SHARE_PICTURE" {$share.FBP_SHARE_PICTURE} />
235      </label>
236    </li>
237    <li>
238      <label>
239        <span class="property">{'Share album page'|@translate}</span>
240        <a class="HelptipTip" href="#" title="{'Add a icon link on each album page to share on Facebook'|@translate}"><sup>{' (?)'|@translate}</sup></a>
241        <input type="checkbox" name="FBP_SHARE_ALBUM" {$share.FBP_SHARE_ALBUM} />
242      </label>
243    </li>
244  </ul>
245</fieldset>
246{/if}{* isset $share*}
247
248{if isset($advanced)}
249<fieldset>
250  <legend>{'Options'|@translate}</legend>
251  <ul>
252      <li>
253      <label>
254        <span class="property">{'Facebook application identifient'|@translate}</span>
255        <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>
256        <input type="text" size="15" name="FBP_FACEBOOK_APP_ID" value="{$advanced.FBP_FACEBOOK_APP_ID}" />
257      </label>
258    </li>
259{*    <li>
260      <label>
261        <span class="property">{'Asynchronous Facebook access'|@translate}</span>
262        <a class="HelptipTip" href="#" title="{'Todo'|@translate}"><sup>{' (?)'|@translate}</sup></a>
263        <input type="checkbox" name="FBP_ASYNC_SCRIPT" {$advanced.FBP_ASYNC_SCRIPT} />
264      </label>
265    </li>*}
266    <li>
267      <label>
268        <span class="property">{'Always initialize Facebook'|@translate}</span>
269        <a class="HelptipTip" href="#" title="{'Useful for personal templates, plugins. A event if also defined for plugins.'|@translate}"><sup>{' (?)'|@translate}</sup></a>
270        <input type="checkbox" name="FBP_FORCE_FACEBOOK_INIT" {$advanced.FBP_FORCE_FACEBOOK_INIT} />
271      </label>
272    </li>
273    <li>
274      <label>
275        <span class="property">{'Picture URL type'|@translate}</span>
276        <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>
277        <select name="FBP_PICTURE_URL_TYPE" size="1">
278          {html_options options=$advanced.FBP_PICTURE_URL_TYPE_OPTIONS selected=$advanced.FBP_PICTURE_URL_TYPE_OPTIONS_SELECTED}
279        </select>
280      </label>
281    </li>
282    <li>
283      <label>
284        <span class="property">{'Allow Facebook to see private page'|@translate}</span>
285        <a class="HelptipTip" href="#" title="{'Recommended in order to Facebook get title, ... of your pages for wall display'|@translate}"><sup>{' (?)'|@translate}</sup></a>
286        <input type="checkbox" name="FBP_ALLOW_FB_ACCESS_PRIVATE_PAGE" {$advanced.FBP_ALLOW_FB_ACCESS_PRIVATE_PAGE} />
287      </label>
288    </li>
289  </ul>
290</fieldset>
291<fieldset>
292  <legend>{'Promote'|@translate}</legend>
293  <ul class="OldVersion">
294    <li>
295      <label>
296        <span class="property">{'Add informations on about page'|@translate}</span>
297        <a class="HelptipTip" href="#" title="{'Add a paragraph with Facebook link on about page'|@translate}"><sup>{' (?)'|@translate}</sup></a>
298        <input type="checkbox" name="FBP_ADD_ABOUT_INFORMATIONS" {$advanced.FBP_ADD_ABOUT_INFORMATIONS} />
299      </label>
300    </li>
301  </ul>
302  <ul>
303    <li>
304      <label>
305        <span class="property">{'Add Facebook Piwigo group on footer'|@translate}</span>
306        <a class="HelptipTip" href="#" title="{'Add a link on each page footer'|@translate}"><sup>{' (?)'|@translate}</sup></a>
307        <input type="checkbox" name="FBP_ADD_GROUP_FOOTER" {$advanced.FBP_ADD_GROUP_FOOTER} />
308      </label>
309    </li>
310  </ul>
311  <ul>
312    <li>
313      <label>
314        <span class="property">{'Add Facebook Piwigo application 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_APPLICATION_FOOTER" {$advanced.FBP_ADD_APPLICATION_FOOTER} />
317      </label>
318    </li>
319  </ul>
320</fieldset>
321{/if}{* isset $advanced*}
322
323{if isset($activity)}
324<center>
325  <div>
326  <fb:activity
327    width="550"
328    height="950"
329    recommendations="true"
330    header="true"
331  ></fb:activity>
332</center>
333{/if}{* isset $activity*}
334
335{if ! isset($activity)}
336  <p>
337    <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}">
338    <input class="submit" type="reset" name="reset" value="{'Reset'|@translate}">
339  </p>
340{/if}{* isset $activity*}
341
342  <p>
343{'Develop by'|@translate} <a href="{$FACEBOOK_PIWIGO_RUB_URL}" target="_bank">Ruben ARNAUD</a>
344 - <a href="{$FACEBOOK_PIWIGO_GROUP_URL}" target="_bank">{'Join Facebook Piwigo group'|@translate}</a>
345 - <a href="{$FACEBOOK_PIWIGO_APPLICATION_URL}" target="_bank">{'Via Facebook Piwigo application'|@translate}</a>
346  <p>
347
348</form>
349
350<div id="dialog_modal_like_button_comments" title="{'Informations'|@translate}">{'Like button and comments cannot be enabled together'|@translate}</div>
351{*<div id="dialog_modal_can_close" title="{'Informations'|@translate}">{'Data are modified but not saved! Are you sure to quit this tabsheet?'|@translate}</div>*}
352
353{literal}
354<script type="text/javascript">
355  function show_hide(checkbox_name, div_name)
356  {
357    if ($("input[name="+checkbox_name+"]").attr('checked'))
358    {
359      $("#"+div_name).show();
360    }
361    else
362    {
363      $("#"+div_name).hide();
364    }
365  }
366
367  function inverse_check_value(checkbox_name_1, checkbox_name_2)
368  {
369    if ($("input[name="+checkbox_name_1+"]").attr('checked') && $("input[name="+checkbox_name_2+"]").attr('checked'))
370    {
371      $("input[name="+checkbox_name_1+"]").attr('checked', false);
372      $("#dialog_modal_like_button_comments").dialog('open');
373    }
374  }
375
376  function init_checkbox(checkbox_name, div_name)
377  {
378    $("input[name="+checkbox_name+"]").click(
379      function()
380      {
381        show_hide(checkbox_name, div_name);
382      }
383    );
384    show_hide(checkbox_name, div_name);
385  }
386
387  function init_checkbox_with_inverse_value(checkbox_name_1, checkbox_name_2)
388  {
389    $("input[name="+checkbox_name_1+"]").click(
390      function()
391      {
392        inverse_check_value(checkbox_name_1, checkbox_name_2);
393      }
394    );
395    $("input[name="+checkbox_name_2+"]").click(
396      function()
397      {
398        inverse_check_value(checkbox_name_2, checkbox_name_1);
399      }
400    );
401  }
402
403  $(document).ready(
404    function()
405    {
406      //Init all main checkbox
407      init_checkbox_with_inverse_value("FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ENABLED", "FBP_SOCIAL_PLUGIN_COMMENTS_ENABLED");
408      init_checkbox("FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ENABLED", "like_button");
409      init_checkbox("FBP_SOCIAL_PLUGIN_FACEPILE_ENABLED", "facepile");
410      init_checkbox("FBP_SOCIAL_PLUGIN_COMMENTS_ENABLED", "comments");
411      init_checkbox("FBP_SOCIAL_PLUGIN_ACTIVITY_FEED_ENABLED", "activity_feed");
412      init_checkbox("FBP_SOCIAL_PLUGIN_LIKE_BOX_ENABLED", "like_box");
413      // Init message box
414      $("#dialog_modal_like_button_comments").dialog({
415        autoOpen: false, modal: true, dialogClass: 'admin_config', // necessary to have a specific class because there are conflic with main menu accordeon
416        buttons: { "{/literal}{'Continue'|@translate}{literal}": function() { $(this).dialog("close"); } },
417      });
418      $("#dialog_modal_can_close").dialog({
419        autoOpen: false, modal: true, dialogClass: 'admin_config', // necessary to have a specific class because there are conflic with main menu accordeon
420        buttons: { "Cancel": function() { $(this).dialog("close"); }, "{/literal}{'Submit'|@translate}{literal}": function() { IsDataChanged = false; $(this).dialog("close"); } },
421      });
422      // Init help tips
423      $('.HelptipTip').tipTip({
424        'delay' : 0,
425        'fadeIn' : 200,
426        'fadeOut' : 200,
427      });
428{/literal}
429{if $FBP_OLD_VERSION}
430      // Hide non compatible option
431      $('.OldVersion').hide();
432{/if}
433{*      // Detect data change
434      IsDataChanged = false;
435      $("input, select").change(function() { IsDataChanged = true; });
436      //~ $(".tabsheet").click(function()
437      $(window).unload(function()
438        {
439          if (IsDataChanged)
440          {
441            //~ alert($(this).attr("name"));
442           //~ $("#dialog_modal_can_close").dialog( "option", "buttons", { "{/literal}{'Submit'|@translate}{literal}": function() { $(this).dialog("close"); } } );
443            $("#dialog_modal_can_close").dialog('open');
444           
445            //~ return true;
446            return false
447          }
448          else
449          {
450            return true;
451          }
452          //return ! IsDataChanged;
453        });
454*}
455{literal}
456    });
457</script>
458{/literal}
459
Note: See TracBrowser for help on using the repository browser.