Merge pull request #411 from tobiasd/20170421-superblock

Superblock
pull/413/head
Michael Vogel 2017-04-21 14:14:59 +02:00 committed by GitHub
commit 7dde8842cf
2 changed files with 33 additions and 37 deletions

View File

@ -1,6 +1,6 @@
# ADDON blockem # ADDON superblock
# Copyright (C) # Copyright (C)
# This file is distributed under the same license as the Friendica blockem addon package. # This file is distributed under the same license as the Friendica superblock addon package.
# #
# #
#, fuzzy #, fuzzy
@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n" "POT-Creation-Date: 2017-04-21 08:45+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,35 +17,26 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: blockem.php:51 #: superblock.php:53 superblock.php:57
msgid "\"Blockem\" Settings" msgid "\"Superblock\""
msgstr "" msgstr ""
#: blockem.php:53 #: superblock.php:60
msgid "Comma separated profile URLS to block" msgid "Comma separated profile URLS to block"
msgstr "" msgstr ""
#: blockem.php:57 #: superblock.php:64
msgid "Submit" msgid "Save Settings"
msgstr "" msgstr ""
#: blockem.php:70 #: superblock.php:76
msgid "BLOCKEM Settings saved." msgid "SUPERBLOCK Settings saved."
msgstr "" msgstr ""
#: blockem.php:105 #: superblock.php:148
#, php-format msgid "Block Completely"
msgid "Blocked %s - Click to open/close"
msgstr "" msgstr ""
#: blockem.php:160 #: superblock.php:168
msgid "Unblock Author" msgid "superblock settings updated"
msgstr ""
#: blockem.php:162
msgid "Block Author"
msgstr ""
#: blockem.php:194
msgid "blockem settings updated"
msgstr "" msgstr ""

View File

@ -6,7 +6,7 @@
* Description: block people * Description: block people
* Version: 1.0 * Version: 1.0
* Author: Mike Macgirvin <http://macgirvin.com/profile/mike> * Author: Mike Macgirvin <http://macgirvin.com/profile/mike>
* *
*/ */
function superblock_install() { function superblock_install() {
@ -36,29 +36,34 @@ function superblock_uninstall() {
function superblock_addon_settings(&$a,&$s) { function superblock_addon_settings(&$a,&$s) {
if(! local_user()) if(! local_user()) {
return; return;
}
/* Add our stylesheet to the page so we can make our settings look nice */ /* Add our stylesheet to the page so we can make our settings look nice */
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/superblock/superblock.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/superblock/superblock.css' . '" media="all" />' . "\r\n";
$words = get_pconfig(local_user(),'system','blocked'); $words = get_pconfig(local_user(),'system','blocked');
if(! $words) if(! $words) {
$words = ''; $words = '';
}
$s .= '<div class="settings-block">'; $s .= '<span id="settings_superblock_inflated" class="settings-block fakelink" style="display: block;" onclick="openClose(\'settings_superblock_expanded\'); openClose(\'settings_superblock_inflated\');">';
$s .= '<h3>' . t('"Superblock" Settings') . '</h3>'; $s .= '<h3>' . t('"Superblock"') . '</h3>';
$s .= '<div id="superblock-wrapper">'; $s .= '</span>';
$s .= '<label id="superblock-label" for="superblock-words">' . t('Comma separated profile URLS to block') . ' </label>'; $s .= '<div id="settings_superblock_expanded" class="settings-block" style="display: none;">';
$s .= '<textarea id="superblock-words" type="text" name="superblock-words" >' . htmlspecialchars($words) . '</textarea>'; $s .= '<span class="fakelink" onclick="openClose(\'settings_superblock_expanded\'); openClose(\'settings_superblock_inflated\');">';
$s .= '</div><div class="clear"></div>'; $s .= '<h3>' . t('"Superblock"') . '</h3>';
$s .= '</span>';
$s .= '<div id="superblock-wrapper">';
$s .= '<label id="superblock-label" for="superblock-words">' . t('Comma separated profile URLS to block') . ' </label>';
$s .= '<textarea id="superblock-words" type="text" name="superblock-words" >' . htmlspecialchars($words) . '</textarea>';
$s .= '</div><div class="clear"></div>';
$s .= '<div class="settings-submit-wrapper" ><input type="submit" id="superblock-submit" name="superblock-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div></div>'; $s .= '<div class="settings-submit-wrapper" ><input type="submit" id="superblock-submit" name="superblock-submit" class="settings-submit" value="' . t('Save Settings') . '" /></div></div>';
return; return;
} }
function superblock_addon_settings_post(&$a,&$b) { function superblock_addon_settings_post(&$a,&$b) {