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

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

Add an option to force Facebook initialization (new way to load include file)
Add help tips on config admin page

  • Property svn:eol-style set to LF
File size: 13.5 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}">{' (?)'|@translate}</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}">{' (?)'|@translate}</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}">{' (?)'|@translate}</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}">{' (?)'|@translate}</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}">{' (?)'|@translate}</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>
224    <li>
225      <label>
226        <span class="property">{'Add informations on about page'|@translate}</span>
227        <a class="HelptipTip" href="#" title="{'Todo'|@translate}">{' (?)'|@translate}</a>
228        <input type="checkbox" name="FBP_ASYNC_SCRIPT" {$advanced.FBP_ASYNC_SCRIPT} />
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="{'Todo'|@translate}">{' (?)'|@translate}</a>
237        <input type="checkbox" name="FBP_ASYNC_SCRIPT" {$advanced.FBP_ASYNC_SCRIPT} />
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="{'Todo'|@translate}">{' (?)'|@translate}</a>
246        <input type="checkbox" name="FBP_ASYNC_SCRIPT" {$advanced.FBP_ASYNC_SCRIPT} />
247      </label>
248    </li>
249  </ul>*}
250</fieldset>
251
252{/if}{* isset $advanced*}
253
254
255  <p>
256    <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}">
257    <input class="submit" type="reset" name="reset" value="{'Reset'|@translate}">
258  </p>
259
260</form>
261
262<div id="dialog_modal_like_button_comments" title="{'Informations'|@translate}">{'Like button and comments cannot be enabled together'|@translate}</div>
263{*<div id="dialog_modal_can_close" title="{'Informations'|@translate}">{'Data are modified but not saved! Are you sure to quit this tabsheet?'|@translate}</div>*}
264
265{literal}
266<script type="text/javascript">
267  function show_hide(checkbox_name, div_name)
268  {
269    if ($("input[name="+checkbox_name+"]").attr('checked'))
270    {
271      $("#"+div_name).show();
272    }
273    else
274    {
275      $("#"+div_name).hide();
276    }
277  }
278
279  function inverse_check_value(checkbox_name_1, checkbox_name_2)
280  {
281    if ($("input[name="+checkbox_name_1+"]").attr('checked') && $("input[name="+checkbox_name_2+"]").attr('checked'))
282    {
283      $("input[name="+checkbox_name_1+"]").attr('checked', false);
284      $("#dialog_modal_like_button_comments").dialog('open');
285    }
286  }
287
288  function init_checkbox(checkbox_name, div_name)
289  {
290    $("input[name="+checkbox_name+"]").click(
291      function()
292      {
293        show_hide(checkbox_name, div_name);
294      }
295    );
296    show_hide(checkbox_name, div_name);
297  }
298
299  function init_checkbox_with_inverse_value(checkbox_name_1, checkbox_name_2)
300  {
301    $("input[name="+checkbox_name_1+"]").click(
302      function()
303      {
304        inverse_check_value(checkbox_name_1, checkbox_name_2);
305      }
306    );
307    $("input[name="+checkbox_name_2+"]").click(
308      function()
309      {
310        inverse_check_value(checkbox_name_2, checkbox_name_1);
311      }
312    );
313  }
314
315  $(document).ready(
316    function()
317    {
318      //Init all main checkbox
319      init_checkbox_with_inverse_value("FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ENABLED", "FBP_SOCIAL_PLUGIN_COMMENTS_ENABLED");
320      init_checkbox("FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ENABLED", "like_button");
321      init_checkbox("FBP_SOCIAL_PLUGIN_FACEPILE_ENABLED", "facepile");
322      init_checkbox("FBP_SOCIAL_PLUGIN_COMMENTS_ENABLED", "comments");
323      init_checkbox("FBP_SOCIAL_PLUGIN_LIKE_BOX_ENABLED", "like_box");
324      // Init message box
325      $("#dialog_modal_like_button_comments").dialog({
326        autoOpen: false, modal: true, dialogClass: 'admin_config', // necessary to have a specific class because there are conflic with main menu accordeon
327        buttons: { "{/literal}{'Continue'|@translate}{literal}": function() { $(this).dialog("close"); } },
328      });
329      $("#dialog_modal_can_close").dialog({
330        autoOpen: false, modal: true, dialogClass: 'admin_config', // necessary to have a specific class because there are conflic with main menu accordeon
331        buttons: { "Cancel": function() { $(this).dialog("close"); }, "{/literal}{'Submit'|@translate}{literal}": function() { IsDataChanged = false; $(this).dialog("close"); } },
332      });
333      // Init help tips
334      $('.HelptipTip').tipTip({
335        'delay' : 0,
336        'fadeIn' : 200,
337        'fadeOut' : 200,
338      });
339      // Detect data change
340      /*IsDataChanged = false;
341      $("input, select").change(function() { IsDataChanged = true; });
342      //~ $(".tabsheet").click(function()
343      $(window).unload(function()
344        {
345          if (IsDataChanged)
346          {
347            //~ alert($(this).attr("name"));
348           //~ $("#dialog_modal_can_close").dialog( "option", "buttons", { "{/literal}{'Submit'|@translate}{literal}": function() { $(this).dialog("close"); } } );
349            $("#dialog_modal_can_close").dialog('open');
350           
351            //~ return true;
352            return false
353          }
354          else
355          {
356            return true;
357          }
358          //return ! IsDataChanged;
359        });*/
360    });
361</script>
362{/literal}
363
Note: See TracBrowser for help on using the repository browser.