Updating according to https://github.com/ldleman/Leed-market/issues/79
This commit is contained in:
parent
49634f657a
commit
b1ecbb1971
@ -143,11 +143,16 @@ function adblock_plugin_treat_events(&$events) {
|
||||
}
|
||||
|
||||
function adblock_plugin_setting_link(&$myUser) {
|
||||
$myUser = (isset($_SESSION['currentUser'])?unserialize($_SESSION['currentUser']):false);
|
||||
if($myUser!=false) {
|
||||
echo '
|
||||
<li class="pointer" onclick="$(\'#main section\').hide();$(\'#main #adblockSettingsBloc\').fadeToggle(200);">Adblock</li>';
|
||||
<li onclick="toggleBlocks(\'#adblockSettingsBloc\');"><a href="#adblockSettingsBloc">Adblock</a></li>';
|
||||
}
|
||||
}
|
||||
|
||||
function adblock_plugin_setting_bloc(&$myUser) {
|
||||
$myUser = (isset($_SESSION['currentUser'])?unserialize($_SESSION['currentUser']):false);
|
||||
if($myUser!=false) {
|
||||
$adblock_constants = file_get_contents('adblock_constants.php');
|
||||
$adblock_constants = explode("\n", $adblock_constants);
|
||||
|
||||
@ -179,11 +184,11 @@ function adblock_plugin_setting_bloc(&$myUser) {
|
||||
$getimagesize_available = function_exists("getimagesize") && ((ini_get("allow_url_fopen") == "1") ? true : false);
|
||||
|
||||
echo '
|
||||
<section id="adblockSettingsBloc">
|
||||
<form action="action.php?action=adblock_update" method="POST">
|
||||
<section id="adblockSettingsBloc" class="settingsPage">
|
||||
<article>
|
||||
<h2>Plugin Adblock</h2>
|
||||
<p><em>Note:</em><br/>
|
||||
You must enter a list of id of feeds in the blacklist / whitelist fields. This list must be one id per line. You can find the id of the feed you want in the address bar on the page of the feed in Leed (http://LEED_URL/index.php?action=selectedFeed&feed=ID).</p>
|
||||
<p><em>Note: </em> You must enter a list of id of feeds in the blacklist / whitelist fields. This list must be one id per line. You can find the id of the feed you want in the address bar on the page of the feed in Leed (http://LEED_URL/index.php?action=selectedFeed&feed=ID).</p>
|
||||
<form action="action.php?action=adblock_update" method="POST">
|
||||
<fieldset>
|
||||
<div class="flash_adblockSettingsBlock">
|
||||
<h3>Flash embedded contents:</h3>
|
||||
@ -237,8 +242,11 @@ function adblock_plugin_setting_bloc(&$myUser) {
|
||||
</form>
|
||||
</section>';
|
||||
}
|
||||
}
|
||||
|
||||
function adblock_plugin_setting_update($_) {
|
||||
$myUser = (isset($_SESSION['currentUser'])?unserialize($_SESSION['currentUser']):false);
|
||||
if($myUser!=false) {
|
||||
if($_['action'] == 'adblock_update') {
|
||||
$flash_enabled = (int) $_['flash_adblock_enable'];
|
||||
$flash_block = (int) $_['flash_adblock_default_behavior'];
|
||||
@ -259,6 +267,7 @@ function adblock_plugin_setting_update($_) {
|
||||
exit("Unable to write parameters to adblock_constants.php. Check permissions on the folders.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Plugin::addCSS("/css/adblock_plugin_css.css");
|
||||
Plugin::addJS("/js/adblock_plugin_js.js");
|
||||
|
Loading…
Reference in New Issue
Block a user