{combine_script id="jquery.tipTip" path='themes/default/js/plugins/jquery.tipTip.minified.js' load='async'} {combine_css path=$FBP_PATH|@cat:"/css/admin.css"} {combine_css path="plugins/FacebookPlug/css/admin.css"}

FacebookPlug


{if isset($social_plugin)}

{'On picture pages'|@translate}

{'Like button'|@translate}
{'Facepile'|@translate} {'on slideshow pages'|@translate}
{'Comments'|@translate}

{'On menu of main pages'|@translate}

{'Activity feed'|@translate}
{'Like box'|@translate}

{'Other options are available by programming'|@translate}

{/if}{* isset $social_plugin*} {if isset($button)}
{'Share'|@translate}
{'Upload'|@translate}
{/if}{* isset $button*} {if isset($advanced)}
{'Options'|@translate}
{'Promote'|@translate}
{/if}{* isset $advanced*} {if isset($activity)}
{/if}{* isset $activity*} {if ! isset($activity)}

{/if}{* isset $activity*}

{'Develop by'|@translate} Ruben ARNAUD - {'Join Facebook Piwigo group'|@translate} - {'Via Facebook Piwigo application'|@translate}

{'Like button and comments cannot be enabled together'|@translate}
{*
{'Data are modified but not saved! Are you sure to quit this tabsheet?'|@translate}
*} {footer_script require='jquery.ui.dialog,jquery.tipTip'} {literal} function show_hide(checkbox_name, div_name) { if ($("input[name="+checkbox_name+"]").attr('checked')) { $("#"+div_name).show(); } else { $("#"+div_name).hide(); } } function inverse_check_value(checkbox_name_1, checkbox_name_2) { if ($("input[name="+checkbox_name_1+"]").attr('checked') && $("input[name="+checkbox_name_2+"]").attr('checked')) { $("input[name="+checkbox_name_1+"]").attr('checked', false); $("#dialog_modal_like_button_comments").dialog('open'); } } function init_checkbox(checkbox_name, div_name) { $("input[name="+checkbox_name+"]").click( function() { show_hide(checkbox_name, div_name); } ); show_hide(checkbox_name, div_name); } function init_checkbox_with_inverse_value(checkbox_name_1, checkbox_name_2) { $("input[name="+checkbox_name_1+"]").click( function() { inverse_check_value(checkbox_name_1, checkbox_name_2); } ); $("input[name="+checkbox_name_2+"]").click( function() { inverse_check_value(checkbox_name_2, checkbox_name_1); } ); } $(document).ready( function() { //Init all main checkbox init_checkbox_with_inverse_value("FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ENABLED", "FBP_SOCIAL_PLUGIN_COMMENTS_ENABLED"); init_checkbox("FBP_SOCIAL_PLUGIN_LIKE_BUTTON_ENABLED", "like_button"); init_checkbox("FBP_SOCIAL_PLUGIN_FACEPILE_ENABLED", "facepile"); init_checkbox("FBP_SOCIAL_PLUGIN_COMMENTS_ENABLED", "comments"); init_checkbox("FBP_SOCIAL_PLUGIN_ACTIVITY_FEED_ENABLED", "activity_feed"); init_checkbox("FBP_SOCIAL_PLUGIN_LIKE_BOX_ENABLED", "like_box"); // Init message box $("#dialog_modal_like_button_comments").dialog({ autoOpen: false, modal: true, dialogClass: 'admin_config', // necessary to have a specific class because there are conflic with main menu accordeon buttons: { "{/literal}{'Continue'|@translate}{literal}": function() { $(this).dialog("close"); } }, }); $("#dialog_modal_can_close").dialog({ autoOpen: false, modal: true, dialogClass: 'admin_config', // necessary to have a specific class because there are conflic with main menu accordeon buttons: { "Cancel": function() { $(this).dialog("close"); }, "{/literal}{'Submit'|@translate}{literal}": function() { IsDataChanged = false; $(this).dialog("close"); } }, }); // Init help tips $('.HelptipTip').tipTip({ 'delay' : 0, 'fadeIn' : 200, 'fadeOut' : 200, }); {/literal} {if $FBP_OLD_VERSION} // Hide non compatible option $('.OldVersion').hide(); {/if} {* // Detect data change IsDataChanged = false; $("input, select").change(function() { IsDataChanged = true; }); //~ $(".tabsheet").click(function() $(window).unload(function() { if (IsDataChanged) { //~ alert($(this).attr("name")); //~ $("#dialog_modal_can_close").dialog( "option", "buttons", { "{/literal}{'Submit'|@translate}{literal}": function() { $(this).dialog("close"); } } ); $("#dialog_modal_can_close").dialog('open'); //~ return true; return false } else { return true; } //return ! IsDataChanged; }); *} {literal} }); {/literal} {/footer_script}