Merge branch 'develop' into bugfix/core-GS-5596

pull/733/head
Jeroen De Meerleer 2018-12-20 17:31:35 +01:00
commit 5535fa9fd2
867 changed files with 24122 additions and 2186 deletions

View File

@ -2,33 +2,26 @@ Addons for Friendica
====================
This repository is a collection of addons for the [Friendica Social Communications Server](https://github.com/friendica/friendica).
You can add these addons to the /addon directory of your Friendica installation
do extend the functionality of your node.
You can add these addons to the /addon directory of your Friendica installation do extend the functionality of your node.
After uploading the addons to your server, you need to activate the desired addons
in the Admin panel. Addons not activated have no effect on your node.
After uploading the addons to your server, you need to activate the desired addons in the Admin panel. Addons not activated have no effect on your node.
You can find more addons in the [Friendica Addon listing](https://addons.friendo.ca)
in cases the addon developers have choosen not to include them here.
You can find more addons in the [Friendica Addon listing](https://addons.friendo.ca) in cases the addon developers have choosen not to include them here.
Connectors
----------
## Connectors
Among these addons there are also the [connectors](https://github.com/friendica/friendica/blob/master/doc/Connectors.md) for various other networks
(e.g. Twitter, pump.io, Google+) that are needed for communication when the
protocoll is not supported by Friendica core (DFRN, OStatus and Diaspora).
Among these addons there are also the [connectors](https://github.com/friendica/friendica/blob/master/doc/Connectors.md) for various other networks (e.g. Twitter, pump.io, Google+) that are needed for communication when the protocol is not supported by Friendica core (DFRN, OStatus and Diaspora).
For communication with contacts in networks supporting those (e.g. GNU social,
Diaspora and red#matrix) you just need to access the page configuration in the
Admin panel and enable them. For networks where communication is only possible
the API access to a remote account, you need to activate the fitting connectors.
For communication with contacts in networks supporting those (e.g. GNU social, Diaspora and red#matrix) you just need to access the page configuration in the Admin panel and enable them. For networks where communication is only possible the API access to a remote account, you need to activate the fitting connectors.
Development
-----------
## Development
The addon interface of Friendica is very flexible and powerful, so if you are
missing functionality, your chances are high it may be added with an addon.
See the [documentation](https://github.com/friendica/friendica/blob/master/doc/Addons.md) for more informations on the addon development.
The addon interface of Friendica is very flexible and powerful, so if you are missing functionality, your chances are high it may be added with an addon.
See the [documentation](https://github.com/friendica/friendica/blob/master/doc/Addons.md) for more information on the addon development.
Addons can be translated like any other part of Friendica. Translations for the
addons included in this repository are done at the [Transifex project](https://www.transifex.com/projects/p/friendica/) for Friendica.
## Translation
Addons can be translated like any other part of Friendica.
Translation for addons is done at [the Transifex Friendica page](https://www.transifex.com/Friendica/friendica/dashboard/).
Read more about the workflow in the [Friendica translation documentation](https://github.com/friendica/friendica/blob/master/doc/translations.md#addon).

View File

@ -34,11 +34,13 @@
*/
use Friendica\App;
use Friendica\BaseModule;
use Friendica\Content\Text\Markdown;
use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\Database\DBStructure;
use Friendica\Model\Item;
@ -53,7 +55,6 @@ use Symfony\Component\ExpressionLanguage;
require_once 'boot.php';
require_once 'include/conversation.php';
require_once 'include/dba.php';
require_once 'include/security.php';
require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
@ -65,7 +66,7 @@ function advancedcontentfilter_install()
DBStructure::update(false, true);
logger("installed advancedcontentfilter");
Logger::log("installed advancedcontentfilter");
}
function advancedcontentfilter_uninstall()
@ -90,7 +91,7 @@ function advancedcontentfilter_dbstructure_definition(App $a, &$database)
"expression" => ["type" => "mediumtext" , "not null" => "1", "comment" => "Expression text"],
"serialized" => ["type" => "mediumtext" , "not null" => "1", "comment" => "Serialized parsed expression"],
"active" => ["type" => "boolean" , "not null" => "1", "default" => "1", "comment" => "Whether the rule is active or not"],
"created" => ["type" => "datetime" , "not null" => "1", "default" => NULL_DATE, "comment" => "Creation date"],
"created" => ["type" => "datetime" , "not null" => "1", "default" => DBA::NULL_DATETIME, "comment" => "Creation date"],
],
"indexes" => [
"PRIMARY" => ["id"],
@ -207,8 +208,8 @@ function advancedcontentfilter_content(App $a)
return $html;
} else {
$t = get_markup_template('settings.tpl', 'addon/advancedcontentfilter/');
return replace_macros($t, [
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/advancedcontentfilter/');
return Renderer::replaceMacros($t, [
'$messages' => [
'backtosettings' => L10n::t('Back to Addon Settings'),
'title' => L10n::t('Advanced Content Filter'),
@ -234,7 +235,7 @@ function advancedcontentfilter_content(App $a)
],
'$current_theme' => $a->getCurrentTheme(),
'$rules' => advancedcontentfilter_get_rules(),
'$form_security_token' => get_form_security_token()
'$form_security_token' => BaseModule::getFormSecurityToken()
]);
}
}
@ -322,7 +323,7 @@ function advancedcontentfilter_post_rules(ServerRequestInterface $request)
throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method'));
}
if (!check_form_security_token()) {
if (!BaseModule::checkFormSecurityToken()) {
throw new HTTPException\BadRequestException(L10n::t('Invalid form security token, please refresh the page.'));
}
@ -356,7 +357,7 @@ function advancedcontentfilter_put_rules_id(ServerRequestInterface $request, Res
throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method'));
}
if (!check_form_security_token()) {
if (!BaseModule::checkFormSecurityToken()) {
throw new HTTPException\BadRequestException(L10n::t('Invalid form security token, please refresh the page.'));
}
@ -385,7 +386,7 @@ function advancedcontentfilter_delete_rules_id(ServerRequestInterface $request,
throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method'));
}
if (!check_form_security_token()) {
if (!BaseModule::checkFormSecurityToken()) {
throw new HTTPException\BadRequestException(L10n::t('Invalid form security token, please refresh the page.'));
}

View File

@ -5,7 +5,7 @@
"authors": [
{
"name": "Hypolite Petovan",
"email": "mrpetovan@gmail.com",
"email": "hypolite@mrpetovan.com",
"homepage": "https://friendica.mrpetovan.com/profile/hypolite",
"role": "Developer"
}

View File

@ -0,0 +1,167 @@
# ADDON advancedcontentfilter
# Copyright (C)
# This file is distributed under the same license as the Friendica advancedcontentfilter addon package.
#
#
# Translators:
# Marie Olive <lacellule101@gmail.com>, 2018
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-17 04:04+0200\n"
"PO-Revision-Date: 2018-05-24 06:41+0000\n"
"Last-Translator: Marie Olive <lacellule101@gmail.com>, 2018\n"
"Language-Team: French (https://www.transifex.com/Friendica/teams/12172/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: advancedcontentfilter.php:134
#, php-format
msgid "Filtered by rule: %s"
msgstr "Filtrer par règle:%s"
#: advancedcontentfilter.php:147 advancedcontentfilter.php:204
msgid "Advanced Content Filter"
msgstr "Filtre avancé de contenu"
#: advancedcontentfilter.php:203
msgid "Back to Addon Settings"
msgstr "Retour aux paramètres de l'extension"
#: advancedcontentfilter.php:205
msgid "Add a Rule"
msgstr "Ajouter une règle"
#: advancedcontentfilter.php:206
msgid "Help"
msgstr "Aide"
#: advancedcontentfilter.php:207
msgid ""
"Add and manage your personal content filter rules in this screen. Rules have"
" a name and an arbitrary expression that will be matched against post data. "
"For a complete reference of the available operations and variables, check "
"the <a href=\"advancedcontentfilter/help\">help page</a>."
msgstr ""
#: advancedcontentfilter.php:208
msgid "Your rules"
msgstr "Vos règles"
#: advancedcontentfilter.php:209
msgid ""
"You have no rules yet! Start adding one by clicking on the button above next"
" to the title."
msgstr ""
#: advancedcontentfilter.php:210
msgid "Disabled"
msgstr ""
#: advancedcontentfilter.php:211
msgid "Enabled"
msgstr ""
#: advancedcontentfilter.php:212
msgid "Disable this rule"
msgstr ""
#: advancedcontentfilter.php:213
msgid "Enable this rule"
msgstr ""
#: advancedcontentfilter.php:214
msgid "Edit this rule"
msgstr ""
#: advancedcontentfilter.php:215
msgid "Edit the rule"
msgstr ""
#: advancedcontentfilter.php:216
msgid "Save this rule"
msgstr ""
#: advancedcontentfilter.php:217
msgid "Delete this rule"
msgstr ""
#: advancedcontentfilter.php:218
msgid "Rule"
msgstr ""
#: advancedcontentfilter.php:219
msgid "Close"
msgstr ""
#: advancedcontentfilter.php:220
msgid "Add new rule"
msgstr ""
#: advancedcontentfilter.php:221
msgid "Rule Name"
msgstr ""
#: advancedcontentfilter.php:222
msgid "Rule Expression"
msgstr ""
#: advancedcontentfilter.php:223
msgid ""
"<p>Examples:</p><ul><li><pre>author_link == "
"'https://friendica.mrpetovan.com/profile/hypolite'</pre></li><li>tags</li></ul>"
msgstr ""
#: advancedcontentfilter.php:224
msgid "Cancel"
msgstr ""
#: advancedcontentfilter.php:290 advancedcontentfilter.php:301
#: advancedcontentfilter.php:312 advancedcontentfilter.php:346
#: advancedcontentfilter.php:375 advancedcontentfilter.php:396
msgid "You must be logged in to use this method"
msgstr ""
#: advancedcontentfilter.php:316 advancedcontentfilter.php:350
#: advancedcontentfilter.php:379
msgid "Invalid form security token, please refresh the page."
msgstr ""
#: advancedcontentfilter.php:328
msgid "The rule name and expression are required."
msgstr ""
#: advancedcontentfilter.php:340
msgid "Rule successfully added"
msgstr ""
#: advancedcontentfilter.php:354 advancedcontentfilter.php:383
msgid "Rule doesn't exist or doesn't belong to you."
msgstr ""
#: advancedcontentfilter.php:369
msgid "Rule successfully updated"
msgstr ""
#: advancedcontentfilter.php:390
msgid "Rule successfully deleted"
msgstr ""
#: advancedcontentfilter.php:400
msgid "Missing argument: guid."
msgstr ""
#: advancedcontentfilter.php:406
#, php-format
msgid "Unknown post with guid: %s"
msgstr ""
#: src/middlewares.php:28
msgid "Method not found"
msgstr ""

View File

@ -0,0 +1,41 @@
<?php
if(! function_exists("string_plural_select_fr")) {
function string_plural_select_fr($n){
$n = intval($n);
return ($n > 1);;
}}
;
$a->strings["Filtered by rule: %s"] = "Filtrer par règle:%s";
$a->strings["Advanced Content Filter"] = "Filtre avancé de contenu";
$a->strings["Back to Addon Settings"] = "Retour aux paramètres de l'extension";
$a->strings["Add a Rule"] = "Ajouter une règle";
$a->strings["Help"] = "Aide";
$a->strings["Add and manage your personal content filter rules in this screen. Rules have a name and an arbitrary expression that will be matched against post data. For a complete reference of the available operations and variables, check the <a href=\"advancedcontentfilter/help\">help page</a>."] = "";
$a->strings["Your rules"] = "Vos règles";
$a->strings["You have no rules yet! Start adding one by clicking on the button above next to the title."] = "";
$a->strings["Disabled"] = "";
$a->strings["Enabled"] = "";
$a->strings["Disable this rule"] = "";
$a->strings["Enable this rule"] = "";
$a->strings["Edit this rule"] = "";
$a->strings["Edit the rule"] = "";
$a->strings["Save this rule"] = "";
$a->strings["Delete this rule"] = "";
$a->strings["Rule"] = "";
$a->strings["Close"] = "";
$a->strings["Add new rule"] = "";
$a->strings["Rule Name"] = "";
$a->strings["Rule Expression"] = "";
$a->strings["<p>Examples:</p><ul><li><pre>author_link == 'https://friendica.mrpetovan.com/profile/hypolite'</pre></li><li>tags</li></ul>"] = "";
$a->strings["Cancel"] = "";
$a->strings["You must be logged in to use this method"] = "";
$a->strings["Invalid form security token, please refresh the page."] = "";
$a->strings["The rule name and expression are required."] = "";
$a->strings["Rule successfully added"] = "";
$a->strings["Rule doesn't exist or doesn't belong to you."] = "";
$a->strings["Rule successfully updated"] = "";
$a->strings["Rule successfully deleted"] = "";
$a->strings["Missing argument: guid."] = "";
$a->strings["Unknown post with guid: %s"] = "";
$a->strings["Method not found"] = "";

View File

@ -1,4 +1,5 @@
<?php
use Friendica\Core\L10n;
$container = $slim->getContainer();

View File

@ -52,6 +52,8 @@
use Friendica\Core\Config;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
function blackout_install() {
Addon::registerHook('page_header', 'addon/blackout/blackout.php', 'blackout_redirect');
@ -84,8 +86,8 @@ function blackout_redirect ($a, $b) {
$date2 = 0;
}
if (( $date1 <= $now ) && ( $now <= $date2 )) {
logger('redirecting user to blackout page');
goaway($myurl);
Logger::log('redirecting user to blackout page');
System::externalRedirect($myurl);
}
}
@ -96,9 +98,9 @@ function blackout_addon_admin(&$a, &$o) {
if (! is_string($myend)) { $myend = "YYYY-MM-DD:hhmm"; }
$myurl = Config::get('blackout','url');
if (! is_string($myurl)) { $myurl = "http://www.example.com"; }
$t = get_markup_template( "admin.tpl", "addon/blackout/" );
$t = Renderer::getMarkupTemplate( "admin.tpl", "addon/blackout/" );
$o = replace_macros($t, [
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$rurl' => ["rurl", "Redirect URL", $myurl, "all your visitors from the web will be redirected to this URL"],
'$startdate' => ["startdate", "Begin of the Blackout<br />(YYYY-MM-DD hh:mm)", $mystart, "format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute"],

View File

@ -4,24 +4,25 @@
#
#
# Translators:
# Michal Šupler <msupler@gmail.com>, 2014
# Aditoo, 2018
# michal_s <msupler@gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 13:18+0200\n"
"PO-Revision-Date: 2014-07-02 15:28+0000\n"
"Last-Translator: Michal Šupler <msupler@gmail.com>\n"
"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n"
"PO-Revision-Date: 2018-09-02 17:54+0000\n"
"Last-Translator: Aditoo\n"
"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
#: blackout.php:99
msgid "Save Settings"
msgstr "Uložit Nastavení"
msgstr "Uložit nastavení"
#: blackout.php:100
msgid "Redirect URL"
@ -49,4 +50,4 @@ msgstr "Konec odstávky"
msgid ""
"The end-date is prior to the start-date of the blackout, you should fix "
"this."
msgstr "Datum konce odstávky je před datem zahájení odstávky prosím opravte to."
msgstr "Datum konce odstávky je před datem zahájení odstávky, prosím opravte to."

View File

@ -2,13 +2,14 @@
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;;
$n = intval($n);
return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
}}
;
$a->strings["Save Settings"] = "Uložit Nastavení";
$a->strings["Save Settings"] = "Uložit nastavení";
$a->strings["Redirect URL"] = "URL Přesměrování";
$a->strings["all your visitors from the web will be redirected to this URL"] = "všichni vaši návštěvníci z webu budou přesměrování na tuto URL adresu";
$a->strings["Begin of the Blackout"] = "Zahájení odstávky";
$a->strings["format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute"] = "formát je <em>RRRR</em> rok, <em>MM</em> měsíc, <em>DD</em> den, <em>hh</em> hodina a <em>mm</em> minuta";
$a->strings["End of the Blackout"] = "Konec odstávky";
$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "Datum konce odstávky je před datem zahájení odstávky prosím opravte to.";
$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "Datum konce odstávky je před datem zahájení odstávky, prosím opravte to.";

View File

@ -5,14 +5,14 @@
#
# Translators:
# Damien Goutte-Gattat <damien+transifex@incenp.org>, 2015
# Hypolite Petovan <mrpetovan@gmail.com>, 2016
# Hypolite Petovan <hypolite@mrpetovan.com>, 2016
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 13:18+0200\n"
"PO-Revision-Date: 2016-09-24 02:13+0000\n"
"Last-Translator: Hypolite Petovan <mrpetovan@gmail.com>\n"
"Last-Translator: Hypolite Petovan <hypolite@mrpetovan.com>\n"
"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -4,14 +4,15 @@
#
#
# Translators:
# Jonatan Nyberg <jonatan@autistici.org>, 2017
# Jonatan Nyberg, 2017
# Tim Stahel <transifex@swedneck.xyz>, 2018
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 13:18+0200\n"
"PO-Revision-Date: 2017-02-13 20:15+0000\n"
"Last-Translator: Jonatan Nyberg <jonatan@autistici.org>\n"
"PO-Revision-Date: 2018-11-13 12:35+0000\n"
"Last-Translator: Tim Stahel <transifex@swedneck.xyz>\n"
"Language-Team: Swedish (http://www.transifex.com/Friendica/friendica/language/sv/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -25,28 +26,28 @@ msgstr "Spara inställningar"
#: blackout.php:100
msgid "Redirect URL"
msgstr ""
msgstr "Omdirigera URL"
#: blackout.php:100
msgid "all your visitors from the web will be redirected to this URL"
msgstr ""
msgstr "alla dina besökare från webben kommer omdirigeras till denna URL"
#: blackout.php:101
msgid "Begin of the Blackout"
msgstr ""
msgstr "Start av blackouten"
#: blackout.php:101
msgid ""
"format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, "
"<em>hh</em> hour and <em>mm</em> minute"
msgstr ""
msgstr "format är <em>ÅÅÅÅ</em> år, <em>MM</em> månad, <em>DD</em> dag, <em>hh</em> timma och <em>mm</em> minut"
#: blackout.php:102
msgid "End of the Blackout"
msgstr ""
msgstr "Slut av blackouten"
#: blackout.php:108
msgid ""
"The end-date is prior to the start-date of the blackout, you should fix "
"this."
msgstr ""
msgstr "Slutdatumet är före startdatumet för blackouten, du borde fixa detta."

View File

@ -2,13 +2,14 @@
if(! function_exists("string_plural_select_sv")) {
function string_plural_select_sv($n){
$n = intval($n);
return ($n != 1);;
}}
;
$a->strings["Save Settings"] = "Spara inställningar";
$a->strings["Redirect URL"] = "";
$a->strings["all your visitors from the web will be redirected to this URL"] = "";
$a->strings["Begin of the Blackout"] = "";
$a->strings["format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute"] = "";
$a->strings["End of the Blackout"] = "";
$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "";
$a->strings["Redirect URL"] = "Omdirigera URL";
$a->strings["all your visitors from the web will be redirected to this URL"] = "alla dina besökare från webben kommer omdirigeras till denna URL";
$a->strings["Begin of the Blackout"] = "Start av blackouten";
$a->strings["format is <em>YYYY</em> year, <em>MM</em> month, <em>DD</em> day, <em>hh</em> hour and <em>mm</em> minute"] = "format är <em>ÅÅÅÅ</em> år, <em>MM</em> månad, <em>DD</em> dag, <em>hh</em> timma och <em>mm</em> minut";
$a->strings["End of the Blackout"] = "Slut av blackouten";
$a->strings["The end-date is prior to the start-date of the blackout, you should fix this."] = "Slutdatumet är före startdatumet för blackouten, du borde fixa detta.";

View File

@ -11,6 +11,7 @@ use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Util\Strings;
function blockem_install()
{
@ -42,7 +43,7 @@ function blockem_addon_settings (App $a, &$s)
}
/* 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/blockem/blockem.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/blockem/blockem.css' . '" media="all" />' . "\r\n";
$words = PConfig::get(local_user(), 'blockem', 'words');
@ -100,7 +101,7 @@ function blockem_enotify_store(App $a, array &$b)
continue;
}
if (link_compare($b['url'], $word)) {
if (Strings::compareLink($b['url'], $word)) {
$found = true;
break;
}
@ -133,7 +134,7 @@ function blockem_prepare_body_content_filter(App $a, array &$hook_data)
$found = false;
foreach ($profiles_array as $word) {
if (link_compare($hook_data['item']['author-link'], trim($word))) {
if (Strings::compareLink($hook_data['item']['author-link'], trim($word))) {
$found = true;
break;
}
@ -147,7 +148,7 @@ function blockem_prepare_body_content_filter(App $a, array &$hook_data)
function blockem_display_item(App $a, array &$b = null)
{
if (!empty($b['output']['body']) && strstr($b['output']['body'], 'id="blockem-wrap-')) {
$b['output']['thumb'] = $a->get_baseurl() . "/images/person-80.jpg";
$b['output']['thumb'] = $a->getBaseURL() . "/images/person-80.jpg";
}
}
@ -192,7 +193,7 @@ function blockem_item_photo_menu(App $a, array &$b)
if (!empty($a->data['blockem'])) {
foreach($a->data['blockem'] as $bloke) {
if (link_compare($bloke,$author)) {
if (Strings::compareLink($bloke,$author)) {
$blocked = true;
break;
}
@ -231,7 +232,7 @@ function blockem_init(App $a)
if (count($arr)) {
foreach ($arr as $x) {
if (!link_compare(trim($x), trim($_GET['unblock']))) {
if (!Strings::compareLink(trim($x), trim($_GET['unblock']))) {
$newarr[] = $x;
}
}

View File

@ -0,0 +1,61 @@
# ADDON blockem
# Copyright (C)
# This file is distributed under the same license as the Friendica blockem addon package.
#
#
# Translators:
# Hypolite Petovan <hypolite@mrpetovan.com>, 2016
# Marie Olive <lacellule101@gmail.com>, 2018
# StefOfficiel <pichard.stephane@free.fr>, 2015
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-17 10:23+0200\n"
"PO-Revision-Date: 2018-11-13 12:55+0000\n"
"Last-Translator: Marie Olive <lacellule101@gmail.com>\n"
"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: blockem.php:54 blockem.php:58
msgid "Blockem"
msgstr "Blockem"
#: blockem.php:62
msgid ""
"Hides user's content by collapsing posts. Also replaces their avatar with "
"generic image."
msgstr "Cache le contenu de l'utilisateur en contractant les publications. Remplace aussi leur avatar par une image générique."
#: blockem.php:63
msgid "Comma separated profile URLS:"
msgstr "URLs de profil séparées par des virgules:"
#: blockem.php:67
msgid "Save Settings"
msgstr "Sauvegarder les paramètres"
#: blockem.php:81
msgid "BLOCKEM Settings saved."
msgstr "Paramètres Blockem sauvegardés."
#: blockem.php:143
#, php-format
msgid "Filtered user: %s"
msgstr "Utilisateur filtré:%s"
#: blockem.php:202
msgid "Unblock Author"
msgstr "Débloquer l'Auteur"
#: blockem.php:204
msgid "Block Author"
msgstr "Bloquer l'Auteur"
#: blockem.php:244
msgid "blockem settings updated"
msgstr "Réglages Blockem mis à jour."

View File

@ -1,10 +1,2 @@
<?php
$a->strings["\"Blockem\" Settings"] = "Réglages de Blockem";
$a->strings["Comma separated profile URLS to block"] = "Liste d'URLS de profils à bloquer, séparés par des virgules";
$a->strings["Submit"] = "Envoyer";
$a->strings["BLOCKEM Settings saved."] = "Réglages Blockem sauvés.";
$a->strings["Blocked %s - Click to open/close"] = "Bloqué %s - Cliquez pour ouvrir/fermer";
$a->strings["Unblock Author"] = "Débloquer l'auteur";
$a->strings["Block Author"] = "Bloquer l'auteur";
$a->strings["blockem settings updated"] = "Réglages blockem sauvés";
<?php

View File

@ -10,11 +10,14 @@ use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Util\Network;
use Friendica\Util\XML;
function blogger_install()
{
Addon::registerHook('hook_fork', 'addon/blogger/blogger.php', 'blogger_hook_fork');
Addon::registerHook('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
Addon::registerHook('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
Addon::registerHook('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
@ -24,6 +27,7 @@ function blogger_install()
function blogger_uninstall()
{
Addon::unregisterHook('hook_fork', 'addon/blogger/blogger.php', 'blogger_hook_fork');
Addon::unregisterHook('post_local', 'addon/blogger/blogger.php', 'blogger_post_local');
Addon::unregisterHook('notifier_normal', 'addon/blogger/blogger.php', 'blogger_send');
Addon::unregisterHook('jot_networks', 'addon/blogger/blogger.php', 'blogger_jot_nets');
@ -62,7 +66,7 @@ function blogger_settings(App $a, &$s)
/* 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/blogger/blogger.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/blogger/blogger.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
@ -120,14 +124,29 @@ function blogger_settings(App $a, &$s)
function blogger_settings_post(App $a, array &$b)
{
if (!empty($_POST['blogger-submit'])) {
PConfig::set(local_user(), 'blogger', 'post', intval($_POST['blogger']));
PConfig::set(local_user(), 'blogger', 'post_by_default', intval($_POST['bl_bydefault']));
PConfig::set(local_user(), 'blogger', 'post', defaults($_POST, 'blogger', false));
PConfig::set(local_user(), 'blogger', 'post_by_default', defaults($_POST, 'bl_bydefault', false));
PConfig::set(local_user(), 'blogger', 'bl_username', trim($_POST['bl_username']));
PConfig::set(local_user(), 'blogger', 'bl_password', trim($_POST['bl_password']));
PConfig::set(local_user(), 'blogger', 'bl_blog', trim($_POST['bl_blog']));
}
}
function blogger_hook_fork(App &$a, array &$b)
{
if ($b['name'] != 'notifier_normal') {
return;
}
$post = $b['data'];
if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) ||
!strstr($post['postopts'], 'blogger') || ($post['parent'] != $post['id'])) {
$b['execute'] = false;
return;
}
}
function blogger_post_local(App $a, array &$b)
{
// This can probably be changed to allow editing by pointing to a different API endpoint
@ -146,7 +165,7 @@ function blogger_post_local(App $a, array &$b)
$bl_post = intval(PConfig::get(local_user(), 'blogger', 'post'));
$bl_enable = (($bl_post && x($_REQUEST, 'blogger_enable')) ? intval($_REQUEST['blogger_enable']) : 0);
$bl_enable = (($bl_post && !empty($_REQUEST['blogger_enable'])) ? intval($_REQUEST['blogger_enable']) : 0);
if ($b['api_source'] && intval(PConfig::get(local_user(), 'blogger', 'post_by_default'))) {
$bl_enable = 1;
@ -177,14 +196,14 @@ function blogger_send(App $a, array &$b)
return;
}
$bl_username = xmlify(PConfig::get($b['uid'], 'blogger', 'bl_username'));
$bl_password = xmlify(PConfig::get($b['uid'], 'blogger', 'bl_password'));
$bl_username = XML::escape(PConfig::get($b['uid'], 'blogger', 'bl_username'));
$bl_password = XML::escape(PConfig::get($b['uid'], 'blogger', 'bl_password'));
$bl_blog = PConfig::get($b['uid'], 'blogger', 'bl_blog');
if ($bl_username && $bl_password && $bl_blog) {
$title = '<title>' . (($b['title']) ? $b['title'] : L10n::t('Post from Friendica')) . '</title>';
$post = $title . BBCode::convert($b['body']);
$post = xmlify($post);
$post = XML::escape($post);
$xml = <<< EOT
<?xml version=\"1.0\" encoding=\"utf-8\"?>
@ -202,12 +221,12 @@ function blogger_send(App $a, array &$b)
EOT;
logger('blogger: data: ' . $xml, LOGGER_DATA);
Logger::log('blogger: data: ' . $xml, Logger::DATA);
if ($bl_blog !== 'test') {
$x = Network::post($bl_blog, $xml);
$x = Network::post($bl_blog, $xml)->getBody();
}
logger('posted to blogger: ' . (($x) ? $x : ''), LOGGER_DEBUG);
Logger::log('posted to blogger: ' . (($x) ? $x : ''), Logger::DEBUG);
}
}

View File

@ -4,14 +4,16 @@
#
#
# Translators:
# Nicola Spanti <translations@nicola-spanti.info>, 2015
# Hypolite Petovan <hypolite@mrpetovan.com>, 2016
# Marie Olive <lacellule101@gmail.com>, 2018
# RyDroid <inactive+RyDroid@transifex.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 13:18+0200\n"
"PO-Revision-Date: 2015-08-30 17:07+0000\n"
"Last-Translator: Nicola Spanti <translations@nicola-spanti.info>\n"
"PO-Revision-Date: 2018-11-13 12:44+0000\n"
"Last-Translator: Marie Olive <lacellule101@gmail.com>\n"
"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -25,11 +27,11 @@ msgstr "Poster sur Blogger"
#: blogger.php:74 blogger.php:78
msgid "Blogger Export"
msgstr ""
msgstr "Export Blogger"
#: blogger.php:82
msgid "Enable Blogger Post Addon"
msgstr "Activer le connecteur Blogger"
msgstr "Activer l'extension de publication Blogger"
#: blogger.php:87
msgid "Blogger username"
@ -45,7 +47,7 @@ msgstr "URL de l'API de Blogger"
#: blogger.php:102
msgid "Post to Blogger by default"
msgstr ""
msgstr "Poster sur Blogger par défaut"
#: blogger.php:108
msgid "Save Settings"
@ -53,4 +55,4 @@ msgstr "Sauvegarder les paramètres"
#: blogger.php:178
msgid "Post from Friendica"
msgstr ""
msgstr "Publier depuis Friendica"

View File

@ -2,15 +2,16 @@
if(! function_exists("string_plural_select_fr")) {
function string_plural_select_fr($n){
$n = intval($n);
return ($n > 1);;
}}
;
$a->strings["Post to blogger"] = "Poster sur Blogger";
$a->strings["Blogger Export"] = "";
$a->strings["Enable Blogger Post Addon"] = "Activer le connecteur Blogger";
$a->strings["Blogger Export"] = "Export Blogger";
$a->strings["Enable Blogger Post Addon"] = "Activer l'extension de publication Blogger";
$a->strings["Blogger username"] = "Nom d'utilisateur Blogger";
$a->strings["Blogger password"] = "Mot de passe Blogger";
$a->strings["Blogger API URL"] = "URL de l'API de Blogger";
$a->strings["Post to Blogger by default"] = "";
$a->strings["Post to Blogger by default"] = "Poster sur Blogger par défaut";
$a->strings["Save Settings"] = "Sauvegarder les paramètres";
$a->strings["Post from Friendica"] = "";
$a->strings["Post from Friendica"] = "Publier depuis Friendica";

View File

@ -12,14 +12,18 @@ use Friendica\Content\Text\Plaintext;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\Model\ItemContent;
use Friendica\Util\Proxy as ProxyUtils;
use Friendica\Util\Strings;
function buffer_install()
{
Addon::registerHook('hook_fork', 'addon/buffer/buffer.php', 'buffer_hook_fork');
Addon::registerHook('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
Addon::registerHook('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
Addon::registerHook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
@ -29,6 +33,7 @@ function buffer_install()
function buffer_uninstall()
{
Addon::unregisterHook('hook_fork', 'addon/buffer/buffer.php', 'buffer_hook_fork');
Addon::unregisterHook('post_local', 'addon/buffer/buffer.php', 'buffer_post_local');
Addon::unregisterHook('notifier_normal', 'addon/buffer/buffer.php', 'buffer_send');
Addon::unregisterHook('jot_networks', 'addon/buffer/buffer.php', 'buffer_jot_nets');
@ -69,9 +74,9 @@ function buffer_content(App $a)
function buffer_addon_admin(App $a, &$o)
{
$t = get_markup_template("admin.tpl", "addon/buffer/");
$t = Renderer::getMarkupTemplate("admin.tpl", "addon/buffer/");
$o = replace_macros($t, [
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
// name, label, value, help, [extra values]
'$client_id' => ['client_id', L10n::t('Client ID'), Config::get('buffer', 'client_id'), ''],
@ -81,8 +86,8 @@ function buffer_addon_admin(App $a, &$o)
function buffer_addon_admin_post(App $a)
{
$client_id = ((!empty($_POST['client_id'])) ? notags(trim($_POST['client_id'])) : '');
$client_secret = ((!empty($_POST['client_secret'])) ? notags(trim($_POST['client_secret'])) : '');
$client_id = (!empty($_POST['client_id']) ? Strings::escapeTags(trim($_POST['client_id'])) : '');
$client_secret = (!empty($_POST['client_secret']) ? Strings::escapeTags(trim($_POST['client_secret'])) : '');
Config::set('buffer', 'client_id' , $client_id);
Config::set('buffer', 'client_secret', $client_secret);
@ -105,16 +110,16 @@ function buffer_connect(App $a)
$client_secret = Config::get('buffer','client_secret');
// The callback URL is the script that gets called after the user authenticates with buffer
$callback_url = $a->get_baseurl()."/buffer/connect";
$callback_url = $a->getBaseURL()."/buffer/connect";
$buffer = new BufferApp($client_id, $client_secret, $callback_url);
if (!$buffer->ok) {
$o .= '<a href="' . $buffer->get_login_url() . '">Connect to Buffer!</a>';
} else {
logger("buffer_connect: authenticated");
Logger::log("buffer_connect: authenticated");
$o .= L10n::t("You are now authenticated to buffer. ");
$o .= '<br /><a href="' . $a->get_baseurl() . '/settings/connectors">' . L10n::t("return to the connector page") . '</a>';
$o .= '<br /><a href="' . $a->getBaseURL() . '/settings/connectors">' . L10n::t("return to the connector page") . '</a>';
PConfig::set(local_user(), 'buffer','access_token', $buffer->access_token);
}
@ -145,7 +150,7 @@ function buffer_settings(App $a, &$s)
/* 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/buffer/buffer.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/buffer/buffer.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
@ -174,7 +179,7 @@ function buffer_settings(App $a, &$s)
if ($access_token == "") {
$s .= '<div id="buffer-authenticate-wrapper">';
$s .= '<a href="'.$a->get_baseurl().'/buffer/connect">'.L10n::t("Authenticate your Buffer connection").'</a>';
$s .= '<a href="'.$a->getBaseURL().'/buffer/connect">'.L10n::t("Authenticate your Buffer connection").'</a>';
$s .= '</div><div class="clear"></div>';
} else {
$s .= '<div id="buffer-enable-wrapper">';
@ -193,7 +198,7 @@ function buffer_settings(App $a, &$s)
$s .= '</div><div class="clear"></div>';
// The callback URL is the script that gets called after the user authenticates with buffer
$callback_url = $a->get_baseurl() . '/buffer/connect';
$callback_url = $a->getBaseURL() . '/buffer/connect';
$buffer = new BufferApp($client_id, $client_secret, $callback_url, $access_token);
@ -263,6 +268,21 @@ function buffer_post_local(App $a, array &$b)
$b['postopts'] .= 'buffer';
}
function buffer_hook_fork(&$a, &$b)
{
if ($b['name'] != 'notifier_normal') {
return;
}
$post = $b['data'];
if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) ||
!strstr($post['postopts'], 'buffer') || ($post['parent'] != $post['id'])) {
$b['execute'] = false;
return;
}
}
function buffer_send(App $a, array &$b)
{
if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) {
@ -298,7 +318,7 @@ function buffer_send(App $a, array &$b)
$profiles = $buffer->go('/profiles');
if (is_array($profiles)) {
logger("Will send these parameter ".print_r($b, true), LOGGER_DEBUG);
Logger::log("Will send these parameter ".print_r($b, true), Logger::DEBUG);
foreach ($profiles as $profile) {
if (!$profile->default)
@ -357,7 +377,7 @@ function buffer_send(App $a, array &$b)
}
$post = ItemContent::getPlaintextPost($item, $limit, $includedlinks, $htmlmode);
logger("buffer_send: converted message ".$b["id"]." result: ".print_r($post, true), LOGGER_DEBUG);
Logger::log("buffer_send: converted message ".$b["id"]." result: ".print_r($post, true), Logger::DEBUG);
// The image proxy is used as a sanitizer. Buffer seems to be really picky about pictures
if (isset($post["image"])) {
@ -407,9 +427,9 @@ function buffer_send(App $a, array &$b)
}
//print_r($message);
logger("buffer_send: data for message " . $b["id"] . ": " . print_r($message, true), LOGGER_DEBUG);
Logger::log("buffer_send: data for message " . $b["id"] . ": " . print_r($message, true), Logger::DEBUG);
$ret = $buffer->go('/updates/create', $message);
logger("buffer_send: send message " . $b["id"] . " result: " . print_r($ret, true), LOGGER_DEBUG);
Logger::log("buffer_send: send message " . $b["id"] . " result: " . print_r($ret, true), Logger::DEBUG);
}
}
}

View File

@ -45,6 +45,7 @@
'403' => 'Permission denied.',
'404' => 'Endpoint not found.',
'405' => 'Method not allowed.',
'504' => 'Gateway timeout server response timeout.',
'1000' => 'An unknown error occurred.',
'1001' => 'Access token required.',
'1002' => 'Not within application scope.',

View File

@ -4,15 +4,16 @@
#
#
# Translators:
# Lorem Ipsum <aditoo@seznam.cz>, 2018
# Aditoo, 2018
# Aditoo, 2018
# michal_s <msupler@gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 13:18+0200\n"
"PO-Revision-Date: 2018-06-09 09:15+0000\n"
"Last-Translator: Lorem Ipsum <aditoo@seznam.cz>\n"
"PO-Revision-Date: 2018-09-12 09:43+0000\n"
"Last-Translator: Aditoo\n"
"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -38,19 +39,19 @@ msgstr "Client Secret"
#: buffer.php:67
msgid "Error when registering buffer connection:"
msgstr "Chyba při registraci buffer spojená"
msgstr "Chyba při registraci připojení na buffer:"
#: buffer.php:86
msgid "You are now authenticated to buffer. "
msgstr "Nyní jste přihlášen k bufferu."
msgstr "Nyní jste přihlášen/a na buffer."
#: buffer.php:87
msgid "return to the connector page"
msgstr "návrat ke stránce konektor"
msgstr "zpět ke stránce konektoru"
#: buffer.php:103
msgid "Post to Buffer"
msgstr "Příspěvek na Buffer"
msgstr "Posílat na Buffer"
#: buffer.php:128 buffer.php:132
msgid "Buffer Export"
@ -58,7 +59,7 @@ msgstr "Buffer Export"
#: buffer.php:142
msgid "Authenticate your Buffer connection"
msgstr "Přihlásit ke spojení na Buffer"
msgstr "Autentikujte své připojení na Buffer"
#: buffer.php:146
msgid "Enable Buffer Post Addon"
@ -66,12 +67,12 @@ msgstr "Povolit doplněk Buffer Post"
#: buffer.php:151
msgid "Post to Buffer by default"
msgstr "Defaultně zaslat na Buffer"
msgstr "Ve výchozím stavu posílat na Buffer"
#: buffer.php:156
msgid "Check to delete this preset"
msgstr "Zaškrtnout pro smazání tohoto nastavení"
msgstr "Zaškrtnutím smažete toto nastavení"
#: buffer.php:165
msgid "Posts are going to all accounts that are enabled by default:"
msgstr "Příspěvky jsou zasílány na všechny účty, které jsou defaultně povoleny:"
msgstr "Příspěvky budou posílány na všechny účty, které jsou ve výchozím stavu povoleny:"

View File

@ -10,13 +10,13 @@ $a->strings["Permission denied."] = "Přístup odmítnut.";
$a->strings["Save Settings"] = "Uložit Nastavení";
$a->strings["Client ID"] = "Client ID";
$a->strings["Client Secret"] = "Client Secret";
$a->strings["Error when registering buffer connection:"] = "Chyba při registraci buffer spojená";
$a->strings["You are now authenticated to buffer. "] = "Nyní jste přihlášen k bufferu.";
$a->strings["return to the connector page"] = "návrat ke stránce konektor";
$a->strings["Post to Buffer"] = "Příspěvek na Buffer";
$a->strings["Error when registering buffer connection:"] = "Chyba při registraci připojení na buffer:";
$a->strings["You are now authenticated to buffer. "] = "Nyní jste přihlášen/a na buffer.";
$a->strings["return to the connector page"] = "zpět ke stránce konektoru";
$a->strings["Post to Buffer"] = "Posílat na Buffer";
$a->strings["Buffer Export"] = "Buffer Export";
$a->strings["Authenticate your Buffer connection"] = "Přihlásit ke spojení na Buffer";
$a->strings["Authenticate your Buffer connection"] = "Autentikujte své připojení na Buffer";
$a->strings["Enable Buffer Post Addon"] = "Povolit doplněk Buffer Post";
$a->strings["Post to Buffer by default"] = "Defaultně zaslat na Buffer";
$a->strings["Check to delete this preset"] = "Zaškrtnout pro smazání tohoto nastavení";
$a->strings["Posts are going to all accounts that are enabled by default:"] = "Příspěvky jsou zasílány na všechny účty, které jsou defaultně povoleny:";
$a->strings["Post to Buffer by default"] = "Ve výchozím stavu posílat na Buffer";
$a->strings["Check to delete this preset"] = "Zaškrtnutím smažete toto nastavení";
$a->strings["Posts are going to all accounts that are enabled by default:"] = "Příspěvky budou posílány na všechny účty, které jsou ve výchozím stavu povoleny:";

View File

@ -4,16 +4,17 @@
#
#
# Translators:
# Hypolite Petovan <mrpetovan@gmail.com>, 2016
# Nicola Spanti <translations@nicola-spanti.info>, 2015
# Hypolite Petovan <hypolite@mrpetovan.com>, 2016
# Marie Olive <lacellule101@gmail.com>, 2018
# RyDroid <inactive+RyDroid@transifex.com>, 2015
# StefOfficiel <pichard.stephane@free.fr>, 2015
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 13:18+0200\n"
"PO-Revision-Date: 2016-09-24 03:03+0000\n"
"Last-Translator: Hypolite Petovan <mrpetovan@gmail.com>\n"
"PO-Revision-Date: 2018-11-13 12:56+0000\n"
"Last-Translator: Marie Olive <lacellule101@gmail.com>\n"
"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -63,7 +64,7 @@ msgstr "Authentifier votre connexion à Buffer"
#: buffer.php:146
msgid "Enable Buffer Post Addon"
msgstr "Activer le connecteur Buffer"
msgstr "Activer l'extension de publication Buffer"
#: buffer.php:151
msgid "Post to Buffer by default"

View File

@ -2,6 +2,7 @@
if(! function_exists("string_plural_select_fr")) {
function string_plural_select_fr($n){
$n = intval($n);
return ($n > 1);;
}}
;
@ -15,7 +16,7 @@ $a->strings["return to the connector page"] = "revenir à la page du connecteur"
$a->strings["Post to Buffer"] = "Publier sur Buffer";
$a->strings["Buffer Export"] = "Export Buffer";
$a->strings["Authenticate your Buffer connection"] = "Authentifier votre connexion à Buffer";
$a->strings["Enable Buffer Post Addon"] = "Activer le connecteur Buffer";
$a->strings["Enable Buffer Post Addon"] = "Activer l'extension de publication Buffer";
$a->strings["Post to Buffer by default"] = "Publier sur Buffer par défaut";
$a->strings["Check to delete this preset"] = "Cocher pour supprimer ce préréglage";
$a->strings["Posts are going to all accounts that are enabled by default:"] = "Les posts sont envoyés à tous les comptes activés par défault:";

View File

@ -10,7 +10,9 @@ use Friendica\App;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
use Friendica\Core\Worker;
use Friendica\Database\DBA;
use Friendica\Model\Contact;
@ -28,7 +30,7 @@ function catavatar_install()
Addon::registerHook('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings');
Addon::registerHook('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post');
logger('registered catavatar');
Logger::log('registered catavatar');
}
/**
@ -40,7 +42,7 @@ function catavatar_uninstall()
Addon::unregisterHook('addon_settings', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings');
Addon::unregisterHook('addon_settings_post', 'addon/catavatar/catavatar.php', 'catavatar_addon_settings_post');
logger('unregistered catavatar');
Logger::log('unregistered catavatar');
}
/**
@ -52,8 +54,8 @@ function catavatar_addon_settings(App $a, &$s)
return;
}
$t = get_markup_template('settings.tpl', 'addon/catavatar/');
$s .= replace_macros ($t, [
$t = Renderer::getMarkupTemplate('settings.tpl', 'addon/catavatar/');
$s .= Renderer::replaceMacros($t, [
'$postpost' => !empty($_POST['catavatar-morecat']) || !empty($_POST['catavatar-emailcat']),
'$uncache' => time(),
'$uid' => local_user(),
@ -82,7 +84,7 @@ function catavatar_addon_settings_post(App $a, &$s)
$seed = PConfig::get(local_user(), 'catavatar', 'seed', md5(trim(strtolower($user['email']))));
if (!empty($_POST['catavatar-usecat'])) {
$url = $a->get_baseurl() . '/catavatar/' . local_user() . '?ts=' . time();
$url = $a->getBaseURL() . '/catavatar/' . local_user() . '?ts=' . time();
$self = DBA::selectFirst('contact', ['id'], ['uid' => local_user(), 'self' => true]);
if (!DBA::isResult($self)) {
@ -109,7 +111,7 @@ function catavatar_addon_settings_post(App $a, &$s)
Contact::updateSelfFromUserID(local_user(), true);
// Update global directory in background
$url = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
$url = $a->getBaseURL() . '/profile/' . $a->user['nickname'];
if ($url && strlen(Config::get('system', 'directory'))) {
Worker::add(PRIORITY_LOW, 'Directory', $url);
}
@ -138,10 +140,10 @@ function catavatar_addon_settings_post(App $a, &$s)
function catavatar_lookup(App $a, &$b)
{
$user = DBA::selectFirst('user', ['uid'], ['email' => $b['email']]);
$url = $a->get_baseurl() . '/catavatar/' . $user['uid'];
$url = $a->getBaseURL() . '/catavatar/' . $user['uid'];
switch($b['size']) {
case 175: $url .= "/4"; break;
case 300: $url .= "/4"; break;
case 80: $url .= "/5"; break;
case 47: $url .= "/6"; break;
}
@ -171,7 +173,7 @@ function catavatar_content(App $a)
$size = intval($a->argv[2]);
}
$condition = ['uid' => $uid, 'blocked' => false,
$condition = ['uid' => $uid,
'account_expired' => false, 'account_removed' => false];
$user = DBA::selectFirst('user', ['email'], $condition);
@ -245,7 +247,7 @@ function build_cat($seed = '', $size = 0)
if ($size > 3 && $size < 7) {
switch ($size) {
case 4:
$size = 175;
$size = 300;
break;
case 5:
$size = 80;

View File

@ -17,6 +17,7 @@ use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\PConfig;
use Friendica\Core\Renderer;
use Friendica\Util\Network;
use Friendica\Util\Proxy as ProxyUtils;
@ -92,7 +93,7 @@ function getWeather($loc, $units = 'metric', $lang = 'en', $appid = '', $cacheti
];
PConfig::set(local_user(), 'curweather', 'last', $now->getTimestamp());
Cache::set('curweather'.md5($url), serialize($r), CACHE_HOUR);
Cache::set('curweather'.md5($url), serialize($r), Cache::HOUR);
return $r;
}
@ -103,7 +104,7 @@ function curweather_network_mod_init(App $a, &$b)
return;
}
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/curweather/curweather.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/curweather/curweather.css' . '" media="all" />' . "\r\n";
// $rpt value is needed for location
// $lang will be taken from the browser session to honour user settings
@ -117,7 +118,7 @@ function curweather_network_mod_init(App $a, &$b)
$rpt = PConfig::get(local_user(), 'curweather', 'curweather_loc');
// Set the language to the browsers language or default and use metric units
$lang = (!empty($_SESSION['language']) ? $_SESSION['language'] : Config::get('system', 'language'));
$lang = defaults($_SESSION, 'language', Config::get('system', 'language'));
$units = PConfig::get( local_user(), 'curweather', 'curweather_units');
$appid = Config::get('curweather', 'appid');
$cachetime = intval(Config::get('curweather', 'cachetime'));
@ -135,8 +136,8 @@ function curweather_network_mod_init(App $a, &$b)
}
if ($ok) {
$t = get_markup_template("widget.tpl", "addon/curweather/" );
$curweather = replace_macros ($t, [
$t = Renderer::getMarkupTemplate("widget.tpl", "addon/curweather/" );
$curweather = Renderer::replaceMacros($t, [
'$title' => L10n::t("Current Weather"),
'$icon' => ProxyUtils::proxifyUrl('http://openweathermap.org/img/w/'.$res['icon'].'.png'),
'$city' => $res['city'],
@ -152,8 +153,8 @@ function curweather_network_mod_init(App $a, &$b)
'$showonmap' => L10n::t('Show on map')
]);
} else {
$t = get_markup_template('widget-error.tpl', 'addon/curweather/');
$curweather = replace_macros( $t, [
$t = Renderer::getMarkupTemplate('widget-error.tpl', 'addon/curweather/');
$curweather = Renderer::replaceMacros( $t, [
'$problem' => L10n::t('There was a problem accessing the weather data. But have a look'),
'$rpt' => $rpt,
'$atOWM' => L10n::t('at OpenWeatherMap')
@ -197,9 +198,9 @@ function curweather_addon_settings(App $a, &$s)
$enable_checked = (($enable) ? ' checked="checked" ' : '');
// load template and replace the macros
$t = get_markup_template("settings.tpl", "addon/curweather/" );
$t = Renderer::getMarkupTemplate("settings.tpl", "addon/curweather/" );
$s = replace_macros ($t, [
$s = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$header' => L10n::t('Current Weather').' '.L10n::t('Settings'),
'$noappidtext' => $noappidtext,
@ -237,9 +238,9 @@ function curweather_addon_admin(App $a, &$o)
$appid = Config::get('curweather', 'appid');
$cachetime = Config::get('curweather', 'cachetime');
$t = get_markup_template("admin.tpl", "addon/curweather/" );
$t = Renderer::getMarkupTemplate("admin.tpl", "addon/curweather/" );
$o = replace_macros ($t, [
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$cachetime' => [
'cachetime',

View File

@ -4,7 +4,7 @@
#
#
# Translators:
# Hypolite Petovan <mrpetovan@gmail.com>, 2016
# Hypolite Petovan <hypolite@mrpetovan.com>, 2016
# Nicola Spanti <translations@nicola-spanti.info>, 2015
# StefOfficiel <pichard.stephane@free.fr>, 2015
msgid ""
@ -13,7 +13,7 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-03-12 08:10+0100\n"
"PO-Revision-Date: 2016-09-24 03:15+0000\n"
"Last-Translator: Hypolite Petovan <mrpetovan@gmail.com>\n"
"Last-Translator: Hypolite Petovan <hypolite@mrpetovan.com>\n"
"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"

View File

@ -136,7 +136,7 @@ class Diaspora_Connection {
} elseif (!empty($m[1])) {
$token = $m[1];
}
return (!empty($token)) ? $token : false;
return !empty($token) ? $token : false;
}
private function readJsonResponse($response) {
@ -165,14 +165,14 @@ class Diaspora_Connection {
$this->doHttpRequest('/bookmarklet');
$m = [];
preg_match('/"aspects"\:(\[.+?\])/', $this->last_http_result->response, $m);
return (!empty($m[1])) ? json_decode($m[1]) : false;
return !empty($m[1]) ? json_decode($m[1]) : false;
}
public function getServices() {
$this->doHttpRequest('/bookmarklet');
$m = [];
preg_match('/"configured_services"\:(\[.+?\])/', $this->last_http_result->response, $m);
return (!empty($m[1])) ? json_decode($m[1]) : false;
return !empty($m[1]) ? json_decode($m[1]) : false;
}
public function getNotifications($notification_type = '', $show = '') {

View File

@ -13,6 +13,7 @@ use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\Protocol;
use Friendica\Database\DBA;
@ -20,6 +21,7 @@ use Friendica\Model\Queue;
function diaspora_install()
{
Addon::registerHook('hook_fork', 'addon/diaspora/diaspora.php', 'diaspora_hook_fork');
Addon::registerHook('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
Addon::registerHook('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
Addon::registerHook('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
@ -30,6 +32,7 @@ function diaspora_install()
function diaspora_uninstall()
{
Addon::unregisterHook('hook_fork', 'addon/diaspora/diaspora.php', 'diaspora_hook_fork');
Addon::unregisterHook('post_local', 'addon/diaspora/diaspora.php', 'diaspora_post_local');
Addon::unregisterHook('notifier_normal', 'addon/diaspora/diaspora.php', 'diaspora_send');
Addon::unregisterHook('jot_networks', 'addon/diaspora/diaspora.php', 'diaspora_jot_nets');
@ -57,7 +60,7 @@ function diaspora_jot_nets(App $a, &$b)
}
function diaspora_queue_hook(App $a, &$b) {
$hostname = $a->get_hostname();
$hostname = $a->getHostName();
$qi = q("SELECT * FROM `queue` WHERE `network` = '%s'",
DBA::escape(Protocol::DIASPORA2)
@ -72,7 +75,7 @@ function diaspora_queue_hook(App $a, &$b) {
continue;
}
logger('diaspora_queue: run');
Logger::log('diaspora_queue: run');
$r = q("SELECT `user`.* FROM `user` LEFT JOIN `contact` on `contact`.`uid` = `user`.`uid`
WHERE `contact`.`self` = 1 AND `contact`.`id` = %d LIMIT 1",
@ -92,37 +95,37 @@ function diaspora_queue_hook(App $a, &$b) {
$success = false;
if ($handle && $password) {
logger('diaspora_queue: able to post for user '.$handle);
Logger::log('diaspora_queue: able to post for user '.$handle);
$z = unserialize($x['content']);
$post = $z['post'];
logger('diaspora_queue: post: '.$post, LOGGER_DATA);
Logger::log('diaspora_queue: post: '.$post, Logger::DATA);
try {
logger('diaspora_queue: prepare', LOGGER_DEBUG);
Logger::log('diaspora_queue: prepare', Logger::DEBUG);
$conn = new Diaspora_Connection($handle, $password);
logger('diaspora_queue: try to log in '.$handle, LOGGER_DEBUG);
Logger::log('diaspora_queue: try to log in '.$handle, Logger::DEBUG);
$conn->logIn();
logger('diaspora_queue: try to send '.$body, LOGGER_DEBUG);
Logger::log('diaspora_queue: try to send '.$body, Logger::DEBUG);
$conn->provider = $hostname;
$conn->postStatusMessage($post, $aspect);
logger('diaspora_queue: send '.$userdata['uid'].' success', LOGGER_DEBUG);
Logger::log('diaspora_queue: send '.$userdata['uid'].' success', Logger::DEBUG);
$success = true;
Queue::removeItem($x['id']);
} catch (Exception $e) {
logger("diaspora_queue: Send ".$userdata['uid']." failed: ".$e->getMessage(), LOGGER_DEBUG);
Logger::log("diaspora_queue: Send ".$userdata['uid']." failed: ".$e->getMessage(), Logger::DEBUG);
}
} else {
logger('diaspora_queue: send '.$userdata['uid'].' missing username or password', LOGGER_DEBUG);
Logger::log('diaspora_queue: send '.$userdata['uid'].' missing username or password', Logger::DEBUG);
}
if (!$success) {
logger('diaspora_queue: delayed');
Logger::log('diaspora_queue: delayed');
Queue::updateTime($x['id']);
}
}
@ -136,7 +139,7 @@ function diaspora_settings(App $a, &$s)
/* 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/diaspora/diaspora.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/diaspora/diaspora.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
@ -252,6 +255,21 @@ function diaspora_settings_post(App $a, &$b)
}
}
function diaspora_hook_fork(&$a, &$b)
{
if ($b['name'] != 'notifier_normal') {
return;
}
$post = $b['data'];
if ($post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) ||
!strstr($post['postopts'], 'diaspora') || ($post['parent'] != $post['id'])) {
$b['execute'] = false;
return;
}
}
function diaspora_post_local(App $a, array &$b)
{
if ($b['edit']) {
@ -268,7 +286,7 @@ function diaspora_post_local(App $a, array &$b)
$diaspora_post = intval(PConfig::get(local_user(),'diaspora','post'));
$diaspora_enable = (($diaspora_post && x($_REQUEST,'diaspora_enable')) ? intval($_REQUEST['diaspora_enable']) : 0);
$diaspora_enable = (($diaspora_post && !empty($_REQUEST['diaspora_enable'])) ? intval($_REQUEST['diaspora_enable']) : 0);
if ($b['api_source'] && intval(PConfig::get(local_user(),'diaspora','post_by_default'))) {
$diaspora_enable = 1;
@ -287,9 +305,9 @@ function diaspora_post_local(App $a, array &$b)
function diaspora_send(App $a, array &$b)
{
$hostname = $a->get_hostname();
$hostname = $a->getHostName();
logger('diaspora_send: invoked');
Logger::log('diaspora_send: invoked');
if ($b['deleted'] || $b['private'] || ($b['created'] !== $b['edited'])) {
return;
@ -311,14 +329,14 @@ function diaspora_send(App $a, array &$b)
return;
}
logger('diaspora_send: prepare posting', LOGGER_DEBUG);
Logger::log('diaspora_send: prepare posting', Logger::DEBUG);
$handle = PConfig::get($b['uid'],'diaspora','handle');
$password = PConfig::get($b['uid'],'diaspora','password');
$aspect = PConfig::get($b['uid'],'diaspora','aspect');
if ($handle && $password) {
logger('diaspora_send: all values seem to be okay', LOGGER_DEBUG);
Logger::log('diaspora_send: all values seem to be okay', Logger::DEBUG);
$tag_arr = [];
$tags = '';
@ -363,20 +381,20 @@ function diaspora_send(App $a, array &$b)
require_once "addon/diaspora/diasphp.php";
try {
logger('diaspora_send: prepare', LOGGER_DEBUG);
Logger::log('diaspora_send: prepare', Logger::DEBUG);
$conn = new Diaspora_Connection($handle, $password);
logger('diaspora_send: try to log in '.$handle, LOGGER_DEBUG);
Logger::log('diaspora_send: try to log in '.$handle, Logger::DEBUG);
$conn->logIn();
logger('diaspora_send: try to send '.$body, LOGGER_DEBUG);
Logger::log('diaspora_send: try to send '.$body, Logger::DEBUG);
$conn->provider = $hostname;
$conn->postStatusMessage($body, $aspect);
logger('diaspora_send: success');
Logger::log('diaspora_send: success');
} catch (Exception $e) {
logger("diaspora_send: Error submitting the post: " . $e->getMessage());
Logger::log("diaspora_send: Error submitting the post: " . $e->getMessage());
logger('diaspora_send: requeueing '.$b['uid'], LOGGER_DEBUG);
Logger::log('diaspora_send: requeueing '.$b['uid'], Logger::DEBUG);
$r = q("SELECT `id` FROM `contact` WHERE `uid` = %d AND `self`", $b['uid']);
if (count($r))

View File

@ -12,7 +12,7 @@ msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-22 13:18+0200\n"
"PO-Revision-Date: 2018-08-16 10:10+0000\n"
"PO-Revision-Date: 2018-09-02 17:54+0000\n"
"Last-Translator: Aditoo\n"
"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n"
"MIME-Version: 1.0\n"
@ -23,7 +23,7 @@ msgstr ""
#: diaspora.php:37
msgid "Post to Diaspora"
msgstr "Odeslat příspěvek na Diasporu"
msgstr "Odeslat na Diasporu"
#: diaspora.php:142
msgid ""

View File

@ -6,7 +6,7 @@ function string_plural_select_cs($n){
return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
}}
;
$a->strings["Post to Diaspora"] = "Odeslat příspěvek na Diasporu";
$a->strings["Post to Diaspora"] = "Odeslat na Diasporu";
$a->strings["Can't login to your Diaspora account. Please check username and password and ensure you used the complete address (including http...)"] = "Nelze se přihlásit na váš účet Diaspora. Prosím ověřte své uživatelské jméno a heslo a ujistěte se, že jste použili kompletní adresu (včetně http...)";
$a->strings["Diaspora Export"] = "Diaspora export";
$a->strings["Enable Diaspora Post Addon"] = "Povolit doplněk Diaspora Post";

View File

@ -12,10 +12,12 @@ use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Database\DBA;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
use Friendica\Util\XML;
function dwpost_install()
{
@ -60,7 +62,7 @@ function dwpost_settings(App $a, &$s)
}
/* 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/dwpost/dwpost.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/dwpost/dwpost.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variables */
$enabled = PConfig::get(local_user(), 'dwpost', 'post');
@ -135,7 +137,7 @@ function dwpost_post_local(App $a, array &$b)
$dw_post = intval(PConfig::get(local_user(),'dwpost','post'));
$dw_enable = (($dw_post && x($_REQUEST,'dwpost_enable')) ? intval($_REQUEST['dwpost_enable']) : 0);
$dw_enable = (($dw_post && !empty($_REQUEST['dwpost_enable'])) ? intval($_REQUEST['dwpost_enable']) : 0);
if ($b['api_source'] && intval(PConfig::get(local_user(),'dwpost','post_by_default'))) {
$dw_enable = 1;
@ -188,7 +190,7 @@ function dwpost_send(App $a, array &$b)
if ($dw_username && $dw_password && $dw_blog) {
$title = $b['title'];
$post = BBCode::convert($b['body']);
$post = xmlify($post);
$post = XML::escape($post);
$tags = dwpost_get_tags($b['tag']);
$date = DateTimeFormat::convert($b['created'], $tz);
@ -225,13 +227,13 @@ function dwpost_send(App $a, array &$b)
EOT;
logger('dwpost: data: ' . $xml, LOGGER_DATA);
Logger::log('dwpost: data: ' . $xml, Logger::DATA);
if ($dw_blog !== 'test') {
$x = Network::post($dw_blog, $xml, ["Content-Type: text/xml"]);
$x = Network::post($dw_blog, $xml, ["Content-Type: text/xml"])->getBody();
}
logger('posted to dreamwidth: ' . ($x) ? $x : '', LOGGER_DEBUG);
Logger::log('posted to dreamwidth: ' . ($x) ? $x : '', Logger::DEBUG);
}
}

View File

@ -30,7 +30,7 @@ function fortunate_uninstall()
function fortunate_fetch(&$a, &$b)
{
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="'
. $a->get_baseurl() . '/addon/fortunate/fortunate.css' . '" media="all" />' . "\r\n";
. $a->getBaseURL() . '/addon/fortunate/fortunate.css' . '" media="all" />' . "\r\n";
if (FORTUNATE_SERVER != 'hostname.com') {
$s = Network::fetchUrl('http://' . FORTUNATE_SERVER . '/cookie.php?numlines=2&equal=1&rand=' . mt_rand());

View File

@ -8,13 +8,16 @@
use Friendica\App;
use Friendica\Content\Nav;
use Friendica\Content\Pager;
use Friendica\Content\Widget;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\Model\Contact;
use Friendica\Model\Profile;
use Friendica\Util\Strings;
use Friendica\Util\Temporal;
require_once 'boot.php';
@ -43,9 +46,7 @@ function forumdirectory_app_menu(App $a, array &$b)
function forumdirectory_init(App $a)
{
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->get_baseurl() . '/addon/forumdirectory/forumdirectory.css" media="all" />';
$a->set_pager_itemspage(60);
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/forumdirectory/forumdirectory.css" media="all" />';
if (local_user()) {
$a->page['aside'] .= Widget::findPeople();
@ -72,12 +73,12 @@ function forumdirectory_content(App $a)
Nav::setSelected('directory');
if (!empty($a->data['search'])) {
$search = notags(trim($a->data['search']));
$search = Strings::escapeTags(trim($a->data['search']));
} else {
$search = ((!empty($_GET['search'])) ? notags(trim(rawurldecode($_GET['search']))) : '');
$search = (!empty($_GET['search']) ? Strings::escapeTags(trim(rawurldecode($_GET['search']))) : '');
}
$tpl = get_markup_template('directory_header.tpl');
$tpl = Renderer::getMarkupTemplate('directory_header.tpl');
$globaldir = '';
$gdirpath = Config::get('system', 'directory');
@ -88,7 +89,7 @@ function forumdirectory_content(App $a)
$admin = '';
$o .= replace_macros($tpl, [
$o .= Renderer::replaceMacros($tpl, [
'$search' => $search,
'$globaldir' => $globaldir,
'$desc' => L10n::t('Find on this site'),
@ -107,19 +108,22 @@ function forumdirectory_content(App $a)
$publish = Config::get('system', 'publish_all') ? '' : " AND `publish` = 1 ";
$total = 0;
$r = q("SELECT COUNT(*) AS `total` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid`"
. " WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 AND `page-flags` = 2 $sql_extra ");
if (DBA::isResult($r)) {
$a->set_pager_total($r[0]['total']);
$total = $r[0]['total'];
}
$pager = new Pager($a->query_string, 60);
$order = " ORDER BY `name` ASC ";
$r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname`, `user`.`timezone` , `user`.`page-flags`"
. " FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 $publish"
. " AND `user`.`blocked` = 0 AND `page-flags` = 2 $sql_extra $order LIMIT %d , %d ",
intval($a->pager['start']),
intval($a->pager['itemspage'])
$pager->getStart(),
$pager->getItemsPerPage()
);
if (DBA::isResult($r)) {
@ -130,7 +134,7 @@ function forumdirectory_content(App $a)
}
foreach ($r as $rr) {
$profile_link = $a->get_baseurl() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']);
$profile_link = $a->getBaseURL() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']);
$pdesc = (($rr['pdesc']) ? $rr['pdesc'] . '<br />' : '');
@ -185,9 +189,9 @@ function forumdirectory_content(App $a)
$homepage = !empty($profile['homepage']) ? L10n::t('Homepage:') : false;
$about = !empty($profile['about']) ? L10n::t('About:') : false;
$tpl = get_markup_template('forumdirectory_item.tpl', 'addon/forumdirectory/');
$tpl = Renderer::getMarkupTemplate('forumdirectory_item.tpl', 'addon/forumdirectory/');
$entry = replace_macros($tpl, [
$entry = Renderer::replaceMacros($tpl, [
'$id' => $rr['id'],
'$profile_link' => $profile_link,
'$photo' => $rr[$photo],
@ -208,7 +212,7 @@ function forumdirectory_content(App $a)
}
$o .= "<div class=\"directory-end\" ></div>\r\n";
$o .= paginate($a);
$o .= $pager->renderFull($total);
} else {
info(L10n::t("No entries \x28some entries may be hidden\x29.") . EOL);
}

View File

@ -4,24 +4,25 @@
#
#
# Translators:
# Michal Šupler <msupler@gmail.com>, 2014
# Aditoo, 2018
# michal_s <msupler@gmail.com>, 2014
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2014-07-07 18:45+0000\n"
"Last-Translator: Michal Šupler <msupler@gmail.com>\n"
"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n"
"PO-Revision-Date: 2018-09-11 19:04+0000\n"
"Last-Translator: Aditoo\n"
"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
#: forumdirectory.php:22
msgid "Forum Directory"
msgstr "Adresář Fór"
msgstr "Adresář fór"
#: forumdirectory.php:53
msgid "Public access denied."
@ -33,11 +34,11 @@ msgstr "Globální adresář"
#: forumdirectory.php:79
msgid "Find on this site"
msgstr "Nalézt na tomto webu"
msgstr "Nat na tomto webu"
#: forumdirectory.php:81
msgid "Finding: "
msgstr "Zjištění: "
msgstr "Hledání: "
#: forumdirectory.php:82
msgid "Site Directory"
@ -57,7 +58,7 @@ msgstr "Pohlaví: "
#: forumdirectory.php:156
msgid "Location:"
msgstr "Místo:"
msgstr "Poloha:"
#: forumdirectory.php:158
msgid "Gender:"
@ -65,11 +66,11 @@ msgstr "Pohlaví:"
#: forumdirectory.php:160
msgid "Status:"
msgstr "Status:"
msgstr "Stav:"
#: forumdirectory.php:162
msgid "Homepage:"
msgstr "Domá stránka:"
msgstr "Domovská stránka:"
#: forumdirectory.php:164
msgid "About:"

View File

@ -2,21 +2,22 @@
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;;
$n = intval($n);
return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
}}
;
$a->strings["Forum Directory"] = "Adresář Fór";
$a->strings["Forum Directory"] = "Adresář fór";
$a->strings["Public access denied."] = "Veřejný přístup odepřen.";
$a->strings["Global Directory"] = "Globální adresář";
$a->strings["Find on this site"] = "Nalézt na tomto webu";
$a->strings["Finding: "] = "Zjištění: ";
$a->strings["Find on this site"] = "Nat na tomto webu";
$a->strings["Finding: "] = "Hledání: ";
$a->strings["Site Directory"] = "Adresář serveru";
$a->strings["Find"] = "Najít";
$a->strings["Age: "] = "Věk: ";
$a->strings["Gender: "] = "Pohlaví: ";
$a->strings["Location:"] = "Místo:";
$a->strings["Location:"] = "Poloha:";
$a->strings["Gender:"] = "Pohlaví:";
$a->strings["Status:"] = "Status:";
$a->strings["Homepage:"] = "Domá stránka:";
$a->strings["Status:"] = "Stav:";
$a->strings["Homepage:"] = "Domovská stránka:";
$a->strings["About:"] = "O mě:";
$a->strings["No entries (some entries may be hidden)."] = "Žádné záznamy (některé položky mohou být skryty).";

View File

@ -8,6 +8,7 @@
*/
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
function fromapp_install()
@ -15,7 +16,7 @@ function fromapp_install()
Addon::registerHook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
Addon::registerHook('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
Addon::registerHook('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
logger("installed fromapp");
Logger::log("installed fromapp");
}
@ -24,12 +25,12 @@ function fromapp_uninstall()
Addon::unregisterHook('post_local', 'addon/fromapp/fromapp.php', 'fromapp_post_hook');
Addon::unregisterHook('addon_settings', 'addon/fromapp/fromapp.php', 'fromapp_settings');
Addon::unregisterHook('addon_settings_post', 'addon/fromapp/fromapp.php', 'fromapp_settings_post');
logger("removed fromapp");
Logger::log("removed fromapp");
}
function fromapp_settings_post($a, $post)
{
if (!local_user() || (! x($_POST, 'fromapp-submit'))) {
if (!local_user() || empty($_POST['fromapp-submit'])) {
return;
}
@ -47,7 +48,7 @@ function fromapp_settings(&$a, &$s)
/* 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/fromapp/fromapp.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/fromapp/fromapp.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */

View File

@ -4,37 +4,38 @@
#
#
# Translators:
# Michal Šupler <msupler@gmail.com>, 2014-2015
# Aditoo, 2018
# michal_s <msupler@gmail.com>, 2014-2015
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2015-02-11 19:41+0000\n"
"Last-Translator: Michal Šupler <msupler@gmail.com>\n"
"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n"
"PO-Revision-Date: 2018-09-11 19:01+0000\n"
"Last-Translator: Aditoo\n"
"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
#: fromapp.php:38
msgid "Fromapp settings updated."
msgstr "Fromapp nastavení aktualizováno."
msgstr "Nastavení FromApp aktualizována."
#: fromapp.php:64
msgid "FromApp Settings"
msgstr "FromApp nastavení"
msgstr "Nastavení FromApp"
#: fromapp.php:66
msgid ""
"The application name you would like to show your posts originating from."
msgstr "Jméno zdrojové aplikace"
msgstr "Jméno aplikace, která má být zobrazena jako zdroj Vašich příspěvků."
#: fromapp.php:70
msgid "Use this application name even if another application was used."
msgstr "Použij toto jméno aplikace i když byla použita jiná aplikace"
msgstr "Použít toto jméno aplikace, i když byla použita jiná aplikace"
#: fromapp.php:77
msgid "Submit"

View File

@ -2,11 +2,12 @@
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;;
$n = intval($n);
return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
}}
;
$a->strings["Fromapp settings updated."] = "Fromapp nastavení aktualizováno.";
$a->strings["FromApp Settings"] = "FromApp nastavení";
$a->strings["The application name you would like to show your posts originating from."] = "Jméno zdrojové aplikace";
$a->strings["Use this application name even if another application was used."] = "Použij toto jméno aplikace i když byla použita jiná aplikace";
$a->strings["Fromapp settings updated."] = "Nastavení FromApp aktualizována.";
$a->strings["FromApp Settings"] = "Nastavení FromApp";
$a->strings["The application name you would like to show your posts originating from."] = "Jméno aplikace, která má být zobrazena jako zdroj Vašich příspěvků.";
$a->strings["Use this application name even if another application was used."] = "Použít toto jméno aplikace, i když byla použita jiná aplikace";
$a->strings["Submit"] = "Odeslat";

View File

@ -12,8 +12,10 @@ define('FROMGPLUS_DEFAULT_POLL_INTERVAL', 30); // given in minutes
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\Protocol;
use Friendica\Core\Renderer;
use Friendica\Object\Image;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
@ -87,9 +89,9 @@ function fromgplus_addon_settings_post(&$a,&$b) {
if (!empty($_POST['fromgplus-submit'])) {
PConfig::set(local_user(),'fromgplus','account',trim($_POST['fromgplus-account']));
$enable = (x($_POST,'fromgplus-enable') ? intval($_POST['fromgplus-enable']) : 0);
$enable = (!empty($_POST['fromgplus-enable']) ? intval($_POST['fromgplus-enable']) : 0);
PConfig::set(local_user(),'fromgplus','enable', $enable);
$keywords = (x($_POST, 'fromgplus-keywords') ? intval($_POST['fromgplus-keywords']) : 0);
$keywords = (!empty($_POST['fromgplus-keywords']) ? intval($_POST['fromgplus-keywords']) : 0);
PConfig::set(local_user(),'fromgplus', 'keywords', $keywords);
if (!$enable)
@ -101,9 +103,9 @@ function fromgplus_addon_settings_post(&$a,&$b) {
function fromgplus_addon_admin(&$a, &$o)
{
$t = get_markup_template("admin.tpl", "addon/fromgplus/");
$t = Renderer::getMarkupTemplate("admin.tpl", "addon/fromgplus/");
$o = replace_macros($t, [
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$key' => ['key', L10n::t('Key'), trim(Config::get('fromgplus', 'key')), ''],
]);
@ -111,7 +113,7 @@ function fromgplus_addon_admin(&$a, &$o)
function fromgplus_addon_admin_post(&$a)
{
$key = ((x($_POST, 'key')) ? trim($_POST['key']) : '');
$key = (!empty($_POST['key']) ? trim($_POST['key']) : '');
Config::set('fromgplus', 'key', $key);
info(L10n::t('Settings updated.'). EOL);
}
@ -126,25 +128,25 @@ function fromgplus_cron($a,$b) {
if($last) {
$next = $last + ($poll_interval * 60);
if($next > time()) {
logger('fromgplus: poll intervall not reached');
Logger::log('fromgplus: poll intervall not reached');
return;
}
}
logger('fromgplus: cron_start');
Logger::log('fromgplus: cron_start');
$r = q("SELECT * FROM `pconfig` WHERE `cat` = 'fromgplus' AND `k` = 'enable' AND `v` = '1' ORDER BY RAND() ");
if(count($r)) {
foreach($r as $rr) {
$account = PConfig::get($rr['uid'],'fromgplus','account');
if ($account) {
logger('fromgplus: fetching for user '.$rr['uid']);
Logger::log('fromgplus: fetching for user '.$rr['uid']);
fromgplus_fetch($a, $rr['uid']);
}
}
}
logger('fromgplus: cron_end');
Logger::log('fromgplus: cron_end');
Config::set('fromgplus','last_poll', time());
}
@ -190,15 +192,15 @@ function fromgplus_post($a, $uid, $source, $body, $location, $coord, $id) {
$_REQUEST['coord'] = $coord;
if (($_REQUEST['title'] == "") && ($_REQUEST['body'] == "")) {
logger('fromgplus: empty post for user '.$uid." ".print_r($_REQUEST, true));
Logger::log('fromgplus: empty post for user '.$uid." ".print_r($_REQUEST, true));
return;
}
require_once('mod/item.php');
//print_r($_REQUEST);
logger('fromgplus: posting for user '.$uid." ".print_r($_REQUEST, true));
Logger::log('fromgplus: posting for user '.$uid." ".print_r($_REQUEST, true));
item_post($a);
logger('fromgplus: done for user '.$uid);
Logger::log('fromgplus: done for user '.$uid);
}
function fromgplus_html2bbcode($html) {
@ -472,7 +474,7 @@ function fromgplus_fetch($a, $uid) {
// Don't publish items that are too young
if (strtotime($item->published) > (time() - 3*60)) {
logger('fromgplus_fetch: item too new '.$item->published);
Logger::log('fromgplus_fetch: item too new '.$item->published);
continue;
}
@ -495,8 +497,9 @@ function fromgplus_fetch($a, $uid) {
case "note":
$post = fromgplus_html2bbcode($item->object->content);
if (is_array($item->object->attachments))
if (!empty($item->object->attachments)) {
$post .= fromgplus_handleattachments($a, $uid, $item, $item->object->content, false);
}
$coord = "";
$location = "";
@ -526,12 +529,12 @@ function fromgplus_fetch($a, $uid) {
if (function_exists("share_header"))
$post .= share_header($item->object->actor->displayName, $item->object->actor->url,
$item->object->actor->image->url, "",
DateTimeFormat::utc($item->object->published),$item->object->url);
DateTimeFormat::utc($item->published),$item->object->url);
else
$post .= "[share author='".str_replace("'", "&#039;",$item->object->actor->displayName).
"' profile='".$item->object->actor->url.
"' avatar='".$item->object->actor->image->url.
"' posted='".DateTimeFormat::utc($item->object->published).
"' posted='".DateTimeFormat::utc($item->published).
"' link='".$item->object->url."']";
$post .= fromgplus_html2bbcode($item->object->content);

View File

@ -9,7 +9,10 @@ use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Util\Network;
use Friendica\Util\Strings;
function geocoordinates_install()
{
@ -54,25 +57,25 @@ function geocoordinates_resolve_item(&$item)
$s = Network::fetchUrl("https://api.opencagedata.com/geocode/v1/json?q=".$coords[0].",".$coords[1]."&key=".$key."&language=".$language);
if (!$s) {
logger("API could not be queried", LOGGER_DEBUG);
Logger::log("API could not be queried", Logger::DEBUG);
return;
}
$data = json_decode($s);
if ($data->status->code != "200") {
logger("API returned error ".$data->status->code." ".$data->status->message, LOGGER_DEBUG);
Logger::log("API returned error ".$data->status->code." ".$data->status->message, Logger::DEBUG);
return;
}
if (($data->total_results == 0) || (count($data->results) == 0)) {
logger("No results found for coordinates ".$item["coord"], LOGGER_DEBUG);
Logger::log("No results found for coordinates ".$item["coord"], Logger::DEBUG);
return;
}
$item["location"] = $data->results[0]->formatted;
logger("Got location for coordinates ".$coords[0]."-".$coords[1].": ".$item["location"], LOGGER_DEBUG);
Logger::log("Got location for coordinates ".$coords[0]."-".$coords[1].": ".$item["location"], Logger::DEBUG);
if ($item["location"] != "")
Cache::set("geocoordinates:".$language.":".$coords[0]."-".$coords[1], $item["location"]);
@ -86,9 +89,9 @@ function geocoordinates_post_hook($a, &$item)
function geocoordinates_addon_admin(&$a, &$o)
{
$t = get_markup_template("admin.tpl", "addon/geocoordinates/");
$t = Renderer::getMarkupTemplate("admin.tpl", "addon/geocoordinates/");
$o = replace_macros($t, [
$o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Save Settings'),
'$api_key' => ['api_key', L10n::t('API Key'), Config::get('geocoordinates', 'api_key'), ''],
'$language' => ['language', L10n::t('Language code (IETF format)'), Config::get('geocoordinates', 'language'), ''],
@ -97,10 +100,10 @@ function geocoordinates_addon_admin(&$a, &$o)
function geocoordinates_addon_admin_post(&$a)
{
$api_key = ((x($_POST, 'api_key')) ? notags(trim($_POST['api_key'])) : '');
$api_key = (!empty($_POST['api_key']) ? Strings::escapeTags(trim($_POST['api_key'])) : '');
Config::set('geocoordinates', 'api_key', $api_key);
$language = ((x($_POST, 'language')) ? notags(trim($_POST['language'])) : '');
$language = (!empty($_POST['language']) ? Strings::escapeTags(trim($_POST['language'])) : '');
Config::set('geocoordinates', 'language', $language);
info(L10n::t('Settings updated.'). EOL);
}

View File

@ -7,9 +7,10 @@ Use Geonames service to resolve nearest populated location for given latitude, l
## Installation
Pre-requisite: Register a username at geonames.org and set in config/addon.ini.php
Pre-requisite: Register a username at geonames.org and set in `config/addon.config.php`
[geonames]
username = your_username
'geonames' => [
'username' => 'your_username'
],
Also visit http://geonames.org/manageaccount and enable access to the free web services.

View File

@ -0,0 +1,12 @@
<?php
// Warning: Don't change this file! It only holds the default config values for this addon.
// Instead overwrite these config values in config/addon.config.php in your Friendica directory
return [
'geonames' => [
//username (String)
//The geonames.org API username
'username' => '',
],
];

View File

@ -1,12 +0,0 @@
<?php return <<<INI
; Warning: Don't change this file! It only holds the default config values for this addon.
; Instead overwrite these config values in config/addon.ini.php in your Friendica directory
[geonames]
; username (String)
; The geonames.org API username
username =
INI;
//Keep this line

View File

@ -7,7 +7,7 @@
*
*
* Pre-requisite: Register a username at geonames.org
* and set in config/addon.ini.php
* and set in config/addon.config.php
*
* [geonames]
* username = your_username
@ -24,6 +24,7 @@
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Util\Network;
use Friendica\Util\XML;
@ -52,7 +53,7 @@ function geonames_install() {
Addon::registerHook('addon_settings', 'addon/geonames/geonames.php', 'geonames_addon_admin');
Addon::registerHook('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post');
logger("installed geonames");
Logger::log("installed geonames");
}
@ -72,12 +73,12 @@ function geonames_uninstall() {
Addon::unregisterHook('addon_settings_post', 'addon/geonames/geonames.php', 'geonames_addon_admin_post');
logger("removed geonames");
Logger::log("removed geonames");
}
function geonames_load_config(\Friendica\App $a)
{
$a->loadConfigFile(__DIR__. '/config/geonames.ini.php');
$a->loadConfigFile(__DIR__. '/config/geonames.config.php');
}
function geonames_post_hook($a, &$item) {
@ -91,7 +92,7 @@ function geonames_post_hook($a, &$item) {
*
*/
logger('geonames invoked');
Logger::log('geonames invoked');
if(! local_user()) /* non-zero if this is a logged in user of this system */
return;
@ -132,7 +133,7 @@ function geonames_post_hook($a, &$item) {
$item['location'] = $xml->geoname->name . ', ' . $xml->geoname->countryName;
// logger('geonames : ' . print_r($xml,true), LOGGER_DATA);
// Logger::log('geonames : ' . print_r($xml,true), Logger::DATA);
return;
}
@ -149,7 +150,7 @@ function geonames_post_hook($a, &$item) {
*/
function geonames_addon_admin_post($a,$post) {
if(! local_user() || (! x($_POST,'geonames-submit')))
if(! local_user() || empty($_POST['geonames-submit']))
return;
PConfig::set(local_user(),'geonames','enable',intval($_POST['geonames']));
@ -178,7 +179,7 @@ function geonames_addon_admin(&$a,&$s) {
/* 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/geonames/geonames.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/geonames/geonames.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */

View File

@ -9,6 +9,7 @@
*/
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
function gnot_install() {
@ -17,7 +18,7 @@ function gnot_install() {
Addon::registerHook('addon_settings_post', 'addon/gnot/gnot.php', 'gnot_settings_post');
Addon::registerHook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
logger("installed gnot");
Logger::log("installed gnot");
}
@ -28,7 +29,7 @@ function gnot_uninstall() {
Addon::unregisterHook('enotify_mail', 'addon/gnot/gnot.php', 'gnot_enotify_mail');
logger("removed gnot");
Logger::log("removed gnot");
}
@ -43,7 +44,7 @@ function gnot_uninstall() {
*/
function gnot_settings_post($a,$post) {
if(! local_user() || (! x($_POST,'gnot-submit')))
if(! local_user() || empty($_POST['gnot-submit']))
return;
PConfig::set(local_user(),'gnot','enable',intval($_POST['gnot']));
@ -67,7 +68,7 @@ function gnot_settings(&$a,&$s) {
/* 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/gnot/gnot.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/gnot/gnot.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */

View File

@ -8,19 +8,20 @@
*/
use Friendica\Core\Addon;
use Friendica\Core\Cache;
use Friendica\Core\Logger;
function googlemaps_install()
{
Addon::registerHook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
logger("installed googlemaps");
Logger::log("installed googlemaps");
}
function googlemaps_uninstall()
{
Addon::unregisterHook('render_location', 'addon/googlemaps/googlemaps.php', 'googlemaps_location');
logger("removed googlemaps");
Logger::log("removed googlemaps");
}
function googlemaps_location($a, &$item)

View File

@ -30,15 +30,19 @@ Gravatar lets users self-rate their images to be used at appropriate audiences.
See more information at [Gravatar][1].
## Alternative Configuration
Open the config/local.ini.php file and add "gravatar" to the list of activated addons:
Open the `config/local.config.php` file and add "gravatar" to the list of activated addons:
[system]
addon = ...,gravatar
'system' => [
...
'addon' => '...,gravatar'
...
]
You can add two configuration variables for the addon to the config/addon.ini.php file:
You can add two configuration variables for the addon to the `config/addon.config.php` file:
[gravatar]
default_avatar = identicon
rating = g
'gravatar' => [
'default_avatar' => 'identicon',
'rating' => 'g',
],
[1]: http://www.gravatar.com/site/implement/images/ "See documentation at Gravatar for more information"

View File

@ -0,0 +1,28 @@
<?php
// Warning: Don't change this file! It only holds the default config values for this addon.
// Instead overwrite these config values in config/addon.config.php in your Friendica directory
return [
'gravatar' => [
// default_avatar (String)
// If no avatar was found for an email Gravatar can create some pseudo-random generated avatars based on an email hash.
// You can choose between these presets:
// - gravatar : default static Gravatar logo
// - mm : (mystery-man) a static image
// - identicon: a generated geometric pattern based on email hash
// - monsterid: a generated 'monster' with different colors, faces, etc. based on email hash
// - wavatar : faces with different features and backgrounds based on email hash
// - retro : 8-bit arcade-styled pixelated faces based on email hash
'default_avatar' => 'gravatar',
// rating (String)
// Gravatar lets users self-rate their images to be used at appropriate audiences.
// Choose which are appropriate for your friendica site:
// - g : suitable for display on all wesites with any audience type
// - pg: may contain rude gestures, provocatively dressed individuals, the lesser swear words, or mild violence
// - r : may contain such things as harsh profanity, intense violence, nudity, or hard drug use
// - x : may contain hardcore sexual imagery or extremely disurbing violence
'rating' => 'g',
],
];

View File

@ -1,28 +0,0 @@
<?php return <<<INI
; Warning: Don't change this file! It only holds the default config values for this addon.
; Instead overwrite these config values in config/addon.ini.php in your Friendica directory
[gravatar]
; default_avatar (String)
; If no avatar was found for an email Gravatar can create some pseudo-random generated avatars based on an email hash.
; You can choose between these presets:
; - gravatar : default static Gravatar logo
; - mm : (mystery-man) a static image
; - identicon: a generated geometric pattern based on email hash
; - monsterid: a generated 'monster' with different colors, faces, etc. based on email hash
; - wavatar : faces with different features and backgrounds based on email hash
; - retro : 8-bit arcade-styled pixelated faces based on email hash
default_avatar = gravatar
; rating (String)
; Gravatar lets users self-rate their images to be used at appropriate audiences.
; Choose which are appropriate for your friendica site:
; - g : suitable for display on all wesites with any audience type
; - pg: may contain rude gestures, provocatively dressed individuals, the lesser swear words, or mild violence
; - r : may contain such things as harsh profanity, intense violence, nudity, or hard drug use
; - x : may contain hardcore sexual imagery or extremely disurbing violence
rating = g
INI;
//Keep this line

View File

@ -7,10 +7,15 @@
*/
use Friendica\App;
use Friendica\BaseModule;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\Renderer;
use Friendica\Database\DBA;
use Friendica\Util\Security;
use Friendica\Util\Strings;
/**
* Installs the addon hook
@ -19,7 +24,7 @@ function gravatar_install() {
Addon::registerHook('load_config', 'addon/gravatar/gravatar.php', 'gravatar_load_config');
Addon::registerHook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
logger("registered gravatar in avatar_lookup hook");
Logger::log("registered gravatar in avatar_lookup hook");
}
/**
@ -29,12 +34,12 @@ function gravatar_uninstall() {
Addon::unregisterHook('load_config', 'addon/gravatar/gravatar.php', 'gravatar_load_config');
Addon::unregisterHook('avatar_lookup', 'addon/gravatar/gravatar.php', 'gravatar_lookup');
logger("unregistered gravatar in avatar_lookup hook");
Logger::log("unregistered gravatar in avatar_lookup hook");
}
function gravatar_load_config(App $a)
{
$a->loadConfigFile(__DIR__. '/config/gravatar.ini.php');
$a->loadConfigFile(__DIR__ . '/config/gravatar.config.php');
}
/**
@ -68,7 +73,7 @@ function gravatar_lookup($a, &$b) {
* Display admin settings for this addon
*/
function gravatar_addon_admin (&$a, &$o) {
$t = get_markup_template( "admin.tpl", "addon/gravatar/" );
$t = Renderer::getMarkupTemplate( "admin.tpl", "addon/gravatar/" );
$default_avatar = Config::get('gravatar', 'default_avatar');
$rating = Config::get('gravatar', 'rating');
@ -103,8 +108,8 @@ function gravatar_addon_admin (&$a, &$o) {
}
// output Gravatar settings
$o .= '<input type="hidden" name="form_security_token" value="' .get_form_security_token("gravatarsave") .'">';
$o .= replace_macros( $t, [
$o .= '<input type="hidden" name="form_security_token" value="' . BaseModule::getFormSecurityToken("gravatarsave") .'">';
$o .= Renderer::replaceMacros( $t, [
'$submit' => L10n::t('Save Settings'),
'$default_avatar' => ['avatar', L10n::t('Default avatar image'), $default_avatar, L10n::t('Select default avatar image if none was found at Gravatar. See README'), $default_avatars],
'$rating' => ['rating', L10n::t('Rating of images'), $rating, L10n::t('Select the appropriate avatar rating for your site. See README'), $ratings],
@ -115,10 +120,10 @@ function gravatar_addon_admin (&$a, &$o) {
* Save admin settings
*/
function gravatar_addon_admin_post (&$a) {
check_form_security_token('gravatarsave');
BaseModule::checkFormSecurityToken('gravatarsave');
$default_avatar = ((x($_POST, 'avatar')) ? notags(trim($_POST['avatar'])) : 'identicon');
$rating = ((x($_POST, 'rating')) ? notags(trim($_POST['rating'])) : 'g');
$default_avatar = (!empty($_POST['avatar']) ? Strings::escapeTags(trim($_POST['avatar'])) : 'identicon');
$rating = (!empty($_POST['rating']) ? Strings::escapeTags(trim($_POST['rating'])) : 'g');
Config::set('gravatar', 'default_avatar', $default_avatar);
Config::set('gravatar', 'rating', $rating);
info(L10n::t('Gravatar settings updated.') .EOL);

View File

@ -4,14 +4,15 @@
#
#
# Translators:
# Nicola Spanti <translations@nicola-spanti.info>, 2015
# Marie Olive <lacellule101@gmail.com>, 2018
# RyDroid <inactive+RyDroid@transifex.com>, 2015
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2015-08-30 17:12+0000\n"
"Last-Translator: Nicola Spanti <translations@nicola-spanti.info>\n"
"PO-Revision-Date: 2018-11-13 12:05+0000\n"
"Last-Translator: Marie Olive <lacellule101@gmail.com>\n"
"Language-Team: French (http://www.transifex.com/Friendica/friendica/language/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -25,7 +26,7 @@ msgstr "image de profil générique"
#: gravatar.php:72
msgid "random geometric pattern"
msgstr ""
msgstr "Schéma géométrique aléatoire "
#: gravatar.php:73
msgid "monster face"

View File

@ -2,11 +2,12 @@
if(! function_exists("string_plural_select_fr")) {
function string_plural_select_fr($n){
$n = intval($n);
return ($n > 1);;
}}
;
$a->strings["generic profile image"] = "image de profil générique";
$a->strings["random geometric pattern"] = "";
$a->strings["random geometric pattern"] = "Schéma géométrique aléatoire ";
$a->strings["monster face"] = "";
$a->strings["computer generated face"] = "visage généré par ordinateur";
$a->strings["retro arcade style face"] = "";

View File

@ -7,6 +7,7 @@
*/
use Friendica\Core\Addon;
use Friendica\Core\L10n;
use Friendica\Core\Logger;
use Friendica\Core\PConfig;
function group_text_install() {
@ -14,7 +15,7 @@ function group_text_install() {
Addon::registerHook('addon_settings', 'addon/group_text/group_text.php', 'group_text_settings');
Addon::registerHook('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
logger("installed group_text");
Logger::log("installed group_text");
}
@ -24,7 +25,7 @@ function group_text_uninstall() {
Addon::unregisterHook('addon_settings_post', 'addon/group_text/group_text.php', 'group_text_settings_post');
logger("removed group_text");
Logger::log("removed group_text");
}
@ -39,7 +40,7 @@ function group_text_uninstall() {
*/
function group_text_settings_post($a,$post) {
if(! local_user() || (! x($_POST,'group_text-submit')))
if(! local_user() || empty($_POST['group_text-submit']))
return;
PConfig::set(local_user(),'system','groupedit_image_limit',intval($_POST['group_text']));
@ -63,7 +64,7 @@ function group_text_settings(&$a,&$s) {
/* 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/group_text/group_text.css' . '" media="all" />' . "\r\n";
$a->page['htmlhead'] .= '<link rel="stylesheet" type="text/css" href="' . $a->getBaseURL() . '/addon/group_text/group_text.css' . '" media="all" />' . "\r\n";
/* Get the current state of our config variable */

View File

@ -4,24 +4,25 @@
#
#
# Translators:
# Michal Šupler <msupler@gmail.com>, 2014-2015
# Aditoo, 2018
# michal_s <msupler@gmail.com>, 2014-2015
msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-02-27 05:01-0500\n"
"PO-Revision-Date: 2015-02-11 19:40+0000\n"
"Last-Translator: Michal Šupler <msupler@gmail.com>\n"
"Language-Team: Czech (http://www.transifex.com/projects/p/friendica/language/cs/)\n"
"PO-Revision-Date: 2018-09-12 09:47+0000\n"
"Last-Translator: Aditoo\n"
"Language-Team: Czech (http://www.transifex.com/Friendica/friendica/language/cs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: cs\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
#: group_text.php:46
msgid "Group Text settings updated."
msgstr "Nastavení textu skupiny aktualizováno."
msgstr "Nastavení Group Text aktualizována."
#: group_text.php:76
msgid "Group Text"
@ -29,7 +30,7 @@ msgstr "Skupinový text"
#: group_text.php:78
msgid "Use a text only (non-image) group selector in the \"group edit\" menu"
msgstr "Použijte pouze textový (neobrázkový) výběr skupiny v menu editace skupin."
msgstr "Použijte pouze textový (bezobrázkový) výběr skupiny v menu úpravy skupin."
#: group_text.php:84
msgid "Submit"

View File

@ -2,10 +2,11 @@
if(! function_exists("string_plural_select_cs")) {
function string_plural_select_cs($n){
return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;;
$n = intval($n);
return ($n == 1 && $n % 1 == 0) ? 0 : ($n >= 2 && $n <= 4 && $n % 1 == 0) ? 1: ($n % 1 != 0 ) ? 2 : 3;;
}}
;
$a->strings["Group Text settings updated."] = "Nastavení textu skupiny aktualizováno.";
$a->strings["Group Text settings updated."] = "Nastavení Group Text aktualizována.";
$a->strings["Group Text"] = "Skupinový text";
$a->strings["Use a text only (non-image) group selector in the \"group edit\" menu"] = "Použijte pouze textový (neobrázkový) výběr skupiny v menu editace skupin.";
$a->strings["Use a text only (non-image) group selector in the \"group edit\" menu"] = "Použijte pouze textový (bezobrázkový) výběr skupiny v menu úpravy skupin.";
$a->strings["Submit"] = "Odeslat";

1646
highlightjs/asset/CHANGES.md Normal file

File diff suppressed because it is too large Load Diff

24
highlightjs/asset/LICENSE Normal file
View File

@ -0,0 +1,24 @@
Copyright (c) 2006, Ivan Sagalaev
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of highlight.js nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

150
highlightjs/asset/README.md Normal file
View File

@ -0,0 +1,150 @@
# Highlight.js
[![Build Status](https://travis-ci.org/isagalaev/highlight.js.svg?branch=master)](https://travis-ci.org/isagalaev/highlight.js)
Highlight.js is a syntax highlighter written in JavaScript. It works in
the browser as well as on the server. It works with pretty much any
markup, doesnt depend on any framework and has automatic language
detection.
## Getting Started
The bare minimum for using highlight.js on a web page is linking to the
library along with one of the styles and calling
[`initHighlightingOnLoad`][1]:
```html
<link rel="stylesheet" href="/path/to/styles/default.css">
<script src="/path/to/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
```
This will find and highlight code inside of `<pre><code>` tags; it tries
to detect the language automatically. If automatic detection doesnt
work for you, you can specify the language in the `class` attribute:
```html
<pre><code class="html">...</code></pre>
```
The list of supported language classes is available in the [class
reference][2]. Classes can also be prefixed with either `language-` or
`lang-`.
To disable highlighting altogether use the `nohighlight` class:
```html
<pre><code class="nohighlight">...</code></pre>
```
## Custom Initialization
When you need a bit more control over the initialization of
highlight.js, you can use the [`highlightBlock`][3] and [`configure`][4]
functions. This allows you to control *what* to highlight and *when*.
Heres an equivalent way to calling [`initHighlightingOnLoad`][1] using
jQuery:
```javascript
$(document).ready(function() {
$('pre code').each(function(i, block) {
hljs.highlightBlock(block);
});
});
```
You can use any tags instead of `<pre><code>` to mark up your code. If
you don't use a container that preserve line breaks you will need to
configure highlight.js to use the `<br>` tag:
```javascript
hljs.configure({useBR: true});
$('div.code').each(function(i, block) {
hljs.highlightBlock(block);
});
```
For other options refer to the documentation for [`configure`][4].
## Web Workers
You can run highlighting inside a web worker to avoid freezing the browser
window while dealing with very big chunks of code.
In your main script:
```javascript
addEventListener('load', function() {
var code = document.querySelector('#code');
var worker = new Worker('worker.js');
worker.onmessage = function(event) { code.innerHTML = event.data; }
worker.postMessage(code.textContent);
})
```
In worker.js:
```javascript
onmessage = function(event) {
importScripts('<path>/highlight.pack.js');
var result = self.hljs.highlightAuto(event.data);
postMessage(result.value);
}
```
## Getting the Library
You can get highlight.js as a hosted, or custom-build, browser script or
as a server module. Right out of the box the browser script supports
both AMD and CommonJS, so if you wish you can use RequireJS or
Browserify without having to build from source. The server module also
works perfectly fine with Browserify, but there is the option to use a
build specific to browsers rather than something meant for a server.
Head over to the [download page][5] for all the options.
**Don't link to GitHub directly.** The library is not supposed to work straight
from the source, it requires building. If none of the pre-packaged options
work for you refer to the [building documentation][6].
**The CDN-hosted package doesn't have all the languages.** Otherwise it'd be
too big. If you don't see the language you need in the ["Common" section][5],
it can be added manually:
```html
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/languages/go.min.js"></script>
```
**On Almond.** You need to use the optimizer to give the module a name. For
example:
```
r.js -o name=hljs paths.hljs=/path/to/highlight out=highlight.js
```
## License
Highlight.js is released under the BSD License. See [LICENSE][7] file
for details.
## Links
The official site for the library is at <https://highlightjs.org/>.
Further in-depth documentation for the API and other topics is at
<http://highlightjs.readthedocs.io/>.
Authors and contributors are listed in the [AUTHORS.en.txt][8] file.
[1]: http://highlightjs.readthedocs.io/en/latest/api.html#inithighlightingonload
[2]: http://highlightjs.readthedocs.io/en/latest/css-classes-reference.html
[3]: http://highlightjs.readthedocs.io/en/latest/api.html#highlightblock-block
[4]: http://highlightjs.readthedocs.io/en/latest/api.html#configure-options
[5]: https://highlightjs.org/download/
[6]: http://highlightjs.readthedocs.io/en/latest/building-testing.html
[7]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE
[8]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.en.txt

View File

@ -0,0 +1,142 @@
# Highlight.js
Highlight.js — это инструмент для подсветки синтаксиса, написанный на JavaScript. Он работает
и в браузере, и на сервере. Он работает с практически любой HTML разметкой, не
зависит от каких-либо фреймворков и умеет автоматически определять язык.
## Начало работы
Минимум, что нужно сделать для использования highlight.js на веб-странице — это
подключить библиотеку, CSS-стили и вызывать [`initHighlightingOnLoad`][1]:
```html
<link rel="stylesheet" href="/path/to/styles/default.css">
<script src="/path/to/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
```
Библиотека найдёт и раскрасит код внутри тегов `<pre><code>`, попытавшись
автоматически определить язык. Когда автоопределение не срабатывает, можно явно
указать язык в атрибуте class:
```html
<pre><code class="html">...</code></pre>
```
Список поддерживаемых классов языков доступен в [справочнике по классам][2].
Класс также можно предварить префиксами `language-` или `lang-`.
Чтобы отключить подсветку для какого-то блока, используйте класс `nohighlight`:
```html
<pre><code class="nohighlight">...</code></pre>
```
## Инициализация вручную
Чтобы иметь чуть больше контроля за инициализацией подсветки, вы можете
использовать функции [`highlightBlock`][3] и [`configure`][4]. Таким образом
можно управлять тем, *что* и *когда* подсвечивать.
Вот пример инициализации, эквивалентной вызову [`initHighlightingOnLoad`][1], но
с использованием jQuery:
```javascript
$(document).ready(function() {
$('pre code').each(function(i, block) {
hljs.highlightBlock(block);
});
});
```
Вы можете использовать любые теги разметки вместо `<pre><code>`. Если
используете контейнер, не сохраняющий переводы строк, вам нужно сказать
highlight.js использовать для них тег `<br>`:
```javascript
hljs.configure({useBR: true});
$('div.code').each(function(i, block) {
hljs.highlightBlock(block);
});
```
Другие опции можно найти в документации функции [`configure`][4].
## Web Workers
Подсветку можно запустить внутри web worker'а, чтобы окно
браузера не подтормаживало при работе с большими кусками кода.
В основном скрипте:
```javascript
addEventListener('load', function() {
var code = document.querySelector('#code');
var worker = new Worker('worker.js');
worker.onmessage = function(event) { code.innerHTML = event.data; }
worker.postMessage(code.textContent);
})
```
В worker.js:
```javascript
onmessage = function(event) {
importScripts('<path>/highlight.pack.js');
var result = self.hljs.highlightAuto(event.data);
postMessage(result.value);
}
```
## Установка библиотеки
Highlight.js можно использовать в браузере прямо с CDN хостинга или скачать
индивидуальную сборку, а также установив модуль на сервере. На
[странице загрузки][5] подробно описаны все варианты.
**Не подключайте GitHub напрямую.** Библиотека не предназначена для
использования в виде исходного кода, а требует отдельной сборки. Если вам не
подходит ни один из готовых вариантов, читайте [документацию по сборке][6].
**Файл на CDN содержит не все языки.** Иначе он будет слишком большого размера.
Если нужного вам языка нет в [категории "Common"][5], можно дообавить его
вручную:
```html
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/languages/go.min.js"></script>
```
**Про Almond.** Нужно задать имя модуля в оптимизаторе, например:
```
r.js -o name=hljs paths.hljs=/path/to/highlight out=highlight.js
```
## Лицензия
Highlight.js распространяется под лицензией BSD. Подробнее читайте файл
[LICENSE][7].
## Ссылки
Официальный сайт билиотеки расположен по адресу <https://highlightjs.org/>.
Более подробная документация по API и другим темам расположена на
<http://highlightjs.readthedocs.io/>.
Авторы и контрибьюторы перечислены в файле [AUTHORS.ru.txt][8] file.
[1]: http://highlightjs.readthedocs.io/en/latest/api.html#inithighlightingonload
[2]: http://highlightjs.readthedocs.io/en/latest/css-classes-reference.html
[3]: http://highlightjs.readthedocs.io/en/latest/api.html#highlightblock-block
[4]: http://highlightjs.readthedocs.io/en/latest/api.html#configure-options
[5]: https://highlightjs.org/download/
[6]: http://highlightjs.readthedocs.io/en/latest/building-testing.html
[7]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE
[8]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.ru.txt

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,108 @@
/*!
* Agate by Taufik Nurrohman <https://github.com/tovic>
* ----------------------------------------------------
*
* #ade5fc
* #a2fca2
* #c6b4f0
* #d36363
* #fcc28c
* #fc9b9b
* #ffa
* #fff
* #333
* #62c8f3
* #888
*
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #333;
color: white;
}
.hljs-name,
.hljs-strong {
font-weight: bold;
}
.hljs-code,
.hljs-emphasis {
font-style: italic;
}
.hljs-tag {
color: #62c8f3;
}
.hljs-variable,
.hljs-template-variable,
.hljs-selector-id,
.hljs-selector-class {
color: #ade5fc;
}
.hljs-string,
.hljs-bullet {
color: #a2fca2;
}
.hljs-type,
.hljs-title,
.hljs-section,
.hljs-attribute,
.hljs-quote,
.hljs-built_in,
.hljs-builtin-name {
color: #ffa;
}
.hljs-number,
.hljs-symbol,
.hljs-bullet {
color: #d36363;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal {
color: #fcc28c;
}
.hljs-comment,
.hljs-deletion,
.hljs-code {
color: #888;
}
.hljs-regexp,
.hljs-link {
color: #c6b4f0;
}
.hljs-meta {
color: #fc9b9b;
}
.hljs-deletion {
background-color: #fc9b9b;
color: #333;
}
.hljs-addition {
background-color: #a2fca2;
color: #333;
}
.hljs a {
color: inherit;
}
.hljs a:focus,
.hljs a:hover {
color: inherit;
text-decoration: underline;
}

View File

@ -0,0 +1,66 @@
/*
Date: 24 Fev 2015
Author: Pedro Oliveira <kanytu@gmail . com>
*/
.hljs {
color: #a9b7c6;
background: #282b2e;
display: block;
overflow-x: auto;
padding: 0.5em;
}
.hljs-number,
.hljs-literal,
.hljs-symbol,
.hljs-bullet {
color: #6897BB;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-deletion {
color: #cc7832;
}
.hljs-variable,
.hljs-template-variable,
.hljs-link {
color: #629755;
}
.hljs-comment,
.hljs-quote {
color: #808080;
}
.hljs-meta {
color: #bbb529;
}
.hljs-string,
.hljs-attribute,
.hljs-addition {
color: #6A8759;
}
.hljs-section,
.hljs-title,
.hljs-type {
color: #ffc66d;
}
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #e8bf6a;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,88 @@
/*
Arduino® Light Theme - Stefania Mellai <s.mellai@arduino.cc>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #FFFFFF;
}
.hljs,
.hljs-subst {
color: #434f54;
}
.hljs-keyword,
.hljs-attribute,
.hljs-selector-tag,
.hljs-doctag,
.hljs-name {
color: #00979D;
}
.hljs-built_in,
.hljs-literal,
.hljs-bullet,
.hljs-code,
.hljs-addition {
color: #D35400;
}
.hljs-regexp,
.hljs-symbol,
.hljs-variable,
.hljs-template-variable,
.hljs-link,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #00979D;
}
.hljs-type,
.hljs-string,
.hljs-selector-id,
.hljs-selector-class,
.hljs-quote,
.hljs-template-tag,
.hljs-deletion {
color: #005C5F;
}
.hljs-title,
.hljs-section {
color: #880000;
font-weight: bold;
}
.hljs-comment {
color: rgba(149,165,166,.8);
}
.hljs-meta-keyword {
color: #728E00;
}
.hljs-meta {
color: #728E00;
color: #434f54;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
.hljs-function {
color: #728E00;
}
.hljs-number {
color: #8A7B52;
}

View File

@ -0,0 +1,73 @@
/*
Date: 17.V.2011
Author: pumbur <pumbur@pumbur.net>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #222;
}
.hljs,
.hljs-subst {
color: #aaa;
}
.hljs-section {
color: #fff;
}
.hljs-comment,
.hljs-quote,
.hljs-meta {
color: #444;
}
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-regexp {
color: #ffcc33;
}
.hljs-number,
.hljs-addition {
color: #00cc66;
}
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-template-variable,
.hljs-attribute,
.hljs-link {
color: #32aaee;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #6644aa;
}
.hljs-title,
.hljs-variable,
.hljs-deletion,
.hljs-template-tag {
color: #bb1166;
}
.hljs-section,
.hljs-doctag,
.hljs-strong {
font-weight: bold;
}
.hljs-emphasis {
font-style: italic;
}

View File

@ -0,0 +1,45 @@
/*
Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: white;
color: black;
}
.hljs-string,
.hljs-variable,
.hljs-template-variable,
.hljs-symbol,
.hljs-bullet,
.hljs-section,
.hljs-addition,
.hljs-attribute,
.hljs-link {
color: #888;
}
.hljs-comment,
.hljs-quote,
.hljs-meta,
.hljs-deletion {
color: #ccc;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-section,
.hljs-name,
.hljs-type,
.hljs-strong {
font-weight: bold;
}
.hljs-emphasis {
font-style: italic;
}

View File

@ -0,0 +1,83 @@
/* Base16 Atelier Cave Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Cave Comment */
.hljs-comment,
.hljs-quote {
color: #7e7887;
}
/* Atelier-Cave Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-regexp,
.hljs-link,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #be4678;
}
/* Atelier-Cave Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #aa573c;
}
/* Atelier-Cave Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #2a9292;
}
/* Atelier-Cave Blue */
.hljs-title,
.hljs-section {
color: #576ddb;
}
/* Atelier-Cave Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #955ae7;
}
.hljs-deletion,
.hljs-addition {
color: #19171c;
display: inline-block;
width: 100%;
}
.hljs-deletion {
background-color: #be4678;
}
.hljs-addition {
background-color: #2a9292;
}
.hljs {
display: block;
overflow-x: auto;
background: #19171c;
color: #8b8792;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,85 @@
/* Base16 Atelier Cave Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Cave Comment */
.hljs-comment,
.hljs-quote {
color: #655f6d;
}
/* Atelier-Cave Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #be4678;
}
/* Atelier-Cave Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #aa573c;
}
/* Atelier-Cave Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #2a9292;
}
/* Atelier-Cave Blue */
.hljs-title,
.hljs-section {
color: #576ddb;
}
/* Atelier-Cave Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #955ae7;
}
.hljs-deletion,
.hljs-addition {
color: #19171c;
display: inline-block;
width: 100%;
}
.hljs-deletion {
background-color: #be4678;
}
.hljs-addition {
background-color: #2a9292;
}
.hljs {
display: block;
overflow-x: auto;
background: #efecf4;
color: #585260;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,69 @@
/* Base16 Atelier Dune Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Dune Comment */
.hljs-comment,
.hljs-quote {
color: #999580;
}
/* Atelier-Dune Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #d73737;
}
/* Atelier-Dune Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #b65611;
}
/* Atelier-Dune Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #60ac39;
}
/* Atelier-Dune Blue */
.hljs-title,
.hljs-section {
color: #6684e1;
}
/* Atelier-Dune Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #b854d4;
}
.hljs {
display: block;
overflow-x: auto;
background: #20201d;
color: #a6a28c;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,69 @@
/* Base16 Atelier Dune Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Dune Comment */
.hljs-comment,
.hljs-quote {
color: #7d7a68;
}
/* Atelier-Dune Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #d73737;
}
/* Atelier-Dune Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #b65611;
}
/* Atelier-Dune Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #60ac39;
}
/* Atelier-Dune Blue */
.hljs-title,
.hljs-section {
color: #6684e1;
}
/* Atelier-Dune Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #b854d4;
}
.hljs {
display: block;
overflow-x: auto;
background: #fefbec;
color: #6e6b5e;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,84 @@
/* Base16 Atelier Estuary Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Estuary Comment */
.hljs-comment,
.hljs-quote {
color: #878573;
}
/* Atelier-Estuary Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #ba6236;
}
/* Atelier-Estuary Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #ae7313;
}
/* Atelier-Estuary Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #7d9726;
}
/* Atelier-Estuary Blue */
.hljs-title,
.hljs-section {
color: #36a166;
}
/* Atelier-Estuary Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #5f9182;
}
.hljs-deletion,
.hljs-addition {
color: #22221b;
display: inline-block;
width: 100%;
}
.hljs-deletion {
background-color: #ba6236;
}
.hljs-addition {
background-color: #7d9726;
}
.hljs {
display: block;
overflow-x: auto;
background: #22221b;
color: #929181;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,84 @@
/* Base16 Atelier Estuary Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Estuary Comment */
.hljs-comment,
.hljs-quote {
color: #6c6b5a;
}
/* Atelier-Estuary Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #ba6236;
}
/* Atelier-Estuary Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #ae7313;
}
/* Atelier-Estuary Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #7d9726;
}
/* Atelier-Estuary Blue */
.hljs-title,
.hljs-section {
color: #36a166;
}
/* Atelier-Estuary Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #5f9182;
}
.hljs-deletion,
.hljs-addition {
color: #22221b;
display: inline-block;
width: 100%;
}
.hljs-deletion {
background-color: #ba6236;
}
.hljs-addition {
background-color: #7d9726;
}
.hljs {
display: block;
overflow-x: auto;
background: #f4f3ec;
color: #5f5e4e;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,69 @@
/* Base16 Atelier Forest Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Forest Comment */
.hljs-comment,
.hljs-quote {
color: #9c9491;
}
/* Atelier-Forest Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #f22c40;
}
/* Atelier-Forest Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #df5320;
}
/* Atelier-Forest Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #7b9726;
}
/* Atelier-Forest Blue */
.hljs-title,
.hljs-section {
color: #407ee7;
}
/* Atelier-Forest Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #6666ea;
}
.hljs {
display: block;
overflow-x: auto;
background: #1b1918;
color: #a8a19f;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,69 @@
/* Base16 Atelier Forest Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Forest Comment */
.hljs-comment,
.hljs-quote {
color: #766e6b;
}
/* Atelier-Forest Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #f22c40;
}
/* Atelier-Forest Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #df5320;
}
/* Atelier-Forest Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #7b9726;
}
/* Atelier-Forest Blue */
.hljs-title,
.hljs-section {
color: #407ee7;
}
/* Atelier-Forest Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #6666ea;
}
.hljs {
display: block;
overflow-x: auto;
background: #f1efee;
color: #68615e;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,69 @@
/* Base16 Atelier Heath Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Heath Comment */
.hljs-comment,
.hljs-quote {
color: #9e8f9e;
}
/* Atelier-Heath Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #ca402b;
}
/* Atelier-Heath Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #a65926;
}
/* Atelier-Heath Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #918b3b;
}
/* Atelier-Heath Blue */
.hljs-title,
.hljs-section {
color: #516aec;
}
/* Atelier-Heath Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #7b59c0;
}
.hljs {
display: block;
overflow-x: auto;
background: #1b181b;
color: #ab9bab;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,69 @@
/* Base16 Atelier Heath Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Heath Comment */
.hljs-comment,
.hljs-quote {
color: #776977;
}
/* Atelier-Heath Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #ca402b;
}
/* Atelier-Heath Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #a65926;
}
/* Atelier-Heath Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #918b3b;
}
/* Atelier-Heath Blue */
.hljs-title,
.hljs-section {
color: #516aec;
}
/* Atelier-Heath Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #7b59c0;
}
.hljs {
display: block;
overflow-x: auto;
background: #f7f3f7;
color: #695d69;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,69 @@
/* Base16 Atelier Lakeside Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Lakeside Comment */
.hljs-comment,
.hljs-quote {
color: #7195a8;
}
/* Atelier-Lakeside Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #d22d72;
}
/* Atelier-Lakeside Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #935c25;
}
/* Atelier-Lakeside Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #568c3b;
}
/* Atelier-Lakeside Blue */
.hljs-title,
.hljs-section {
color: #257fad;
}
/* Atelier-Lakeside Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #6b6bb8;
}
.hljs {
display: block;
overflow-x: auto;
background: #161b1d;
color: #7ea2b4;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,69 @@
/* Base16 Atelier Lakeside Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Lakeside Comment */
.hljs-comment,
.hljs-quote {
color: #5a7b8c;
}
/* Atelier-Lakeside Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #d22d72;
}
/* Atelier-Lakeside Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #935c25;
}
/* Atelier-Lakeside Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #568c3b;
}
/* Atelier-Lakeside Blue */
.hljs-title,
.hljs-section {
color: #257fad;
}
/* Atelier-Lakeside Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #6b6bb8;
}
.hljs {
display: block;
overflow-x: auto;
background: #ebf8ff;
color: #516d7b;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,84 @@
/* Base16 Atelier Plateau Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Plateau Comment */
.hljs-comment,
.hljs-quote {
color: #7e7777;
}
/* Atelier-Plateau Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #ca4949;
}
/* Atelier-Plateau Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #b45a3c;
}
/* Atelier-Plateau Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #4b8b8b;
}
/* Atelier-Plateau Blue */
.hljs-title,
.hljs-section {
color: #7272ca;
}
/* Atelier-Plateau Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #8464c4;
}
.hljs-deletion,
.hljs-addition {
color: #1b1818;
display: inline-block;
width: 100%;
}
.hljs-deletion {
background-color: #ca4949;
}
.hljs-addition {
background-color: #4b8b8b;
}
.hljs {
display: block;
overflow-x: auto;
background: #1b1818;
color: #8a8585;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,84 @@
/* Base16 Atelier Plateau Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Plateau Comment */
.hljs-comment,
.hljs-quote {
color: #655d5d;
}
/* Atelier-Plateau Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #ca4949;
}
/* Atelier-Plateau Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #b45a3c;
}
/* Atelier-Plateau Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #4b8b8b;
}
/* Atelier-Plateau Blue */
.hljs-title,
.hljs-section {
color: #7272ca;
}
/* Atelier-Plateau Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #8464c4;
}
.hljs-deletion,
.hljs-addition {
color: #1b1818;
display: inline-block;
width: 100%;
}
.hljs-deletion {
background-color: #ca4949;
}
.hljs-addition {
background-color: #4b8b8b;
}
.hljs {
display: block;
overflow-x: auto;
background: #f4ecec;
color: #585050;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,84 @@
/* Base16 Atelier Savanna Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Savanna Comment */
.hljs-comment,
.hljs-quote {
color: #78877d;
}
/* Atelier-Savanna Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #b16139;
}
/* Atelier-Savanna Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #9f713c;
}
/* Atelier-Savanna Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #489963;
}
/* Atelier-Savanna Blue */
.hljs-title,
.hljs-section {
color: #478c90;
}
/* Atelier-Savanna Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #55859b;
}
.hljs-deletion,
.hljs-addition {
color: #171c19;
display: inline-block;
width: 100%;
}
.hljs-deletion {
background-color: #b16139;
}
.hljs-addition {
background-color: #489963;
}
.hljs {
display: block;
overflow-x: auto;
background: #171c19;
color: #87928a;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,84 @@
/* Base16 Atelier Savanna Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Savanna Comment */
.hljs-comment,
.hljs-quote {
color: #5f6d64;
}
/* Atelier-Savanna Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #b16139;
}
/* Atelier-Savanna Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #9f713c;
}
/* Atelier-Savanna Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #489963;
}
/* Atelier-Savanna Blue */
.hljs-title,
.hljs-section {
color: #478c90;
}
/* Atelier-Savanna Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #55859b;
}
.hljs-deletion,
.hljs-addition {
color: #171c19;
display: inline-block;
width: 100%;
}
.hljs-deletion {
background-color: #b16139;
}
.hljs-addition {
background-color: #489963;
}
.hljs {
display: block;
overflow-x: auto;
background: #ecf4ee;
color: #526057;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,69 @@
/* Base16 Atelier Seaside Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Seaside Comment */
.hljs-comment,
.hljs-quote {
color: #809980;
}
/* Atelier-Seaside Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #e6193c;
}
/* Atelier-Seaside Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #87711d;
}
/* Atelier-Seaside Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #29a329;
}
/* Atelier-Seaside Blue */
.hljs-title,
.hljs-section {
color: #3d62f5;
}
/* Atelier-Seaside Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #ad2bee;
}
.hljs {
display: block;
overflow-x: auto;
background: #131513;
color: #8ca68c;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,69 @@
/* Base16 Atelier Seaside Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Seaside Comment */
.hljs-comment,
.hljs-quote {
color: #687d68;
}
/* Atelier-Seaside Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #e6193c;
}
/* Atelier-Seaside Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #87711d;
}
/* Atelier-Seaside Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #29a329;
}
/* Atelier-Seaside Blue */
.hljs-title,
.hljs-section {
color: #3d62f5;
}
/* Atelier-Seaside Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #ad2bee;
}
.hljs {
display: block;
overflow-x: auto;
background: #f4fbf4;
color: #5e6e5e;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,69 @@
/* Base16 Atelier Sulphurpool Dark - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Sulphurpool Comment */
.hljs-comment,
.hljs-quote {
color: #898ea4;
}
/* Atelier-Sulphurpool Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #c94922;
}
/* Atelier-Sulphurpool Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #c76b29;
}
/* Atelier-Sulphurpool Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #ac9739;
}
/* Atelier-Sulphurpool Blue */
.hljs-title,
.hljs-section {
color: #3d8fd1;
}
/* Atelier-Sulphurpool Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #6679cc;
}
.hljs {
display: block;
overflow-x: auto;
background: #202746;
color: #979db4;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,69 @@
/* Base16 Atelier Sulphurpool Light - Theme */
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
/* Atelier-Sulphurpool Comment */
.hljs-comment,
.hljs-quote {
color: #6b7394;
}
/* Atelier-Sulphurpool Red */
.hljs-variable,
.hljs-template-variable,
.hljs-attribute,
.hljs-tag,
.hljs-name,
.hljs-regexp,
.hljs-link,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
color: #c94922;
}
/* Atelier-Sulphurpool Orange */
.hljs-number,
.hljs-meta,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params {
color: #c76b29;
}
/* Atelier-Sulphurpool Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet {
color: #ac9739;
}
/* Atelier-Sulphurpool Blue */
.hljs-title,
.hljs-section {
color: #3d8fd1;
}
/* Atelier-Sulphurpool Purple */
.hljs-keyword,
.hljs-selector-tag {
color: #6679cc;
}
.hljs {
display: block;
overflow-x: auto;
background: #f5f7ff;
color: #5e6687;
padding: 0.5em;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,96 @@
/*
Atom One Dark by Daniel Gamage
Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax
base: #282c34
mono-1: #abb2bf
mono-2: #818896
mono-3: #5c6370
hue-1: #56b6c2
hue-2: #61aeee
hue-3: #c678dd
hue-4: #98c379
hue-5: #e06c75
hue-5-2: #be5046
hue-6: #d19a66
hue-6-2: #e6c07b
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
color: #abb2bf;
background: #282c34;
}
.hljs-comment,
.hljs-quote {
color: #5c6370;
font-style: italic;
}
.hljs-doctag,
.hljs-keyword,
.hljs-formula {
color: #c678dd;
}
.hljs-section,
.hljs-name,
.hljs-selector-tag,
.hljs-deletion,
.hljs-subst {
color: #e06c75;
}
.hljs-literal {
color: #56b6c2;
}
.hljs-string,
.hljs-regexp,
.hljs-addition,
.hljs-attribute,
.hljs-meta-string {
color: #98c379;
}
.hljs-built_in,
.hljs-class .hljs-title {
color: #e6c07b;
}
.hljs-attr,
.hljs-variable,
.hljs-template-variable,
.hljs-type,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-number {
color: #d19a66;
}
.hljs-symbol,
.hljs-bullet,
.hljs-link,
.hljs-meta,
.hljs-selector-id,
.hljs-title {
color: #61aeee;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
.hljs-link {
text-decoration: underline;
}

View File

@ -0,0 +1,96 @@
/*
Atom One Light by Daniel Gamage
Original One Light Syntax theme from https://github.com/atom/one-light-syntax
base: #fafafa
mono-1: #383a42
mono-2: #686b77
mono-3: #a0a1a7
hue-1: #0184bb
hue-2: #4078f2
hue-3: #a626a4
hue-4: #50a14f
hue-5: #e45649
hue-5-2: #c91243
hue-6: #986801
hue-6-2: #c18401
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
color: #383a42;
background: #fafafa;
}
.hljs-comment,
.hljs-quote {
color: #a0a1a7;
font-style: italic;
}
.hljs-doctag,
.hljs-keyword,
.hljs-formula {
color: #a626a4;
}
.hljs-section,
.hljs-name,
.hljs-selector-tag,
.hljs-deletion,
.hljs-subst {
color: #e45649;
}
.hljs-literal {
color: #0184bb;
}
.hljs-string,
.hljs-regexp,
.hljs-addition,
.hljs-attribute,
.hljs-meta-string {
color: #50a14f;
}
.hljs-built_in,
.hljs-class .hljs-title {
color: #c18401;
}
.hljs-attr,
.hljs-variable,
.hljs-template-variable,
.hljs-type,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-number {
color: #986801;
}
.hljs-symbol,
.hljs-bullet,
.hljs-link,
.hljs-meta,
.hljs-selector-id,
.hljs-title {
color: #4078f2;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
.hljs-link {
text-decoration: underline;
}

View File

@ -0,0 +1,98 @@
/*
Original highlight.js style (c) Ivan Sagalaev <maniac@softwaremaniacs.org>
*/
.hljs {
display: block;
overflow-x: auto;
background: transparent;
}
/* Base color: saturation 0; */
.hljs,
.hljs-subst {
color: #444;
}
.hljs-comment {
color: #888888;
}
.hljs-keyword,
.hljs-attribute,
.hljs-selector-tag,
.hljs-meta-keyword,
.hljs-doctag,
.hljs-name {
font-weight: bold;
}
/* User color: hue: 0 */
.hljs-type,
.hljs-string,
.hljs-number,
.hljs-selector-id,
.hljs-selector-class,
.hljs-quote,
.hljs-template-tag,
.hljs-deletion {
color: #880000;
}
.hljs-title,
.hljs-section {
color: #880000;
font-weight: bold;
}
.hljs-regexp,
.hljs-symbol,
.hljs-variable,
.hljs-template-variable,
.hljs-link,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #BC6060;
}
/* Language color: hue: 90; */
.hljs-literal {
color: #78A960;
}
.hljs-built_in,
.hljs-bullet,
.hljs-code,
.hljs-addition {
color: #397300;
}
/* Meta color: hue: 200 */
.hljs-meta {
color: #1f7199;
}
.hljs-meta-string {
color: #4d99bf;
}
/* Misc effects */
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,64 @@
/*
Brown Paper style from goldblog.com.ua (c) Zaripov Yura <yur4ik7@ukr.net>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background:#b7a68e url(./brown-papersq.png);
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal {
color:#005599;
font-weight:bold;
}
.hljs,
.hljs-subst {
color: #363c69;
}
.hljs-string,
.hljs-title,
.hljs-section,
.hljs-type,
.hljs-attribute,
.hljs-symbol,
.hljs-bullet,
.hljs-built_in,
.hljs-addition,
.hljs-variable,
.hljs-template-tag,
.hljs-template-variable,
.hljs-link,
.hljs-name {
color: #2c009f;
}
.hljs-comment,
.hljs-quote,
.hljs-meta,
.hljs-deletion {
color: #802022;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-doctag,
.hljs-title,
.hljs-section,
.hljs-type,
.hljs-name,
.hljs-strong {
font-weight: bold;
}
.hljs-emphasis {
font-style: italic;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -0,0 +1,60 @@
/*
codepen.io Embed Theme
Author: Justin Perry <http://github.com/ourmaninamsterdam>
Original theme - https://github.com/chriskempson/tomorrow-theme
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #222;
color: #fff;
}
.hljs-comment,
.hljs-quote {
color: #777;
}
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-regexp,
.hljs-meta,
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-params,
.hljs-symbol,
.hljs-bullet,
.hljs-link,
.hljs-deletion {
color: #ab875d;
}
.hljs-section,
.hljs-title,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-type,
.hljs-attribute {
color: #9b869b;
}
.hljs-string,
.hljs-keyword,
.hljs-selector-tag,
.hljs-addition {
color: #8f9c6c;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,71 @@
/*
Colorbrewer theme
Original: https://github.com/mbostock/colorbrewer-theme (c) Mike Bostock <mike@ocks.org>
Ported by Fabrício Tavares de Oliveira
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #fff;
}
.hljs,
.hljs-subst {
color: #000;
}
.hljs-string,
.hljs-meta,
.hljs-symbol,
.hljs-template-tag,
.hljs-template-variable,
.hljs-addition {
color: #756bb1;
}
.hljs-comment,
.hljs-quote {
color: #636363;
}
.hljs-number,
.hljs-regexp,
.hljs-literal,
.hljs-bullet,
.hljs-link {
color: #31a354;
}
.hljs-deletion,
.hljs-variable {
color: #88f;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-title,
.hljs-section,
.hljs-built_in,
.hljs-doctag,
.hljs-type,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-strong {
color: #3182bd;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-attribute {
color: #e6550d;
}

View File

@ -0,0 +1,77 @@
/*
Darcula color scheme from the JetBrains family of IDEs
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #2b2b2b;
}
.hljs {
color: #bababa;
}
.hljs-strong,
.hljs-emphasis {
color: #a8a8a2;
}
.hljs-bullet,
.hljs-quote,
.hljs-link,
.hljs-number,
.hljs-regexp,
.hljs-literal {
color: #6896ba;
}
.hljs-code,
.hljs-selector-class {
color: #a6e22e;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-section,
.hljs-attribute,
.hljs-name,
.hljs-variable {
color: #cb7832;
}
.hljs-params {
color: #b9b9b9;
}
.hljs-string {
color: #6a8759;
}
.hljs-subst,
.hljs-type,
.hljs-built_in,
.hljs-builtin-name,
.hljs-symbol,
.hljs-selector-id,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-template-tag,
.hljs-template-variable,
.hljs-addition {
color: #e0c46c;
}
.hljs-comment,
.hljs-deletion,
.hljs-meta {
color: #7f7f7f;
}

View File

@ -0,0 +1,63 @@
/*
Dark style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #444;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-section,
.hljs-link {
color: white;
}
.hljs,
.hljs-subst {
color: #ddd;
}
.hljs-string,
.hljs-title,
.hljs-name,
.hljs-type,
.hljs-attribute,
.hljs-symbol,
.hljs-bullet,
.hljs-built_in,
.hljs-addition,
.hljs-variable,
.hljs-template-tag,
.hljs-template-variable {
color: #d88;
}
.hljs-comment,
.hljs-quote,
.hljs-deletion,
.hljs-meta {
color: #777;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-title,
.hljs-section,
.hljs-doctag,
.hljs-type,
.hljs-name,
.hljs-strong {
font-weight: bold;
}
.hljs-emphasis {
font-style: italic;
}

View File

@ -0,0 +1,6 @@
/*
Deprecated due to a typo in the name and left here for compatibility purpose only.
Please use darcula.css instead.
*/
@import url('darcula.css');

View File

@ -0,0 +1,99 @@
/*
Original highlight.js style (c) Ivan Sagalaev <maniac@softwaremaniacs.org>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #F0F0F0;
}
/* Base color: saturation 0; */
.hljs,
.hljs-subst {
color: #444;
}
.hljs-comment {
color: #888888;
}
.hljs-keyword,
.hljs-attribute,
.hljs-selector-tag,
.hljs-meta-keyword,
.hljs-doctag,
.hljs-name {
font-weight: bold;
}
/* User color: hue: 0 */
.hljs-type,
.hljs-string,
.hljs-number,
.hljs-selector-id,
.hljs-selector-class,
.hljs-quote,
.hljs-template-tag,
.hljs-deletion {
color: #880000;
}
.hljs-title,
.hljs-section {
color: #880000;
font-weight: bold;
}
.hljs-regexp,
.hljs-symbol,
.hljs-variable,
.hljs-template-variable,
.hljs-link,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #BC6060;
}
/* Language color: hue: 90; */
.hljs-literal {
color: #78A960;
}
.hljs-built_in,
.hljs-bullet,
.hljs-code,
.hljs-addition {
color: #397300;
}
/* Meta color: hue: 200 */
.hljs-meta {
color: #1f7199;
}
.hljs-meta-string {
color: #4d99bf;
}
/* Misc effects */
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,97 @@
/*
Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine (@thingsinjars)
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
color: #000;
background: #f8f8ff;
}
.hljs-comment,
.hljs-quote {
color: #408080;
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-subst {
color: #954121;
}
.hljs-number {
color: #40a070;
}
.hljs-string,
.hljs-doctag {
color: #219161;
}
.hljs-selector-id,
.hljs-selector-class,
.hljs-section,
.hljs-type {
color: #19469d;
}
.hljs-params {
color: #00f;
}
.hljs-title {
color: #458;
font-weight: bold;
}
.hljs-tag,
.hljs-name,
.hljs-attribute {
color: #000080;
font-weight: normal;
}
.hljs-variable,
.hljs-template-variable {
color: #008080;
}
.hljs-regexp,
.hljs-link {
color: #b68;
}
.hljs-symbol,
.hljs-bullet {
color: #990073;
}
.hljs-built_in,
.hljs-builtin-name {
color: #0086b3;
}
.hljs-meta {
color: #999;
font-weight: bold;
}
.hljs-deletion {
background: #fdd;
}
.hljs-addition {
background: #dfd;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

View File

@ -0,0 +1,76 @@
/*
Dracula Theme v1.2.0
https://github.com/zenorocha/dracula-theme
Copyright 2015, All rights reserved
Code licensed under the MIT license
http://zenorocha.mit-license.org
@author Éverton Ribeiro <nuxlli@gmail.com>
@author Zeno Rocha <hi@zenorocha.com>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #282a36;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-section,
.hljs-link {
color: #8be9fd;
}
.hljs-function .hljs-keyword {
color: #ff79c6;
}
.hljs,
.hljs-subst {
color: #f8f8f2;
}
.hljs-string,
.hljs-title,
.hljs-name,
.hljs-type,
.hljs-attribute,
.hljs-symbol,
.hljs-bullet,
.hljs-addition,
.hljs-variable,
.hljs-template-tag,
.hljs-template-variable {
color: #f1fa8c;
}
.hljs-comment,
.hljs-quote,
.hljs-deletion,
.hljs-meta {
color: #6272a4;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-title,
.hljs-section,
.hljs-doctag,
.hljs-type,
.hljs-name,
.hljs-strong {
font-weight: bold;
}
.hljs-emphasis {
font-style: italic;
}

View File

@ -0,0 +1,71 @@
/*
FAR Style (c) MajestiC <majestic2k@gmail.com>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #000080;
}
.hljs,
.hljs-subst {
color: #0ff;
}
.hljs-string,
.hljs-attribute,
.hljs-symbol,
.hljs-bullet,
.hljs-built_in,
.hljs-builtin-name,
.hljs-template-tag,
.hljs-template-variable,
.hljs-addition {
color: #ff0;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-section,
.hljs-type,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-variable {
color: #fff;
}
.hljs-comment,
.hljs-quote,
.hljs-doctag,
.hljs-deletion {
color: #888;
}
.hljs-number,
.hljs-regexp,
.hljs-literal,
.hljs-link {
color: #0f0;
}
.hljs-meta {
color: #008080;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-title,
.hljs-section,
.hljs-name,
.hljs-strong {
font-weight: bold;
}
.hljs-emphasis {
font-style: italic;
}

Some files were not shown because too many files have changed in this diff Show More