From 260415fb5f1550dc12a09eac57290802121831ba Mon Sep 17 00:00:00 2001 From: asiekierka Date: Sun, 23 Dec 2012 19:01:59 +0100 Subject: [PATCH] fixed to english --- atencja.php => attentionbar.php | 8 ++++---- atencja.txt => attentionbar.txt | 0 inc/config.php | 6 +++--- js/attention-bar.js | 8 ++++++++ js/pasek_atencji.js | 8 -------- templates/attention_bar.html | 10 ++++++++++ templates/pasek_atencji.html | 12 ------------ 7 files changed, 25 insertions(+), 27 deletions(-) rename atencja.php => attentionbar.php (53%) rename atencja.txt => attentionbar.txt (100%) create mode 100644 js/attention-bar.js delete mode 100644 js/pasek_atencji.js create mode 100644 templates/attention_bar.html delete mode 100644 templates/pasek_atencji.html diff --git a/atencja.php b/attentionbar.php similarity index 53% rename from atencja.php rename to attentionbar.php index edbfad89..e928daae 100644 --- a/atencja.php +++ b/attentionbar.php @@ -1,10 +1,10 @@ 0) { - file_put_contents("atencja.txt",$_POST["tekst"]); + checkBan(); + if(@strlen($_POST["text"])>0) { + file_put_contents("attentionbar.txt",$_POST["text"]); if(strlen($_SERVER['HTTP_REFERER'])>0) { header('Location: ' . $_SERVER['HTTP_REFERER']); } else { header('Location: /'); } - } else print(file_get_contents("atencja.txt")); + } else print(file_get_contents("attentionbar.txt")); return; ?> diff --git a/atencja.txt b/attentionbar.txt similarity index 100% rename from atencja.txt rename to attentionbar.txt diff --git a/inc/config.php b/inc/config.php index 9d4532c5..3fad8857 100644 --- a/inc/config.php +++ b/inc/config.php @@ -500,10 +500,10 @@ // How many reports you can create in the same request. $config['report_limit'] = 3; - // Pasek atencji - // REMEMBER TO CHMOD atencja.txt PROPERLY + // Attention Whoring Bar + // REMEMBER TO CHMOD attentionbar.txt PROPERLY // Oh, and add jQuery in additional_javascript. - $config['pasek_atencji'] = false; + $config['attention_bar'] = false; /* * ==================== * Display settings diff --git a/js/attention-bar.js b/js/attention-bar.js new file mode 100644 index 00000000..52bd68ed --- /dev/null +++ b/js/attention-bar.js @@ -0,0 +1,8 @@ +$(document).ready(function(){ + $("#attention_bar").click(function(eO){ $("#attention_bar").css("display","none"); + $("#attention_bar_form").css("display","block"); }); + $.get("/attentionbar.php", function(data) { + $("#attention_bar").text(data); + $("#attention_bar_input").val(data); + }); +}); diff --git a/js/pasek_atencji.js b/js/pasek_atencji.js deleted file mode 100644 index 26b3b8d9..00000000 --- a/js/pasek_atencji.js +++ /dev/null @@ -1,8 +0,0 @@ -$(document).ready(function(){ - $("#pasek_atencji").click(function(eO){ $("#pasek_atencji").css("display","none"); - $("#pasek_atencji_forma").css("display","block"); }); - $.get("/atencja.php", function(data) { - $("#pasek_atencji").text(data); - $("#pasek_atencji_input").val(data); - }); -}); diff --git a/templates/attention_bar.html b/templates/attention_bar.html new file mode 100644 index 00000000..44afc78e --- /dev/null +++ b/templates/attention_bar.html @@ -0,0 +1,10 @@ +{% if config.attention_bar %} +
+ + + + +{% endif %} diff --git a/templates/pasek_atencji.html b/templates/pasek_atencji.html deleted file mode 100644 index 98f2e29b..00000000 --- a/templates/pasek_atencji.html +++ /dev/null @@ -1,12 +0,0 @@ -{% if config.pasek_atencji %} -
- -
- - - -{% endif %}