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

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

Rename language files: plugin.lang.php => admin.config.lang.php
Add constants for Facebook URL
Add promote on footer
Add promote on about page (available for Piwigo 2.2)
Add promote on admin config page
Superscripted help tips on admin config page

  • Property svn:eol-style set to LF
File size: 14.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.like_box.FB_PAGE}" onclick="window.open(this.href); return false;">{'Like box'|@translate}</a></legend>
132  <ul>
133    <li>
134      <label>
135        <span class="property">{'Enabled'|@translate}</span>
136        <input type="checkbox" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_ENABLED" {$social_plugin.like_box.ENABLED} />
137      </label>
138    </li>
139
140    <div id='like_box'>
141      <li>
142        <label>
143          <span class="property">{'Facebook Page URL'|@translate}</span>
144          <input type="text" size="39" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_URL" value="{$social_plugin.like_box.URL}" />
145        </label>
146      </li>
147      <li>
148        <label>
149          <span class="property">{'Color scheme'|@translate}</span>
150          <select name="FBP_SOCIAL_PLUGIN_LIKE_BOX_COLORSCHEME" size="1">
151            {html_options options=$social_plugin.like_box.COLORSCHEME_OPTIONS selected=$social_plugin.like_box.COLORSCHEME_OPTIONS_SELECTED}
152          </select>
153        </label>
154      </li>
155      <li>
156        <label>
157          <span class="property">{'Show faces'|@translate}</span>
158          <input type="checkbox" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_SHOW_FACES" {$social_plugin.like_box.SHOW_FACES} />
159        </label>
160      </li>
161      <li>
162        <label>
163          <span class="property">{'Show stream'|@translate}</span>
164          <input type="checkbox" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_STREAM" {$social_plugin.like_box.STREAM} />
165        </label>
166      </li>
167      <li>
168        <label>
169          <span class="property">{'Show header'|@translate}</span>
170          <input type="checkbox" name="FBP_SOCIAL_PLUGIN_LIKE_BOX_HEADER" {$social_plugin.like_box.HEADER} />
171        </label>
172      </li>
173    </div>
174  </ul>
175</fieldset>
176{/if}{* isset $social_plugin*}
177
178{if isset($advanced)}
179<fieldset>
180  <legend>{'Options'|@translate}</legend>
181  <ul>
182      <li>
183      <label>
184        <span class="property">{'Facebook application identifient'|@translate}</span>
185        <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>
186        <input type="text" size="15" name="FBP_FACEBOOK_APP_ID" value="{$advanced.FBP_FACEBOOK_APP_ID}" />
187      </label>
188    </li>
189{*    <li>
190      <label>
191        <span class="property">{'Asynchronous Facebook access'|@translate}</span>
192        <a class="HelptipTip" href="#" title="{'Todo'|@translate}"><sup>{' (?)'|@translate}</sup></a>
193        <input type="checkbox" name="FBP_ASYNC_SCRIPT" {$advanced.FBP_ASYNC_SCRIPT} />
194      </label>
195    </li>*}
196    <li>
197      <label>
198        <span class="property">{'Always initialize Facebook'|@translate}</span>
199        <a class="HelptipTip" href="#" title="{'Useful for personal templates, plugins. A event if also defined for plugins.'|@translate}"><sup>{' (?)'|@translate}</sup></a>
200        <input type="checkbox" name="FBP_FORCE_FACEBOOK_INIT" {$advanced.FBP_FORCE_FACEBOOK_INIT} />
201      </label>
202    </li>
203    <li>
204      <label>
205        <span class="property">{'Picture URL type'|@translate}</span>
206        <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>
207        <select name="FBP_PICTURE_URL_TYPE" size="1">
208          {html_options options=$advanced.FBP_PICTURE_URL_TYPE_OPTIONS selected=$advanced.FBP_PICTURE_URL_TYPE_OPTIONS_SELECTED}
209        </select>
210      </label>
211    </li>
212    <li>
213      <label>
214        <span class="property">{'Allow Facebook to see private page'|@translate}</span>
215        <a class="HelptipTip" href="#" title="{'Recommended in order to Facebook get title, ... of your pages for wall display'|@translate}"><sup>{' (?)'|@translate}</sup></a>
216        <input type="checkbox" name="FBP_ALLOW_FB_ACCESS_PRIVATE_PAGE" {$advanced.FBP_ALLOW_FB_ACCESS_PRIVATE_PAGE} />
217      </label>
218    </li>
219  </ul>
220</fieldset>
221<fieldset>
222  <legend>{'Promote'|@translate}</legend>
223  <ul class="OldVersion">
224    <li>
225      <label>
226        <span class="property">{'Add informations on about page'|@translate}</span>
227        <a class="HelptipTip" href="#" title="{'Add a paragraph with Facebook link on about page'|@translate}"><sup>{' (?)'|@translate}</sup></a>
228        <input type="checkbox" name="FBP_ADD_ABOUT_INFORMATIONS" {$advanced.FBP_ADD_ABOUT_INFORMATIONS} />
229      </label>
230    </li>
231  </ul>
232  <ul>
233    <li>
234      <label>
235        <span class="property">{'Add Facebook Piwigo group on footer'|@translate}</span>
236        <a class="HelptipTip" href="#" title="{'Add a link on each page footer'|@translate}"><sup>{' (?)'|@translate}</sup></a>
237        <input type="checkbox" name="FBP_ADD_GROUP_FOOTER" {$advanced.FBP_ADD_GROUP_FOOTER} />
238      </label>
239    </li>
240  </ul>
241  <ul>
242    <li>
243      <label>
244        <span class="property">{'Add Facebook Piwigo application on footer'|@translate}</span>
245        <a class="HelptipTip" href="#" title="{'Add a link on each page footer'|@translate}"><sup>{' (?)'|@translate}</sup></a>
246        <input type="checkbox" name="FBP_ADD_APPLICATION_FOOTER" {$advanced.FBP_ADD_APPLICATION_FOOTER} />
247      </label>
248    </li>
249  </ul>
250</fieldset>
251{/if}{* isset $advanced*}
252
253
254  <p>
255    <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}">
256    <input class="submit" type="reset" name="reset" value="{'Reset'|@translate}">
257  </p>
258
259  <p>
260{'Develop by'|@translate} <a href="{$FACEBOOK_PIWIGO_RUB_URL}" target="_bank">Ruben ARNAUD</a>
261 - <a href="{$FACEBOOK_PIWIGO_GROUP_URL}" target="_bank">{'Join Facebook Piwigo group'|@translate}</a>
262 - <a href="{$FACEBOOK_PIWIGO_APPLICATION_URL}" target="_bank">{'Via Facebook Piwigo application'|@translate}</a>
263  <p>
264
265</form>
266
267<div id="dialog_modal_like_button_comments" title="{'Informations'|@translate}">{'Like button and comments cannot be enabled together'|@translate}</div>
268{*<div id="dialog_modal_can_close" title="{'Informations'|@translate}">{'Data are modified but not saved! Are you sure to quit this tabsheet?'|@translate}</div>*}
269
270{literal}
271<script type="text/javascript">
272  function show_hide(checkbox_name, div_name)
273  {
274    if ($("input[name="+checkbox_name+"]").attr('checked'))
275    {
276      $("#"+div_name).show();
277    }
278    else
279    {
280      $("#"+div_name).hide();
281    }
282  }
283
284  function inverse_check_value(checkbox_name_1, checkbox_name_2)
285  {
286    if ($("input[name="+checkbox_name_1+"]").attr('checked') && $("input[name="+checkbox_name_2+"]").attr('checked'))
287    {
288      $("input[name="+checkbox_name_1+"]").attr('checked', false);
289      $("#dialog_modal_like_button_comments").dialog('open');
290    }
291  }
292
293  function init_checkbox(checkbox_name, div_name)
294  {
295    $("input[name="+checkbox_name+"]").click(
296      function()
297      {
298        show_hide(checkbox_name, div_name);
299      }
300    );
301    show_hide(checkbox_name, div_name);
302  }
303
304  function init_checkbox_with_inverse_value(checkbox_name_1, checkbox_name_2)
305  {
306    $("input[name="+checkbox_name_1+"]").click(
307      function()
308      {
309        inverse_check_value(checkbox_name_1, checkbox_name_2);
310      }
311    );
312    $("input[name="+checkbox_name_2+"]").click(
313      function()
314      {
315        inverse_check_value(checkbox_name_2, checkbox_name_1);
316      }
317    );
318  }
319
320  $(document).ready(
321    function()
322    {
323      //Init all main checkbox
324      init_checkbox_with_inverse_value("FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ENABLED", "FBP_SOCIAL_PLUGIN_COMMENTS_ENABLED");
325      init_checkbox("FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ENABLED", "like_button");
326      init_checkbox("FBP_SOCIAL_PLUGIN_FACEPILE_ENABLED", "facepile");
327      init_checkbox("FBP_SOCIAL_PLUGIN_COMMENTS_ENABLED", "comments");
328      init_checkbox("FBP_SOCIAL_PLUGIN_LIKE_BOX_ENABLED", "like_box");
329      // Init message box
330      $("#dialog_modal_like_button_comments").dialog({
331        autoOpen: false, modal: true, dialogClass: 'admin_config', // necessary to have a specific class because there are conflic with main menu accordeon
332        buttons: { "{/literal}{'Continue'|@translate}{literal}": function() { $(this).dialog("close"); } },
333      });
334      $("#dialog_modal_can_close").dialog({
335        autoOpen: false, modal: true, dialogClass: 'admin_config', // necessary to have a specific class because there are conflic with main menu accordeon
336        buttons: { "Cancel": function() { $(this).dialog("close"); }, "{/literal}{'Submit'|@translate}{literal}": function() { IsDataChanged = false; $(this).dialog("close"); } },
337      });
338      // Init help tips
339      $('.HelptipTip').tipTip({
340        'delay' : 0,
341        'fadeIn' : 200,
342        'fadeOut' : 200,
343      });
344{/literal}
345{if $FBP_OLD_VERSION}
346      // Hide non compatible option
347      $('.OldVersion').hide();
348{/if}
349{*      // Detect data change
350      IsDataChanged = false;
351      $("input, select").change(function() { IsDataChanged = true; });
352      //~ $(".tabsheet").click(function()
353      $(window).unload(function()
354        {
355          if (IsDataChanged)
356          {
357            //~ alert($(this).attr("name"));
358           //~ $("#dialog_modal_can_close").dialog( "option", "buttons", { "{/literal}{'Submit'|@translate}{literal}": function() { $(this).dialog("close"); } } );
359            $("#dialog_modal_can_close").dialog('open');
360           
361            //~ return true;
362            return false
363          }
364          else
365          {
366            return true;
367          }
368          //return ! IsDataChanged;
369        });
370*}
371{literal}
372    });
373</script>
374{/literal}
375
Note: See TracBrowser for help on using the repository browser.