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

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

Add upload button on image page

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