v1.0.6
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
define('G_APP_NAME', 'Chevereto Free');
|
||||
define('G_APP_VERSION', '1.0.5');
|
||||
define('G_APP_VERSION', '1.0.6');
|
||||
define('G_APP_GITHUB_OWNER', 'Chevereto');
|
||||
define('G_APP_GITHUB_REPO', 'Chevereto-Free');
|
||||
define('G_APP_GITHUB_REPO_URL', 'https://github.com/' . G_APP_GITHUB_OWNER . '/' . G_APP_GITHUB_REPO);
|
||||
54
app/content/languages/cache/cs.po.cache.php
vendored
54
app/content/languages/cache/cs.po.cache.php
vendored
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
$translation_header = array (
|
||||
'Project-Id-Version' => 'VERSION',
|
||||
'POT-Creation-Date' => '2016-10-27 18:49+0000',
|
||||
'PO-Revision-Date' => '2016-10-27 18:49+0000',
|
||||
'POT-Creation-Date' => '2017-01-07 17:18+0000',
|
||||
'PO-Revision-Date' => '2017-01-07 17:18+0000',
|
||||
'Last-Translator' => 'FULL NAME <EMAIL@ADDRESS>',
|
||||
'Language-Team' => 'LANGUAGE TEAM <EMAIL@ADDRESS>',
|
||||
'Language' => 'cs',
|
||||
@@ -249,12 +249,18 @@ $translation_table = [
|
||||
"The release notes for this update are:" => [
|
||||
0 => "Poznámky k verzi této aktualizace:",
|
||||
],
|
||||
"admin dashboard" => [
|
||||
0 => "Nástěnka admina",
|
||||
],
|
||||
"You can apply this update directly from your %a or download it from %s and then manually install it." => [
|
||||
0 => "Tuto aktualizaci můžete nainstalovat automaticky přímo ze svého %a nebo si ji stáhnout z %s a nainstalovat manuálně.",
|
||||
],
|
||||
"Chevereto update available (v%s)" => [
|
||||
0 => "Je k dispozici aktualizace Chevereta (v%s)",
|
||||
],
|
||||
"view on %s" => [
|
||||
0 => "zobrazit na %s",
|
||||
],
|
||||
"We use our own and third party cookies to improve your browsing experience and our services. If you continue using our website is understood that you accept this cookie policy." => [
|
||||
0 => "Používáme vlastní a cookie třetích stran s cílem zlepšit váš komfort při prohlížení a používání našich služeb. Chcete-li pokračovat v používání našich webových stránek, je nutné, že přijmete tuto cookie politiku.",
|
||||
],
|
||||
@@ -378,9 +384,6 @@ $translation_table = [
|
||||
"Support" => [
|
||||
0 => "Podpora",
|
||||
],
|
||||
"Chevereto support" => [
|
||||
0 => "Chevereto podpora",
|
||||
],
|
||||
"Need help? Go to %s and you will get help quickly." => [
|
||||
0 => "Potřebujete pomoc? Navštivte %s a získejte rychle pomoc nebo radu.",
|
||||
],
|
||||
@@ -708,6 +711,9 @@ $translation_table = [
|
||||
"Invalid target attribute" => [
|
||||
0 => "Neplatný cílový atribut",
|
||||
],
|
||||
"Invalid rel attribute" => [
|
||||
0 => "Neplatný rel atribut",
|
||||
],
|
||||
"Invalid icon" => [
|
||||
0 => "Neplatná ikona",
|
||||
],
|
||||
@@ -1296,6 +1302,9 @@ $translation_table = [
|
||||
"None of these words" => [
|
||||
0 => "Žádné z těchto slov",
|
||||
],
|
||||
"Put a minus sign just before words you don't want: -rodent -\"Jack Russell\"" => [
|
||||
0 => "Vložte znaménko mínus před slova, která nechcete povolit: -rodent - \"Jack Russell\"",
|
||||
],
|
||||
"Category" => [
|
||||
0 => "Kategorie",
|
||||
],
|
||||
@@ -1710,6 +1719,9 @@ $translation_table = [
|
||||
"documentation" => [
|
||||
0 => "dokumentace",
|
||||
],
|
||||
"Learn more about %s at our %d." => [
|
||||
0 => "Přečtěte si více o %s na našich stránkách %d.",
|
||||
],
|
||||
"Add category" => [
|
||||
0 => "Přidat kategorii",
|
||||
],
|
||||
@@ -1830,9 +1842,6 @@ $translation_table = [
|
||||
"Only alphanumerics, hyphens and forward slash" => [
|
||||
0 => "Pouze alfanumerické znaky, pomlčky a lomítko",
|
||||
],
|
||||
"Page URL key relative to %s" => [
|
||||
0 => "URL klíč stránky relativní k %s",
|
||||
],
|
||||
"File path" => [
|
||||
0 => "Cesta k souboru",
|
||||
],
|
||||
@@ -1980,9 +1989,15 @@ $translation_table = [
|
||||
"Thumbnails will be fixed to this size." => [
|
||||
0 => "MIniatury budou nastaveny na tuto velikost",
|
||||
],
|
||||
"Medium image fixed dimension" => [
|
||||
0 => "Střední velikost obrázku - pevný rozměr",
|
||||
],
|
||||
"Medium sized images will be fixed to this dimension. For example, if you select \"width\" that dimension will be fixed and image height will be automatically calculated." => [
|
||||
0 => "Střední velikost obrázku bude mít tyto rozměry. Například, pokud zvolíte \"šířku\", tento rozměr bude opraven a výška obrázku bude automaticky vypočítána.",
|
||||
],
|
||||
"Medium image fixed size" => [
|
||||
0 => "Střední velikost obrázku - pevná velikost",
|
||||
],
|
||||
"Width or height will be automatically calculated." => [
|
||||
0 => "Šířka nebo výška bude automaticky vypočítána.",
|
||||
],
|
||||
@@ -2337,6 +2352,12 @@ $translation_table = [
|
||||
"Favicon image. Image must have same width and height." => [
|
||||
0 => "Favicon musí mít stejnou šířku a výšku.",
|
||||
],
|
||||
"Image load max. filesize" => [
|
||||
0 => "Max. velikost obrázku",
|
||||
],
|
||||
"Images greater than this size will show a button to load full resolution image" => [
|
||||
0 => "U obrázků větších, než je tento rozměr, se zobrazí tlačítko pro načtení obrázku v plném rozlišení",
|
||||
],
|
||||
"Enable download button" => [
|
||||
0 => "Aktivovat tlačítko Stáhnout",
|
||||
],
|
||||
@@ -2640,18 +2661,18 @@ $translation_table = [
|
||||
"You need a <a href=\"%s\" target=\"_blank\">reCAPTCHA key</a> for this." => [
|
||||
0 => "Potřebujete <a href=\"%s\" target=\"_blank\">reCAPTCHA klíč</a>.",
|
||||
],
|
||||
"reCAPTCHA public key" => [
|
||||
0 => "reCAPTCHA public key (veřejný klíč)",
|
||||
],
|
||||
"reCAPTCHA private key" => [
|
||||
0 => "reCAPTCHA private key (soukromý klíč)",
|
||||
],
|
||||
"reCAPTCHA threshold" => [
|
||||
0 => "reCAPTCHA threshold (práh)",
|
||||
],
|
||||
"How many failed attempts are needed to ask for reCAPTCHA? Use zero (0) to always show reCAPTCHA." => [
|
||||
0 => "Kolik neúspěšných pokusů je zapotřebí k vyžadování reCAPTCHA? Zadejte nula (0), aby se reCAPTCHA zobrazovala vždy.",
|
||||
],
|
||||
"Comments API" => [
|
||||
0 => "API komentářů",
|
||||
],
|
||||
"Disqus API works with %s." => [
|
||||
0 => "Disqus API pracuje s %s.",
|
||||
],
|
||||
"Comment code" => [
|
||||
0 => "Kód komentáře",
|
||||
],
|
||||
@@ -2701,7 +2722,7 @@ $translation_table = [
|
||||
0 => "Líbí se",
|
||||
],
|
||||
"Added to %a and categorized in %c" => [
|
||||
0 => "Přidáno do %a a zakategorizováno v %c",
|
||||
0 => "Přidáno do alba %a a zařazeno do kategorie %c",
|
||||
],
|
||||
"Added to %s" => [
|
||||
0 => "Přidáno do alba %s",
|
||||
@@ -3030,9 +3051,6 @@ $translation_table = [
|
||||
"Your website is running the latest version of %s" => [
|
||||
0 => "Vaše webové stránky běží nejnovější verzi %s",
|
||||
],
|
||||
"Your website is running the latest version of Chevereto." => [
|
||||
0 => "Vaše stránka běží na aktuální verzi Chevereta.",
|
||||
],
|
||||
"Clipboard image" => [
|
||||
0 => "Kopírovat obrázek do schránky",
|
||||
],
|
||||
|
||||
4
app/content/languages/cache/en.po.cache.php
vendored
4
app/content/languages/cache/en.po.cache.php
vendored
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
$translation_header = array (
|
||||
'Project-Id-Version' => 'Chevereto V3',
|
||||
'POT-Creation-Date' => '2016-10-25 16:52-0300',
|
||||
'PO-Revision-Date' => '2016-10-25 16:52-0300',
|
||||
'POT-Creation-Date' => '2017-01-09 16:00-0300',
|
||||
'PO-Revision-Date' => '2017-01-09 16:00-0300',
|
||||
'Last-Translator' => 'Rodolfo Berríos <inbox@rodolfoberrios.com>',
|
||||
'Language-Team' => '',
|
||||
'Language' => 'e',
|
||||
|
||||
25
app/content/languages/cache/es.po.cache.php
vendored
25
app/content/languages/cache/es.po.cache.php
vendored
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
$translation_header = array (
|
||||
'Project-Id-Version' => 'VERSION',
|
||||
'POT-Creation-Date' => '2016-10-25 22:28+0000',
|
||||
'PO-Revision-Date' => '2016-10-25 22:28+0000',
|
||||
'POT-Creation-Date' => '2017-01-10 20:49+0000',
|
||||
'PO-Revision-Date' => '2017-01-10 20:49+0000',
|
||||
'Last-Translator' => 'FULL NAME <EMAIL@ADDRESS>',
|
||||
'Language-Team' => 'LANGUAGE TEAM <EMAIL@ADDRESS>',
|
||||
'Language' => 'es',
|
||||
@@ -18,6 +18,9 @@ $translation_plural = array (
|
||||
'function' => '$index = (int)(($n != 1)); return ($index < 2) ? $index : 2 - 1;',
|
||||
);
|
||||
$translation_table = [
|
||||
"Images greater than this size will show a button to load full resolution image." => [
|
||||
0 => "Imágenes de tamaño superior a este mostrarán un botón para cargar la imagen a resolución completa.",
|
||||
],
|
||||
"Invalid email" => [
|
||||
0 => "Email inválido",
|
||||
],
|
||||
@@ -364,9 +367,6 @@ $translation_table = [
|
||||
"Support" => [
|
||||
0 => "Soporte",
|
||||
],
|
||||
"Chevereto support" => [
|
||||
0 => "soporte de Chevereto",
|
||||
],
|
||||
"Need help? Go to %s and you will get help quickly." => [
|
||||
0 => "¿Necesitas ayuda? Ve a %s y obtendrás ayuda rápidamente.",
|
||||
],
|
||||
@@ -1887,9 +1887,6 @@ $translation_table = [
|
||||
"Only alphanumerics, hyphens and forward slash" => [
|
||||
0 => "Solo alfanuméricos, guiones y barra inclinada",
|
||||
],
|
||||
"Page URL key relative to %s" => [
|
||||
0 => "Llave URL de página relativa a %s",
|
||||
],
|
||||
"File path" => [
|
||||
0 => "Ruta de archivo",
|
||||
],
|
||||
@@ -2415,6 +2412,9 @@ $translation_table = [
|
||||
"Favicon image. Image must have same width and height." => [
|
||||
0 => "Imagen favicon. La imagen debe tener el mismo alto y ancho.",
|
||||
],
|
||||
"Image load max. filesize" => [
|
||||
0 => "Tamaño máx. de carga",
|
||||
],
|
||||
"Enable download button" => [
|
||||
0 => "Habilitar botón de descarga",
|
||||
],
|
||||
@@ -2763,12 +2763,6 @@ $translation_table = [
|
||||
"%s secret key" => [
|
||||
0 => "Llave secreta %s",
|
||||
],
|
||||
"reCAPTCHA public key" => [
|
||||
0 => "Llave pública de reCAPTCHA",
|
||||
],
|
||||
"reCAPTCHA private key" => [
|
||||
0 => "Llave privada de reCAPTCHA",
|
||||
],
|
||||
"reCAPTCHA threshold" => [
|
||||
0 => "Umbral reCAPTCHA",
|
||||
],
|
||||
@@ -3163,9 +3157,6 @@ $translation_table = [
|
||||
"Your website is running the latest version of %s" => [
|
||||
0 => "Tu sitio está corriendo la última version de %s",
|
||||
],
|
||||
"Your website is running the latest version of Chevereto." => [
|
||||
0 => "Tu sitio está corriendo la última versión de Chevereto.",
|
||||
],
|
||||
"Clipboard image" => [
|
||||
0 => "Imagen portapales",
|
||||
],
|
||||
|
||||
22
app/content/languages/cache/fr.po.cache.php
vendored
22
app/content/languages/cache/fr.po.cache.php
vendored
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
$translation_header = array (
|
||||
'Project-Id-Version' => 'VERSION',
|
||||
'POT-Creation-Date' => '2016-10-26 06:19+0000',
|
||||
'PO-Revision-Date' => '2016-10-26 06:19+0000',
|
||||
'POT-Creation-Date' => '2017-01-10 20:48+0000',
|
||||
'PO-Revision-Date' => '2017-01-10 20:48+0000',
|
||||
'Last-Translator' => 'FULL NAME <EMAIL@ADDRESS>',
|
||||
'Language-Team' => 'LANGUAGE TEAM <EMAIL@ADDRESS>',
|
||||
'Language' => 'fr',
|
||||
@@ -18,6 +18,9 @@ $translation_plural = array (
|
||||
'function' => '$index = (int)(($n > 1)); return ($index < 2) ? $index : 2 - 1;',
|
||||
);
|
||||
$translation_table = [
|
||||
"Images greater than this size will show a button to load full resolution image." => [
|
||||
0 => "Les images supérieures à cette taille afficheront un bouton pour charger l'image en pleine résolution.",
|
||||
],
|
||||
"Invalid email" => [
|
||||
0 => "Adresse email incorrecte",
|
||||
],
|
||||
@@ -364,9 +367,6 @@ $translation_table = [
|
||||
"Support" => [
|
||||
0 => "Support",
|
||||
],
|
||||
"Chevereto support" => [
|
||||
0 => "Support Chevereto",
|
||||
],
|
||||
"Need help? Go to %s and you will get help quickly." => [
|
||||
0 => "Besoin d'aide ? Rendez-vous sur le %s !",
|
||||
],
|
||||
@@ -1887,9 +1887,6 @@ $translation_table = [
|
||||
"Only alphanumerics, hyphens and forward slash" => [
|
||||
0 => "Seuls les caractères alphanumériques, traits d'union et barre oblique",
|
||||
],
|
||||
"Page URL key relative to %s" => [
|
||||
0 => "Clé URL de la page relative à %s",
|
||||
],
|
||||
"File path" => [
|
||||
0 => "Chemin de fichier",
|
||||
],
|
||||
@@ -2763,12 +2760,6 @@ $translation_table = [
|
||||
"%s secret key" => [
|
||||
0 => "Clé secrète %s",
|
||||
],
|
||||
"reCAPTCHA public key" => [
|
||||
0 => "Clé publique reCAPTCHA",
|
||||
],
|
||||
"reCAPTCHA private key" => [
|
||||
0 => "Clé privée reCAPTCHA",
|
||||
],
|
||||
"reCAPTCHA threshold" => [
|
||||
0 => "Seuil reCAPTCHA",
|
||||
],
|
||||
@@ -3163,9 +3154,6 @@ $translation_table = [
|
||||
"Your website is running the latest version of %s" => [
|
||||
0 => "Votre site web est en cours d'exécution sur la dernière version de %s",
|
||||
],
|
||||
"Your website is running the latest version of Chevereto." => [
|
||||
0 => "Votre site web dispose de la dernière version de Chevereto.",
|
||||
],
|
||||
"Clipboard image" => [
|
||||
0 => "Image de presse-papiers",
|
||||
],
|
||||
|
||||
879
app/content/languages/cache/id.po.cache.php
vendored
879
app/content/languages/cache/id.po.cache.php
vendored
File diff suppressed because it is too large
Load Diff
25
app/content/languages/cache/ja.po.cache.php
vendored
25
app/content/languages/cache/ja.po.cache.php
vendored
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
$translation_header = array (
|
||||
'Project-Id-Version' => 'VERSION',
|
||||
'POT-Creation-Date' => '2016-10-27 18:49+0000',
|
||||
'PO-Revision-Date' => '2016-10-27 18:49+0000',
|
||||
'POT-Creation-Date' => '2017-01-10 20:48+0000',
|
||||
'PO-Revision-Date' => '2017-01-10 20:48+0000',
|
||||
'Last-Translator' => 'FULL NAME <EMAIL@ADDRESS>',
|
||||
'Language-Team' => 'LANGUAGE TEAM <EMAIL@ADDRESS>',
|
||||
'Language' => 'ja',
|
||||
@@ -18,6 +18,9 @@ $translation_plural = array (
|
||||
'function' => '$index = (int)(0); return ($index < 1) ? $index : 1 - 1;',
|
||||
);
|
||||
$translation_table = [
|
||||
"Images greater than this size will show a button to load full resolution image." => [
|
||||
0 => "このファイルサイズを超えたものは、オリジナル画像表示用のボタンが表示されます。",
|
||||
],
|
||||
"Invalid email" => [
|
||||
0 => "有効なメールアドレスではありません。",
|
||||
],
|
||||
@@ -354,9 +357,6 @@ $translation_table = [
|
||||
"Support" => [
|
||||
0 => "サポート",
|
||||
],
|
||||
"Chevereto support" => [
|
||||
0 => "Cheveretoサポート",
|
||||
],
|
||||
"Need help? Go to %s and you will get help quickly." => [
|
||||
0 => "ヘルプが必要な方は、 %s まで。",
|
||||
],
|
||||
@@ -1872,9 +1872,6 @@ $translation_table = [
|
||||
"Only alphanumerics, hyphens and forward slash" => [
|
||||
0 => "半角英数字、ハイフンとスラッシュのみ",
|
||||
],
|
||||
"Page URL key relative to %s" => [
|
||||
0 => "ページURLは相対です %s。",
|
||||
],
|
||||
"File path" => [
|
||||
0 => "ファイルパス",
|
||||
],
|
||||
@@ -2400,6 +2397,9 @@ $translation_table = [
|
||||
"Favicon image. Image must have same width and height." => [
|
||||
0 => "faviconは高さと幅が同じでないといけません。",
|
||||
],
|
||||
"Image load max. filesize" => [
|
||||
0 => "画像の最大ファイルサイズ",
|
||||
],
|
||||
"Enable download button" => [
|
||||
0 => "ダウンロードボタンを有効にする",
|
||||
],
|
||||
@@ -2748,12 +2748,6 @@ $translation_table = [
|
||||
"%s secret key" => [
|
||||
0 => "%s シークレットキー",
|
||||
],
|
||||
"reCAPTCHA public key" => [
|
||||
0 => "reCAPTCHAの公開鍵(public key)を入力",
|
||||
],
|
||||
"reCAPTCHA private key" => [
|
||||
0 => "reCAPTCHAの秘密鍵(private key)を入力",
|
||||
],
|
||||
"reCAPTCHA threshold" => [
|
||||
0 => "閾値(失敗)",
|
||||
],
|
||||
@@ -3147,9 +3141,6 @@ $translation_table = [
|
||||
"Your website is running the latest version of %s" => [
|
||||
0 => "あなたのサイトは、バージョン:%sで最新版です。",
|
||||
],
|
||||
"Your website is running the latest version of Chevereto." => [
|
||||
0 => "あなたのウェブサイトは、Cheveretoの最新版で動作しています。",
|
||||
],
|
||||
"Clipboard image" => [
|
||||
0 => "クリップボードの画像",
|
||||
],
|
||||
|
||||
31
app/content/languages/cache/nb.po.cache.php
vendored
31
app/content/languages/cache/nb.po.cache.php
vendored
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
$translation_header = array (
|
||||
'Project-Id-Version' => 'VERSION',
|
||||
'POT-Creation-Date' => '2016-11-01 14:37+0000',
|
||||
'PO-Revision-Date' => '2016-11-01 14:37+0000',
|
||||
'POT-Creation-Date' => '2017-01-07 17:18+0000',
|
||||
'PO-Revision-Date' => '2017-01-07 17:18+0000',
|
||||
'Last-Translator' => 'FULL NAME <EMAIL@ADDRESS>',
|
||||
'Language-Team' => 'LANGUAGE TEAM <EMAIL@ADDRESS>',
|
||||
'Language' => 'nb',
|
||||
@@ -350,7 +350,7 @@ $translation_table = [
|
||||
0 => "Brukere",
|
||||
],
|
||||
"Settings" => [
|
||||
0 => "Min konto",
|
||||
0 => "Innstillinger",
|
||||
],
|
||||
"Chevereto version" => [
|
||||
0 => "Chevereto versjon",
|
||||
@@ -362,10 +362,7 @@ $translation_table = [
|
||||
0 => "se etter oppdateringer",
|
||||
],
|
||||
"Support" => [
|
||||
0 => "Støtte",
|
||||
],
|
||||
"Chevereto support" => [
|
||||
0 => "Chevereto støtte",
|
||||
0 => "Support",
|
||||
],
|
||||
"Need help? Go to %s and you will get help quickly." => [
|
||||
0 => "Trenger du hjelp? Gå til %s for å få rask hjelp.",
|
||||
@@ -450,10 +447,10 @@ $translation_table = [
|
||||
0 => "Samtykke skjema",
|
||||
],
|
||||
"Flood protection" => [
|
||||
0 => "Flombeskyttelse (autoposting)",
|
||||
0 => "Spambeskyttelse",
|
||||
],
|
||||
"Theme" => [
|
||||
0 => "Design",
|
||||
0 => "Utseende",
|
||||
],
|
||||
"Homepage" => [
|
||||
0 => "Hjemmeside",
|
||||
@@ -465,7 +462,7 @@ $translation_table = [
|
||||
0 => "System",
|
||||
],
|
||||
"Routing" => [
|
||||
0 => "Rute sti",
|
||||
0 => "Ruting",
|
||||
],
|
||||
"Languages" => [
|
||||
0 => "Språk",
|
||||
@@ -1887,9 +1884,6 @@ $translation_table = [
|
||||
"Only alphanumerics, hyphens and forward slash" => [
|
||||
0 => "Bare alfanumeriske tegn, bindestrek og skråstrek",
|
||||
],
|
||||
"Page URL key relative to %s" => [
|
||||
0 => "Side URL nøkkel i forhold til %s",
|
||||
],
|
||||
"File path" => [
|
||||
0 => "Filsti",
|
||||
],
|
||||
@@ -2191,7 +2185,7 @@ $translation_table = [
|
||||
0 => "La denne være blank dersom det ikke er noen aldersbegrensning for å benytte siden.",
|
||||
],
|
||||
"Username routing" => [
|
||||
0 => "Brukernavn føring",
|
||||
0 => "Brukernavn ruting",
|
||||
],
|
||||
"Enable this if you want to use %s/username URLs instead of %s/user/username." => [
|
||||
0 => "Aktiver denne hvis du vil benytte %s/brukernavn URL istedenfor %s/bruker/brukernavn.",
|
||||
@@ -2763,12 +2757,6 @@ $translation_table = [
|
||||
"%s secret key" => [
|
||||
0 => "%s hemmelig nøkkel",
|
||||
],
|
||||
"reCAPTCHA public key" => [
|
||||
0 => "reCAPTCHA offentlig nøkkel",
|
||||
],
|
||||
"reCAPTCHA private key" => [
|
||||
0 => "reCAPTCHA privat nøkkel",
|
||||
],
|
||||
"reCAPTCHA threshold" => [
|
||||
0 => "reCAPTCHA terskel",
|
||||
],
|
||||
@@ -3163,9 +3151,6 @@ $translation_table = [
|
||||
"Your website is running the latest version of %s" => [
|
||||
0 => "Din nettside kjører siste versjon av %s",
|
||||
],
|
||||
"Your website is running the latest version of Chevereto." => [
|
||||
0 => "Websiden din kjører siste versjon av Chevereto.",
|
||||
],
|
||||
"Clipboard image" => [
|
||||
0 => "Utklippstavle bilde",
|
||||
],
|
||||
|
||||
596
app/content/languages/cache/nl.po.cache.php
vendored
596
app/content/languages/cache/nl.po.cache.php
vendored
File diff suppressed because it is too large
Load Diff
31
app/content/languages/cache/ru.po.cache.php
vendored
31
app/content/languages/cache/ru.po.cache.php
vendored
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
$translation_header = array (
|
||||
'Project-Id-Version' => 'VERSION',
|
||||
'POT-Creation-Date' => '2016-11-01 14:37+0000',
|
||||
'PO-Revision-Date' => '2016-11-01 14:37+0000',
|
||||
'POT-Creation-Date' => '2017-01-10 20:48+0000',
|
||||
'PO-Revision-Date' => '2017-01-10 20:48+0000',
|
||||
'Last-Translator' => 'FULL NAME <EMAIL@ADDRESS>',
|
||||
'Language-Team' => 'LANGUAGE TEAM <EMAIL@ADDRESS>',
|
||||
'Language' => 'ru',
|
||||
@@ -18,6 +18,9 @@ $translation_plural = array (
|
||||
'function' => '$index = (int)(($n%10==1 && $n%100!=11 ? (0) : ($n%10>=2 && $n%10<=4 && ($n%100<10 || $n%100>=20) ? (1) : (2)))); return ($index < 3) ? $index : 3 - 1;',
|
||||
);
|
||||
$translation_table = [
|
||||
"Images greater than this size will show a button to load full resolution image." => [
|
||||
0 => "При просмотре изображений большего размера, будет отображаться кнопка загрузки полной версии.",
|
||||
],
|
||||
"Invalid email" => [
|
||||
0 => "Неверный e-mail адрес",
|
||||
],
|
||||
@@ -61,7 +64,7 @@ $translation_table = [
|
||||
0 => "В процессе выполнения произошла ошибка. Пожалуйста попробуйте позже.",
|
||||
],
|
||||
"Missing %s file" => [
|
||||
0 => "Не хватает файла %s",
|
||||
0 => "Отсутствует файл %s",
|
||||
],
|
||||
"Invalid license info" => [
|
||||
0 => "Неверные данные лицензии",
|
||||
@@ -374,9 +377,6 @@ $translation_table = [
|
||||
"Support" => [
|
||||
0 => "Поддержка",
|
||||
],
|
||||
"Chevereto support" => [
|
||||
0 => "службу поддержки Chevereto",
|
||||
],
|
||||
"Need help? Go to %s and you will get help quickly." => [
|
||||
0 => "Нужна помощь? Посетите %s и мы быстро поможем вам.",
|
||||
],
|
||||
@@ -431,7 +431,7 @@ $translation_table = [
|
||||
0 => "Список изменений",
|
||||
],
|
||||
"Request new features" => [
|
||||
0 => "Запрос на новые функции",
|
||||
0 => "Предложить новый функционал",
|
||||
],
|
||||
"Bug tracking" => [
|
||||
0 => "Баг трекер",
|
||||
@@ -1902,9 +1902,6 @@ $translation_table = [
|
||||
"Only alphanumerics, hyphens and forward slash" => [
|
||||
0 => "Только цифры, латинские буквы, дефис и нижнее подчеркивание",
|
||||
],
|
||||
"Page URL key relative to %s" => [
|
||||
0 => "URL-ключ страницы относительно %s",
|
||||
],
|
||||
"File path" => [
|
||||
0 => "Путь к файлу",
|
||||
],
|
||||
@@ -2430,6 +2427,9 @@ $translation_table = [
|
||||
"Favicon image. Image must have same width and height." => [
|
||||
0 => "Иконка вашего сайта. Ширина и высота данного изображения должны быть одинаковы.",
|
||||
],
|
||||
"Image load max. filesize" => [
|
||||
0 => "Макс. размер файла в просмотре",
|
||||
],
|
||||
"Enable download button" => [
|
||||
0 => "Включить кнопку загрузки",
|
||||
],
|
||||
@@ -2572,7 +2572,7 @@ $translation_table = [
|
||||
0 => "Автоматическая проверка обновлений",
|
||||
],
|
||||
"When enabled the system will automatically check for new updates." => [
|
||||
0 => "Если включить данную настройку то система будет автоматически проверять обновления",
|
||||
0 => "Если включить данную настройку, то система будет автоматически проверять обновления",
|
||||
],
|
||||
"Display available updates notification" => [
|
||||
0 => "Показывать уведомление об обновлении",
|
||||
@@ -2778,12 +2778,6 @@ $translation_table = [
|
||||
"%s secret key" => [
|
||||
0 => "%s секретный ключ",
|
||||
],
|
||||
"reCAPTCHA public key" => [
|
||||
0 => "Публичный ключ reCAPTCHA",
|
||||
],
|
||||
"reCAPTCHA private key" => [
|
||||
0 => "Закрытый ключ reCAPTCHA",
|
||||
],
|
||||
"reCAPTCHA threshold" => [
|
||||
0 => "Порог срабатывания reCAPTCHA",
|
||||
],
|
||||
@@ -3179,9 +3173,6 @@ $translation_table = [
|
||||
"Your website is running the latest version of %s" => [
|
||||
0 => "Вы используете последнюю версию Chevereto - %s",
|
||||
],
|
||||
"Your website is running the latest version of Chevereto." => [
|
||||
0 => "Вы используете последнюю версию Chevereto.",
|
||||
],
|
||||
"Clipboard image" => [
|
||||
0 => "Изображение из буфера обмена",
|
||||
],
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: VERSION\n"
|
||||
"POT-Creation-Date: 2016-10-27 18:49+0000\n"
|
||||
"PO-Revision-Date: 2016-10-27 18:49+0000\n"
|
||||
"POT-Creation-Date: 2017-01-07 17:18+0000\n"
|
||||
"PO-Revision-Date: 2017-01-07 17:18+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE TEAM <EMAIL@ADDRESS>\n"
|
||||
"Language: cs\n"
|
||||
@@ -363,12 +363,18 @@ msgstr "Je zde dostupná aktualizace pro vaši Chevereto webovou stránku."
|
||||
msgid "The release notes for this update are:"
|
||||
msgstr "Poznámky k verzi této aktualizace:"
|
||||
|
||||
msgid "admin dashboard"
|
||||
msgstr "Nástěnka admina"
|
||||
|
||||
msgid "You can apply this update directly from your %a or download it from %s and then manually install it."
|
||||
msgstr "Tuto aktualizaci můžete nainstalovat automaticky přímo ze svého %a nebo si ji stáhnout z %s a nainstalovat manuálně."
|
||||
|
||||
msgid "Chevereto update available (v%s)"
|
||||
msgstr "Je k dispozici aktualizace Chevereta (v%s)"
|
||||
|
||||
msgid "view on %s"
|
||||
msgstr "zobrazit na %s"
|
||||
|
||||
#: ../../../app/lib/functions.render.php:303
|
||||
msgid "We use our own and third party cookies to improve your browsing experience and our services. If you continue using our website is understood that you accept this cookie policy."
|
||||
msgstr "Používáme vlastní a cookie třetích stran s cílem zlepšit váš komfort při prohlížení a používání našich služeb. Chcete-li pokračovat v používání našich webových stránek, je nutné, že přijmete tuto cookie politiku."
|
||||
@@ -618,9 +624,6 @@ msgstr "Zkontrolovat aktualizace"
|
||||
msgid "Support"
|
||||
msgstr "Podpora"
|
||||
|
||||
msgid "Chevereto support"
|
||||
msgstr "Chevereto podpora"
|
||||
|
||||
msgid "Need help? Go to %s and you will get help quickly."
|
||||
msgstr "Potřebujete pomoc? Navštivte %s a získejte rychle pomoc nebo radu."
|
||||
|
||||
@@ -1145,6 +1148,10 @@ msgstr "Neplatná viditelnost"
|
||||
msgid "Invalid target attribute"
|
||||
msgstr "Neplatný cílový atribut"
|
||||
|
||||
#: ../../../app/routes/route.dashboard.php:733
|
||||
msgid "Invalid rel attribute"
|
||||
msgstr "Neplatný rel atribut"
|
||||
|
||||
#: ../../../app/routes/route.dashboard.php:738
|
||||
msgid "Invalid icon"
|
||||
msgstr "Neplatná ikona"
|
||||
@@ -2118,6 +2125,10 @@ msgstr "Zadejte přesná slova v uvozovkách: \"rat terrier\""
|
||||
msgid "None of these words"
|
||||
msgstr "Žádné z těchto slov"
|
||||
|
||||
#: ../../../app/themes/Peafowl/snippets/form_advanced_search.php:21
|
||||
msgid "Put a minus sign just before words you don't want: -rodent -\"Jack Russell\""
|
||||
msgstr "Vložte znaménko mínus před slova, která nechcete povolit: -rodent - \"Jack Russell\""
|
||||
|
||||
#: ../../../app/themes/Peafowl/snippets/form_advanced_search.php:41
|
||||
#: ../../../app/themes/Peafowl/snippets/form_category.php:3
|
||||
msgid "Category"
|
||||
@@ -2753,6 +2764,9 @@ msgstr "Toto nastavení je vždy zakázáno při použití režimu osobní webov
|
||||
msgid "documentation"
|
||||
msgstr "dokumentace"
|
||||
|
||||
msgid "Learn more about %s at our %d."
|
||||
msgstr "Přečtěte si více o %s na našich stránkách %d."
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:152
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:156
|
||||
msgid "Add category"
|
||||
@@ -2919,11 +2933,6 @@ msgstr "Skryté stránky se nebudou zobrazovat v systémových nabídkách, ale
|
||||
msgid "Only alphanumerics, hyphens and forward slash"
|
||||
msgstr "Pouze alfanumerické znaky, pomlčky a lomítko"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:489
|
||||
#, php-format
|
||||
msgid "Page URL key relative to %s"
|
||||
msgstr "URL klíč stránky relativní k %s"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:493
|
||||
msgid "File path"
|
||||
msgstr "Cesta k souboru"
|
||||
@@ -3128,9 +3137,15 @@ msgstr "Velikost miniatury"
|
||||
msgid "Thumbnails will be fixed to this size."
|
||||
msgstr "MIniatury budou nastaveny na tuto velikost"
|
||||
|
||||
msgid "Medium image fixed dimension"
|
||||
msgstr "Střední velikost obrázku - pevný rozměr"
|
||||
|
||||
msgid "Medium sized images will be fixed to this dimension. For example, if you select \"width\" that dimension will be fixed and image height will be automatically calculated."
|
||||
msgstr "Střední velikost obrázku bude mít tyto rozměry. Například, pokud zvolíte \"šířku\", tento rozměr bude opraven a výška obrázku bude automaticky vypočítána."
|
||||
|
||||
msgid "Medium image fixed size"
|
||||
msgstr "Střední velikost obrázku - pevná velikost"
|
||||
|
||||
msgid "Width or height will be automatically calculated."
|
||||
msgstr "Šířka nebo výška bude automaticky vypočítána."
|
||||
|
||||
@@ -3614,6 +3629,12 @@ msgstr "Favicon (ikonka webu)"
|
||||
msgid "Favicon image. Image must have same width and height."
|
||||
msgstr "Favicon musí mít stejnou šířku a výšku."
|
||||
|
||||
msgid "Image load max. filesize"
|
||||
msgstr "Max. velikost obrázku"
|
||||
|
||||
msgid "Images greater than this size will show a button to load full resolution image"
|
||||
msgstr "U obrázků větších, než je tento rozměr, se zobrazí tlačítko pro načtení obrázku v plném rozlišení"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1299
|
||||
msgid "Enable download button"
|
||||
msgstr "Aktivovat tlačítko Stáhnout"
|
||||
@@ -4015,14 +4036,6 @@ msgstr "VK client secret"
|
||||
msgid "You need a <a href=\"%s\" target=\"_blank\">reCAPTCHA key</a> for this."
|
||||
msgstr "Potřebujete <a href=\"%s\" target=\"_blank\">reCAPTCHA klíč</a>."
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1974
|
||||
msgid "reCAPTCHA public key"
|
||||
msgstr "reCAPTCHA public key (veřejný klíč)"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1979
|
||||
msgid "reCAPTCHA private key"
|
||||
msgstr "reCAPTCHA private key (soukromý klíč)"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1986
|
||||
msgid "reCAPTCHA threshold"
|
||||
msgstr "reCAPTCHA threshold (práh)"
|
||||
@@ -4031,6 +4044,12 @@ msgstr "reCAPTCHA threshold (práh)"
|
||||
msgid "How many failed attempts are needed to ask for reCAPTCHA? Use zero (0) to always show reCAPTCHA."
|
||||
msgstr "Kolik neúspěšných pokusů je zapotřebí k vyžadování reCAPTCHA? Zadejte nula (0), aby se reCAPTCHA zobrazovala vždy."
|
||||
|
||||
msgid "Comments API"
|
||||
msgstr "API komentářů"
|
||||
|
||||
msgid "Disqus API works with %s."
|
||||
msgstr "Disqus API pracuje s %s."
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1997
|
||||
msgid "Comment code"
|
||||
msgstr "Kód komentáře"
|
||||
@@ -4101,7 +4120,7 @@ msgstr "Líbí se"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/image.php:136
|
||||
msgid "Added to %a and categorized in %c"
|
||||
msgstr "Přidáno do %a a zakategorizováno v %c"
|
||||
msgstr "Přidáno do alba %a a zařazeno do kategorie %c"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/image.php:138
|
||||
#, php-format
|
||||
@@ -4569,10 +4588,6 @@ msgstr "Aktualizovat nyní"
|
||||
msgid "Your website is running the latest version of %s"
|
||||
msgstr "Vaše webové stránky běží nejnovější verzi %s"
|
||||
|
||||
#: ../../../app/lib/chevereto.js:1552 ../../../app/lib/chevereto.min.js:71
|
||||
msgid "Your website is running the latest version of Chevereto."
|
||||
msgstr "Vaše stránka běží na aktuální verzi Chevereta."
|
||||
|
||||
#: ../../../app/lib/chevereto.js:2112 ../../../app/lib/chevereto.min.js:101
|
||||
msgid "Clipboard image"
|
||||
msgstr "Kopírovat obrázek do schránky"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: VERSION\n"
|
||||
"POT-Creation-Date: 2016-10-25 22:28+0000\n"
|
||||
"PO-Revision-Date: 2016-10-25 22:28+0000\n"
|
||||
"POT-Creation-Date: 2017-01-10 20:49+0000\n"
|
||||
"PO-Revision-Date: 2017-01-10 20:49+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE TEAM <EMAIL@ADDRESS>\n"
|
||||
"Language: es\n"
|
||||
@@ -11,6 +11,9 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
msgid "Images greater than this size will show a button to load full resolution image."
|
||||
msgstr "Imágenes de tamaño superior a este mostrarán un botón para cargar la imagen a resolución completa."
|
||||
|
||||
#: ../../../app/install/installer.php:1168
|
||||
#: ../../../app/install/installer.php:1177
|
||||
#: ../../../app/install/installer.php:1180
|
||||
@@ -604,9 +607,6 @@ msgstr "comprobar actualizaciones"
|
||||
msgid "Support"
|
||||
msgstr "Soporte"
|
||||
|
||||
msgid "Chevereto support"
|
||||
msgstr "soporte de Chevereto"
|
||||
|
||||
msgid "Need help? Go to %s and you will get help quickly."
|
||||
msgstr "¿Necesitas ayuda? Ve a %s y obtendrás ayuda rápidamente."
|
||||
|
||||
@@ -3001,11 +3001,6 @@ msgstr "Las páginas ocultas no se mostraran en menús del sistema, pero cualqui
|
||||
msgid "Only alphanumerics, hyphens and forward slash"
|
||||
msgstr "Solo alfanuméricos, guiones y barra inclinada"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:489
|
||||
#, php-format
|
||||
msgid "Page URL key relative to %s"
|
||||
msgstr "Llave URL de página relativa a %s"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:493
|
||||
msgid "File path"
|
||||
msgstr "Ruta de archivo"
|
||||
@@ -3720,6 +3715,9 @@ msgstr "Imagen favicon"
|
||||
msgid "Favicon image. Image must have same width and height."
|
||||
msgstr "Imagen favicon. La imagen debe tener el mismo alto y ancho."
|
||||
|
||||
msgid "Image load max. filesize"
|
||||
msgstr "Tamaño máx. de carga"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1299
|
||||
msgid "Enable download button"
|
||||
msgstr "Habilitar botón de descarga"
|
||||
@@ -4178,14 +4176,6 @@ msgstr "Llave de sitio %s"
|
||||
msgid "%s secret key"
|
||||
msgstr "Llave secreta %s"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1974
|
||||
msgid "reCAPTCHA public key"
|
||||
msgstr "Llave pública de reCAPTCHA"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1979
|
||||
msgid "reCAPTCHA private key"
|
||||
msgstr "Llave privada de reCAPTCHA"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1986
|
||||
msgid "reCAPTCHA threshold"
|
||||
msgstr "Umbral reCAPTCHA"
|
||||
@@ -4742,10 +4732,6 @@ msgstr "Actualizar ahora"
|
||||
msgid "Your website is running the latest version of %s"
|
||||
msgstr "Tu sitio está corriendo la última version de %s"
|
||||
|
||||
#: ../../../app/lib/chevereto.js:1552 ../../../app/lib/chevereto.min.js:71
|
||||
msgid "Your website is running the latest version of Chevereto."
|
||||
msgstr "Tu sitio está corriendo la última versión de Chevereto."
|
||||
|
||||
#: ../../../app/lib/chevereto.js:2112 ../../../app/lib/chevereto.min.js:101
|
||||
msgid "Clipboard image"
|
||||
msgstr "Imagen portapales"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: VERSION\n"
|
||||
"POT-Creation-Date: 2016-10-26 06:19+0000\n"
|
||||
"PO-Revision-Date: 2016-10-26 06:19+0000\n"
|
||||
"POT-Creation-Date: 2017-01-10 20:48+0000\n"
|
||||
"PO-Revision-Date: 2017-01-10 20:48+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE TEAM <EMAIL@ADDRESS>\n"
|
||||
"Language: fr\n"
|
||||
@@ -11,6 +11,9 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
|
||||
msgid "Images greater than this size will show a button to load full resolution image."
|
||||
msgstr "Les images supérieures à cette taille afficheront un bouton pour charger l'image en pleine résolution."
|
||||
|
||||
#: ../../../app/install/installer.php:1168
|
||||
#: ../../../app/install/installer.php:1177
|
||||
#: ../../../app/install/installer.php:1180
|
||||
@@ -604,9 +607,6 @@ msgstr "rechercher les mises à jour"
|
||||
msgid "Support"
|
||||
msgstr "Support"
|
||||
|
||||
msgid "Chevereto support"
|
||||
msgstr "Support Chevereto"
|
||||
|
||||
msgid "Need help? Go to %s and you will get help quickly."
|
||||
msgstr "Besoin d'aide ? Rendez-vous sur le %s !"
|
||||
|
||||
@@ -3001,11 +3001,6 @@ msgstr "Les pages cachées ne s'afficheront pas dans les menus système, mais to
|
||||
msgid "Only alphanumerics, hyphens and forward slash"
|
||||
msgstr "Seuls les caractères alphanumériques, traits d'union et barre oblique"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:489
|
||||
#, php-format
|
||||
msgid "Page URL key relative to %s"
|
||||
msgstr "Clé URL de la page relative à %s"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:493
|
||||
msgid "File path"
|
||||
msgstr "Chemin de fichier"
|
||||
@@ -4178,14 +4173,6 @@ msgstr "Clé du site %s"
|
||||
msgid "%s secret key"
|
||||
msgstr "Clé secrète %s"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1974
|
||||
msgid "reCAPTCHA public key"
|
||||
msgstr "Clé publique reCAPTCHA"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1979
|
||||
msgid "reCAPTCHA private key"
|
||||
msgstr "Clé privée reCAPTCHA"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1986
|
||||
msgid "reCAPTCHA threshold"
|
||||
msgstr "Seuil reCAPTCHA"
|
||||
@@ -4742,10 +4729,6 @@ msgstr "Mettre à jour maintenant"
|
||||
msgid "Your website is running the latest version of %s"
|
||||
msgstr "Votre site web est en cours d'exécution sur la dernière version de %s"
|
||||
|
||||
#: ../../../app/lib/chevereto.js:1552 ../../../app/lib/chevereto.min.js:71
|
||||
msgid "Your website is running the latest version of Chevereto."
|
||||
msgstr "Votre site web dispose de la dernière version de Chevereto."
|
||||
|
||||
#: ../../../app/lib/chevereto.js:2112 ../../../app/lib/chevereto.min.js:101
|
||||
msgid "Clipboard image"
|
||||
msgstr "Image de presse-papiers"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: VERSION\n"
|
||||
"POT-Creation-Date: 2016-10-27 18:49+0000\n"
|
||||
"PO-Revision-Date: 2016-10-27 18:49+0000\n"
|
||||
"POT-Creation-Date: 2017-01-10 20:48+0000\n"
|
||||
"PO-Revision-Date: 2017-01-10 20:48+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE TEAM <EMAIL@ADDRESS>\n"
|
||||
"Language: it\n"
|
||||
@@ -11,6 +11,9 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
msgid "Images greater than this size will show a button to load full resolution image."
|
||||
msgstr "Immagini maggiore di questa dimensione mostreranno un pulsante per caricare l'immagine alla massima risoluzione."
|
||||
|
||||
#: ../../../app/install/installer.php:1168
|
||||
#: ../../../app/install/installer.php:1177
|
||||
#: ../../../app/install/installer.php:1180
|
||||
@@ -604,9 +607,6 @@ msgstr "controlla gli aggiornamenti"
|
||||
msgid "Support"
|
||||
msgstr "Supporto"
|
||||
|
||||
msgid "Chevereto support"
|
||||
msgstr "Supporto Chevereto"
|
||||
|
||||
msgid "Need help? Go to %s and you will get help quickly."
|
||||
msgstr "Hai bisogno di aiuto? Vai a %s e si otterrà un aiuto rapido."
|
||||
|
||||
@@ -3001,11 +3001,6 @@ msgstr "Pagine nascoste non verranno mostrati in menu di sistema, ma chiunque pu
|
||||
msgid "Only alphanumerics, hyphens and forward slash"
|
||||
msgstr "Solo alfanumerici, trattini e barra"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:489
|
||||
#, php-format
|
||||
msgid "Page URL key relative to %s"
|
||||
msgstr "URL della pagina tasto relativo a %s"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:493
|
||||
msgid "File path"
|
||||
msgstr "percorso del file"
|
||||
@@ -3720,6 +3715,9 @@ msgstr "Immagine favicon"
|
||||
msgid "Favicon image. Image must have same width and height."
|
||||
msgstr "Immagine Favicon. L'immagine deve avere stessa larghezza e altezza."
|
||||
|
||||
msgid "Image load max. filesize"
|
||||
msgstr "max dimensione del file Immagine di upload"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1299
|
||||
msgid "Enable download button"
|
||||
msgstr "Pulsante di download immagini"
|
||||
@@ -4178,14 +4176,6 @@ msgstr "%s chiave del sito"
|
||||
msgid "%s secret key"
|
||||
msgstr "%s chiave segreta"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1974
|
||||
msgid "reCAPTCHA public key"
|
||||
msgstr "chiave pubblica reCAPTCHA"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1979
|
||||
msgid "reCAPTCHA private key"
|
||||
msgstr "chiave privata reCAPTCHA"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1986
|
||||
msgid "reCAPTCHA threshold"
|
||||
msgstr "reCAPTCHA soglia"
|
||||
@@ -4742,10 +4732,6 @@ msgstr "Aggiorna ora"
|
||||
msgid "Your website is running the latest version of %s"
|
||||
msgstr "Il tuo sito web è in esecuzione la versione più recente di %s"
|
||||
|
||||
#: ../../../app/lib/chevereto.js:1552 ../../../app/lib/chevereto.min.js:71
|
||||
msgid "Your website is running the latest version of Chevereto."
|
||||
msgstr "Il tuo sito web è in esecuzione con la versione più recente di Chevereto."
|
||||
|
||||
#: ../../../app/lib/chevereto.js:2112 ../../../app/lib/chevereto.min.js:101
|
||||
msgid "Clipboard image"
|
||||
msgstr "Appunti immagine"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: VERSION\n"
|
||||
"POT-Creation-Date: 2016-10-27 18:49+0000\n"
|
||||
"PO-Revision-Date: 2016-10-27 18:49+0000\n"
|
||||
"POT-Creation-Date: 2017-01-10 20:48+0000\n"
|
||||
"PO-Revision-Date: 2017-01-10 20:48+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE TEAM <EMAIL@ADDRESS>\n"
|
||||
"Language: ja\n"
|
||||
@@ -11,6 +11,9 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
|
||||
msgid "Images greater than this size will show a button to load full resolution image."
|
||||
msgstr "このファイルサイズを超えたものは、オリジナル画像表示用のボタンが表示されます。"
|
||||
|
||||
#: ../../../app/install/installer.php:1168
|
||||
#: ../../../app/install/installer.php:1177
|
||||
#: ../../../app/install/installer.php:1180
|
||||
@@ -594,9 +597,6 @@ msgstr "アップデートのチェック"
|
||||
msgid "Support"
|
||||
msgstr "サポート"
|
||||
|
||||
msgid "Chevereto support"
|
||||
msgstr "Cheveretoサポート"
|
||||
|
||||
msgid "Need help? Go to %s and you will get help quickly."
|
||||
msgstr "ヘルプが必要な方は、 %s まで。"
|
||||
|
||||
@@ -2986,11 +2986,6 @@ msgstr "隠しページはシステムメニューに表示されません、し
|
||||
msgid "Only alphanumerics, hyphens and forward slash"
|
||||
msgstr "半角英数字、ハイフンとスラッシュのみ"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:489
|
||||
#, php-format
|
||||
msgid "Page URL key relative to %s"
|
||||
msgstr "ページURLは相対です %s。"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:493
|
||||
msgid "File path"
|
||||
msgstr "ファイルパス"
|
||||
@@ -3705,6 +3700,9 @@ msgstr "favicon"
|
||||
msgid "Favicon image. Image must have same width and height."
|
||||
msgstr "faviconは高さと幅が同じでないといけません。"
|
||||
|
||||
msgid "Image load max. filesize"
|
||||
msgstr "画像の最大ファイルサイズ"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1299
|
||||
msgid "Enable download button"
|
||||
msgstr "ダウンロードボタンを有効にする"
|
||||
@@ -4163,14 +4161,6 @@ msgstr "%s サイトキー"
|
||||
msgid "%s secret key"
|
||||
msgstr "%s シークレットキー"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1974
|
||||
msgid "reCAPTCHA public key"
|
||||
msgstr "reCAPTCHAの公開鍵(public key)を入力"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1979
|
||||
msgid "reCAPTCHA private key"
|
||||
msgstr "reCAPTCHAの秘密鍵(private key)を入力"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1986
|
||||
msgid "reCAPTCHA threshold"
|
||||
msgstr "閾値(失敗)"
|
||||
@@ -4726,10 +4716,6 @@ msgstr "今すぐ更新する"
|
||||
msgid "Your website is running the latest version of %s"
|
||||
msgstr "あなたのサイトは、バージョン:%sで最新版です。"
|
||||
|
||||
#: ../../../app/lib/chevereto.js:1552 ../../../app/lib/chevereto.min.js:71
|
||||
msgid "Your website is running the latest version of Chevereto."
|
||||
msgstr "あなたのウェブサイトは、Cheveretoの最新版で動作しています。"
|
||||
|
||||
#: ../../../app/lib/chevereto.js:2112 ../../../app/lib/chevereto.min.js:101
|
||||
msgid "Clipboard image"
|
||||
msgstr "クリップボードの画像"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: VERSION\n"
|
||||
"POT-Creation-Date: 2016-11-01 14:37+0000\n"
|
||||
"PO-Revision-Date: 2016-11-01 14:37+0000\n"
|
||||
"POT-Creation-Date: 2017-01-07 17:18+0000\n"
|
||||
"PO-Revision-Date: 2017-01-07 17:18+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE TEAM <EMAIL@ADDRESS>\n"
|
||||
"Language: nb\n"
|
||||
@@ -587,7 +587,7 @@ msgstr "Brukere"
|
||||
#: ../../../app/themes/Peafowl/header.php:363
|
||||
#: ../../../app/themes/Peafowl/header.php:405
|
||||
msgid "Settings"
|
||||
msgstr "Min konto"
|
||||
msgstr "Innstillinger"
|
||||
|
||||
#: ../../../app/routes/route.dashboard.php:161
|
||||
msgid "Chevereto version"
|
||||
@@ -602,10 +602,7 @@ msgid "check for updates"
|
||||
msgstr "se etter oppdateringer"
|
||||
|
||||
msgid "Support"
|
||||
msgstr "Støtte"
|
||||
|
||||
msgid "Chevereto support"
|
||||
msgstr "Chevereto støtte"
|
||||
msgstr "Support"
|
||||
|
||||
msgid "Need help? Go to %s and you will get help quickly."
|
||||
msgstr "Trenger du hjelp? Gå til %s for å få rask hjelp."
|
||||
@@ -798,12 +795,12 @@ msgstr "Samtykke skjema"
|
||||
#: ../../../app/routes/route.dashboard.php:234
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1021
|
||||
msgid "Flood protection"
|
||||
msgstr "Flombeskyttelse (autoposting)"
|
||||
msgstr "Spambeskyttelse"
|
||||
|
||||
#: ../../../app/routes/route.dashboard.php:235
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1169
|
||||
msgid "Theme"
|
||||
msgstr "Design"
|
||||
msgstr "Utseende"
|
||||
|
||||
#: ../../../app/routes/route.dashboard.php:236
|
||||
#: ../../../app/routes/route.dashboard.php:373
|
||||
@@ -820,7 +817,7 @@ msgid "System"
|
||||
msgstr "System"
|
||||
|
||||
msgid "Routing"
|
||||
msgstr "Rute sti"
|
||||
msgstr "Ruting"
|
||||
|
||||
#: ../../../app/routes/route.dashboard.php:239
|
||||
msgid "Languages"
|
||||
@@ -3001,11 +2998,6 @@ msgstr "Skjulte sider blir ikke vist i systemmenyer, men alle kan få tilgang ti
|
||||
msgid "Only alphanumerics, hyphens and forward slash"
|
||||
msgstr "Bare alfanumeriske tegn, bindestrek og skråstrek"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:489
|
||||
#, php-format
|
||||
msgid "Page URL key relative to %s"
|
||||
msgstr "Side URL nøkkel i forhold til %s"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:493
|
||||
msgid "File path"
|
||||
msgstr "Filsti"
|
||||
@@ -3409,7 +3401,7 @@ msgstr "La denne være blank dersom det ikke er noen aldersbegrensning for å be
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:972
|
||||
msgid "Username routing"
|
||||
msgstr "Brukernavn føring"
|
||||
msgstr "Brukernavn ruting"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:978
|
||||
#, php-format
|
||||
@@ -4178,14 +4170,6 @@ msgstr "%s sidenøkkel"
|
||||
msgid "%s secret key"
|
||||
msgstr "%s hemmelig nøkkel"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1974
|
||||
msgid "reCAPTCHA public key"
|
||||
msgstr "reCAPTCHA offentlig nøkkel"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1979
|
||||
msgid "reCAPTCHA private key"
|
||||
msgstr "reCAPTCHA privat nøkkel"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1986
|
||||
msgid "reCAPTCHA threshold"
|
||||
msgstr "reCAPTCHA terskel"
|
||||
@@ -4742,10 +4726,6 @@ msgstr "Oppdater nå"
|
||||
msgid "Your website is running the latest version of %s"
|
||||
msgstr "Din nettside kjører siste versjon av %s"
|
||||
|
||||
#: ../../../app/lib/chevereto.js:1552 ../../../app/lib/chevereto.min.js:71
|
||||
msgid "Your website is running the latest version of Chevereto."
|
||||
msgstr "Websiden din kjører siste versjon av Chevereto."
|
||||
|
||||
#: ../../../app/lib/chevereto.js:2112 ../../../app/lib/chevereto.min.js:101
|
||||
msgid "Clipboard image"
|
||||
msgstr "Utklippstavle bilde"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: VERSION\n"
|
||||
"POT-Creation-Date: 2016-11-01 14:37+0000\n"
|
||||
"PO-Revision-Date: 2016-11-01 14:37+0000\n"
|
||||
"POT-Creation-Date: 2017-01-10 20:48+0000\n"
|
||||
"PO-Revision-Date: 2017-01-10 20:48+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE TEAM <EMAIL@ADDRESS>\n"
|
||||
"Language: ru\n"
|
||||
@@ -11,6 +11,9 @@ msgstr ""
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
|
||||
msgid "Images greater than this size will show a button to load full resolution image."
|
||||
msgstr "При просмотре изображений большего размера, будет отображаться кнопка загрузки полной версии."
|
||||
|
||||
#: ../../../app/install/installer.php:1168
|
||||
#: ../../../app/install/installer.php:1177
|
||||
#: ../../../app/install/installer.php:1180
|
||||
@@ -105,7 +108,7 @@ msgstr "В процессе выполнения произошла ошибка
|
||||
#: ../../../app/install/update/updater.php:72
|
||||
#, php-format
|
||||
msgid "Missing %s file"
|
||||
msgstr "Не хватает файла %s"
|
||||
msgstr "Отсутствует файл %s"
|
||||
|
||||
#: ../../../app/install/update/updater.php:78
|
||||
msgid "Invalid license info"
|
||||
@@ -614,9 +617,6 @@ msgstr "проверить обновления"
|
||||
msgid "Support"
|
||||
msgstr "Поддержка"
|
||||
|
||||
msgid "Chevereto support"
|
||||
msgstr "службу поддержки Chevereto"
|
||||
|
||||
msgid "Need help? Go to %s and you will get help quickly."
|
||||
msgstr "Нужна помощь? Посетите %s и мы быстро поможем вам."
|
||||
|
||||
@@ -769,7 +769,7 @@ msgid "Changelog"
|
||||
msgstr "Список изменений"
|
||||
|
||||
msgid "Request new features"
|
||||
msgstr "Запрос на новые функции"
|
||||
msgstr "Предложить новый функционал"
|
||||
|
||||
msgid "Bug tracking"
|
||||
msgstr "Баг трекер"
|
||||
@@ -3016,11 +3016,6 @@ msgstr "Скрытые страницы не видны в меню, но буд
|
||||
msgid "Only alphanumerics, hyphens and forward slash"
|
||||
msgstr "Только цифры, латинские буквы, дефис и нижнее подчеркивание"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:489
|
||||
#, php-format
|
||||
msgid "Page URL key relative to %s"
|
||||
msgstr "URL-ключ страницы относительно %s"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:493
|
||||
msgid "File path"
|
||||
msgstr "Путь к файлу"
|
||||
@@ -3735,6 +3730,9 @@ msgstr "Иконка сайта"
|
||||
msgid "Favicon image. Image must have same width and height."
|
||||
msgstr "Иконка вашего сайта. Ширина и высота данного изображения должны быть одинаковы."
|
||||
|
||||
msgid "Image load max. filesize"
|
||||
msgstr "Макс. размер файла в просмотре"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1299
|
||||
msgid "Enable download button"
|
||||
msgstr "Включить кнопку загрузки"
|
||||
@@ -3924,7 +3922,7 @@ msgid "Automatic updates check"
|
||||
msgstr "Автоматическая проверка обновлений"
|
||||
|
||||
msgid "When enabled the system will automatically check for new updates."
|
||||
msgstr "Если включить данную настройку то система будет автоматически проверять обновления"
|
||||
msgstr "Если включить данную настройку, то система будет автоматически проверять обновления"
|
||||
|
||||
msgid "Display available updates notification"
|
||||
msgstr "Показывать уведомление об обновлении"
|
||||
@@ -4193,14 +4191,6 @@ msgstr "%s ключ сайта"
|
||||
msgid "%s secret key"
|
||||
msgstr "%s секретный ключ"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1974
|
||||
msgid "reCAPTCHA public key"
|
||||
msgstr "Публичный ключ reCAPTCHA"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1979
|
||||
msgid "reCAPTCHA private key"
|
||||
msgstr "Закрытый ключ reCAPTCHA"
|
||||
|
||||
#: ../../../app/themes/Peafowl/views/dashboard.php:1986
|
||||
msgid "reCAPTCHA threshold"
|
||||
msgstr "Порог срабатывания reCAPTCHA"
|
||||
@@ -4758,10 +4748,6 @@ msgstr "Обновить"
|
||||
msgid "Your website is running the latest version of %s"
|
||||
msgstr "Вы используете последнюю версию Chevereto - %s"
|
||||
|
||||
#: ../../../app/lib/chevereto.js:1552 ../../../app/lib/chevereto.min.js:71
|
||||
msgid "Your website is running the latest version of Chevereto."
|
||||
msgstr "Вы используете последнюю версию Chevereto."
|
||||
|
||||
#: ../../../app/lib/chevereto.js:2112 ../../../app/lib/chevereto.min.js:101
|
||||
msgid "Clipboard image"
|
||||
msgstr "Изображение из буфера обмена"
|
||||
|
||||
@@ -224,6 +224,9 @@ try {
|
||||
'disqus_public_key' => NULL,
|
||||
'disqus_secret_key' => NULL,
|
||||
],
|
||||
'1.0.6' => [
|
||||
'image_load_max_filesize_mb' => '3',
|
||||
]
|
||||
];
|
||||
// Settings that must be renamed from NAME to NEW NAME and DELETE old NAME
|
||||
$settings_rename = [];
|
||||
|
||||
@@ -7,14 +7,13 @@
|
||||
<inbox@rodolfoberrios.com>
|
||||
|
||||
Copyright (C) Rodolfo Berrios A. All rights reserved.
|
||||
|
||||
|
||||
BY USING THIS SOFTWARE YOU DECLARE TO ACCEPT THE CHEVERETO EULA
|
||||
http://chevereto.com/license
|
||||
|
||||
--------------------------------------------------------------------- */
|
||||
|
||||
$(function(){
|
||||
|
||||
|
||||
$(function(){
|
||||
// Window listeners
|
||||
$(window).on("resize", function(){
|
||||
CHV.fn.uploader.boxSizer();
|
||||
@@ -26,14 +25,8 @@ $(function(){
|
||||
|
||||
// Landing fancy load
|
||||
if($("#home-cover, #maintenance-wrapper").exists()) {
|
||||
if($("#maintenance-wrapper").exists()) {
|
||||
var landing_src = $("#maintenance-wrapper").css("background-image").slice(4, -1).replace(/^\"|\"$/g, "");
|
||||
} else {
|
||||
var landing_src = $(".home-cover-img", "#home-cover-slideshow").first().attr("data-src");
|
||||
}
|
||||
|
||||
//$("body").hasClass("landing") &&
|
||||
|
||||
var landing_src = $("#maintenance-wrapper").exists() ? $("#maintenance-wrapper").css("background-image").slice(4, -1).replace(/^\"|\"$/g, "") : $(".home-cover-img", "#home-cover-slideshow").first().attr("data-src");
|
||||
|
||||
function showHomeCover() {
|
||||
$("body").addClass("load");
|
||||
if(!$("#maintenance-wrapper").exists()) {
|
||||
@@ -212,14 +205,12 @@ $(function(){
|
||||
var $input_width = $("[name=form-width]", $parent);
|
||||
var $input_height = $("[name=form-height]", $parent);
|
||||
var ratio = $input_width.data("initial") / $input_height.data("initial");
|
||||
|
||||
if($(e.target).is($input_width)) {
|
||||
$input_height.prop("value", Math.round(Math.round($input_width.prop("value")/ratio)));
|
||||
} else {
|
||||
$input_width.prop("value", Math.round(Math.round($input_height.prop("value")*ratio)));
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
// Edit item from queue
|
||||
$(document).on("click", anywhere_upload_queue +" [data-action=edit]", function() {
|
||||
@@ -407,19 +398,14 @@ $(function(){
|
||||
|
||||
// Uploader
|
||||
$(document).on("click", "[data-action=upload]", function(){
|
||||
|
||||
$("[data-group=upload], [data-group=upload-queue-ready]", $anywhere_upload).hide();
|
||||
$("[data-group=uploading]", $anywhere_upload).show();
|
||||
|
||||
CHV.fn.uploader.queueSize();
|
||||
CHV.fn.uploader.canAdd = false;
|
||||
|
||||
$queue_items = $("li", $anywhere_upload_queue);
|
||||
$queue_items.addClass("uploading waiting");
|
||||
|
||||
CHV.fn.uploader.timestamp = new Date().getTime();
|
||||
CHV.fn.uploader.upload($queue_items.first("li"));
|
||||
|
||||
});
|
||||
|
||||
/*CHV.obj.image_viewer.$container.swipe({
|
||||
@@ -469,7 +455,7 @@ $(function(){
|
||||
$("#background-cover-src").css("transform", "");
|
||||
$("#top-bar-shade").css("opacity", 1);
|
||||
return;
|
||||
};
|
||||
}
|
||||
var Y = $(window).scrollTop();
|
||||
var is_slim_shady = $("#top-bar-shade").exists() && !$("html").hasClass("top-bar-box-shadow-none");
|
||||
if(Y < 0) return;
|
||||
@@ -502,11 +488,10 @@ $(function(){
|
||||
CHV.fn.viewerLoadImage();
|
||||
});
|
||||
|
||||
var image_size = $(CHV.obj.image_viewer.loader).data("size");
|
||||
if(image_size > "3 MB".getBytes() || (image_size > "500 KB".getBytes() && PF.fn.isDevice(["phone", "phablet"]))) {
|
||||
if($(CHV.obj.image_viewer.loader).data("size") > CHV.obj.config.image.load_max_filesize.getBytes()) {
|
||||
$(CHV.obj.image_viewer.loader).css("display", "block");
|
||||
} else {
|
||||
CHV.fn.viewerLoadImage();
|
||||
CHV.fn.viewerLoadImage(); //estho
|
||||
}
|
||||
|
||||
// Fix viewer width when height changes and boom! a wild scrollbar appears
|
||||
@@ -1128,7 +1113,7 @@ $(function(){
|
||||
success: function(XHR) {
|
||||
$targets.each(function() {
|
||||
var response = XHR.responseJSON;
|
||||
$(this).data("category-id", response.category_id)
|
||||
$(this).data("category-id", response.category_id);
|
||||
});
|
||||
CHV.fn.list_editor.clearSelection();
|
||||
}
|
||||
@@ -1314,7 +1299,7 @@ $(function(){
|
||||
avatarXHR = new XMLHttpRequest();
|
||||
avatarXHR.open("POST", PF.obj.config.json_api, true);
|
||||
avatarXHR.send(user_avatar_fd);
|
||||
avatarXHR.onreadystatechange = function(){
|
||||
avatarXHR.onreadystatechange = function() {
|
||||
if(this.readyState == 4){
|
||||
var response = this.responseType !== "json" ? JSON.parse(this.response) : this.response,
|
||||
image = response.success.image;
|
||||
@@ -1346,7 +1331,7 @@ $(function(){
|
||||
$this.data("uploading", false);
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
$(document).on("change", "[data-content=user-background-upload-input]", function(e) {
|
||||
@@ -1394,7 +1379,7 @@ $(function(){
|
||||
avatarXHR = new XMLHttpRequest();
|
||||
avatarXHR.open("POST", PF.obj.config.json_api, true);
|
||||
avatarXHR.send(user_picture_fd);
|
||||
avatarXHR.onreadystatechange = function(){
|
||||
avatarXHR.onreadystatechange = function() {
|
||||
if(this.readyState == 4){
|
||||
var response = this.responseType !== "json" ? JSON.parse(this.response) : this.response,
|
||||
image = response.success.image;
|
||||
@@ -1424,7 +1409,7 @@ $(function(){
|
||||
$this.data("uploading", false);
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
});
|
||||
/*
|
||||
$(document).on("click", "[data-action=disconnect]", function() {
|
||||
@@ -1777,18 +1762,16 @@ $(function(){
|
||||
$li.removeClass("transition");
|
||||
}, 150);
|
||||
}, 1500);
|
||||
})
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
// Invoke reCaptcha
|
||||
if($("#g-recaptcha").is(':empty') && CHV.obj.config.recaptcha.enabled && CHV.obj.config.recaptcha.sitekey) {
|
||||
reCaptchaCallback = function() {
|
||||
grecaptcha.render("g-recaptcha", {
|
||||
"sitekey" : CHV.obj.config.recaptcha.sitekey
|
||||
sitekey: CHV.obj.config.recaptcha.sitekey,
|
||||
});
|
||||
}
|
||||
};
|
||||
$.getScript("https://www.google.com/recaptcha/api.js?onload=reCaptchaCallback&render=explicit");
|
||||
}
|
||||
|
||||
@@ -1796,7 +1779,7 @@ $(function(){
|
||||
var $parent = $(this).closest(".list-item");
|
||||
var $loadBtn = $parent.find("[data-action=load-image]");
|
||||
if($loadBtn.length > 0) {
|
||||
loadImageListing($loadBtn)
|
||||
loadImageListing($loadBtn);
|
||||
e.preventDefault();
|
||||
}
|
||||
return;
|
||||
@@ -2147,10 +2130,10 @@ CHV.fn.uploader = {
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
if(!$("#top-bar").hasClass("transparent")) {
|
||||
fade_slim_shady()
|
||||
fade_slim_shady();
|
||||
}
|
||||
|
||||
$(CHV.fn.uploader.selectors.fullscreen_mask).css({opacity: 0});
|
||||
@@ -2175,7 +2158,7 @@ CHV.fn.uploader = {
|
||||
setTimeout(function() {
|
||||
$(CHV.fn.uploader.selectors.root).css({top: ""});
|
||||
if($("#top-bar-shade").exists()) {
|
||||
fade_slim_shady()
|
||||
fade_slim_shady();
|
||||
}
|
||||
|
||||
if($("body#image").exists()) {
|
||||
@@ -2228,7 +2211,7 @@ CHV.fn.uploader = {
|
||||
top: PF.fn.isDevice("phone") ? 0 : $(CHV.fn.uploader.selectors.root).data("top")
|
||||
}));
|
||||
setTimeout(function() {
|
||||
$(CHV.fn.uploader.selectors.fullscreen_mask).css({opacity: 1})
|
||||
$(CHV.fn.uploader.selectors.fullscreen_mask).css({opacity: 1});
|
||||
setTimeout(function() {
|
||||
if(typeof callback == "function") {
|
||||
callback();
|
||||
@@ -2331,7 +2314,7 @@ CHV.fn.uploader = {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
$fileinput = $(this.selectors.file);
|
||||
$fileinput.replaceWith($fileinput = $fileinput.clone(true));
|
||||
@@ -2384,7 +2367,7 @@ CHV.fn.uploader = {
|
||||
|
||||
for(var i=0; i<failed_files.length; i++) {
|
||||
var failed_file = failed_files[i];
|
||||
files.splice(failed_file.id, 1)
|
||||
files.splice(failed_file.id, 1);
|
||||
}
|
||||
|
||||
if(failed_files.length > 0 && files.length == 0) {
|
||||
@@ -2504,7 +2487,7 @@ CHV.fn.uploader = {
|
||||
'89504e47': 'image/png',
|
||||
'47494638': 'image/gif',
|
||||
'ffd8ffe0': 'image/jpeg',
|
||||
}
|
||||
};
|
||||
$.each(['ffd8ffe1', 'ffd8ffe2'], function(i, v) {
|
||||
header_to_mime[v] = header_to_mime['ffd8ffe0'];
|
||||
});
|
||||
@@ -2583,7 +2566,7 @@ CHV.fn.uploader = {
|
||||
for(var i = 0; i < failed_files.length; i++){
|
||||
failed_message += "<li>" + failed_files[i].name + "</li>";
|
||||
delete CHV.fn.uploader.files[failed_files[i].uid];
|
||||
$("li[data-id="+ failed_files[i].uid +"]", CHV.fn.uploader.selectors.queue).find("[data-action=cancel]").click()
|
||||
$("li[data-id="+ failed_files[i].uid +"]", CHV.fn.uploader.selectors.queue).find("[data-action=cancel]").click();
|
||||
}
|
||||
PF.fn.modal.simple({title: PF.fn._s("Some files couldn't be added"), message: '<ul>'+failed_message+'</ul>'});
|
||||
} else {
|
||||
@@ -2688,7 +2671,7 @@ CHV.fn.uploader = {
|
||||
$.each(f.formValues, function(i,v) {
|
||||
formData[i.replace(/image_/g, "")] = v;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
$.each(formData, function(i,v) {
|
||||
form.append(i, v);
|
||||
@@ -2716,7 +2699,7 @@ CHV.fn.uploader = {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
} else {
|
||||
this.queueSize();
|
||||
this.queueProgress({loaded: 1, total: 1}, id);
|
||||
@@ -2764,12 +2747,12 @@ CHV.fn.uploader = {
|
||||
err_handle = {
|
||||
status: 500,
|
||||
statusText: "Internal server error"
|
||||
}
|
||||
};
|
||||
} else {
|
||||
err_handle = {
|
||||
status: 400,
|
||||
statusText: JSONresponse.error.message
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
JSONresponse = {
|
||||
@@ -3196,7 +3179,7 @@ CHV.fn.category = {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(/^[-\w]+$/.test($("[name=form-category-url_key]", modal).val()) == false) {
|
||||
if(/^[-\w]+$/.test($("[name=form-category-url_key]", modal).val()) === false) {
|
||||
PF.fn.growl.call(PF.fn._s("Invalid URL key."));
|
||||
$("[name=form-category-url_key]", modal).highlight();
|
||||
return false;
|
||||
@@ -3682,7 +3665,7 @@ CHV.fn.storage = {
|
||||
var sel;
|
||||
sel = "[name=form-storage-"+v+"]";
|
||||
if($(sel, modal).attr("type") !== "hidden") {
|
||||
sel += ":visible"
|
||||
sel += ":visible";
|
||||
}
|
||||
PF.obj.modal.form_data.editing[v] = $(sel, modal).val();
|
||||
});
|
||||
@@ -3725,7 +3708,7 @@ CHV.fn.storage = {
|
||||
var sel;
|
||||
sel = "[name=form-storage-"+v+"]";
|
||||
if($(sel, modal).attr("type") !== "hidden") {
|
||||
sel += ":visible"
|
||||
sel += ":visible";
|
||||
}
|
||||
PF.obj.modal.form_data.storage[v] = $(sel, modal).val();
|
||||
});
|
||||
@@ -3778,7 +3761,7 @@ CHV.fn.storage = {
|
||||
CHV.fn.common = {
|
||||
validateForm: function(modal) {
|
||||
if(typeof modal == "undefined") {
|
||||
var modal = PF.obj.modal.selectors.root
|
||||
var modal = PF.obj.modal.selectors.root;
|
||||
}
|
||||
|
||||
var submit = true;
|
||||
@@ -3972,7 +3955,7 @@ CHV.fn.list_editor = {
|
||||
for(var k in affected_content_lists) {
|
||||
var $list = $("#"+k),
|
||||
stock_offset = $list.data("offset"),
|
||||
offset = - affected_content_lists[k];;
|
||||
offset = - affected_content_lists[k];
|
||||
|
||||
stock_offset = (typeof stock_offset == "undefined") ? 0 : parseInt(stock_offset);
|
||||
|
||||
@@ -4084,7 +4067,7 @@ CHV.fn.list_editor = {
|
||||
if(action == "edit" || action == "move") {
|
||||
if(action == "move" && CHV.obj.resource.type == "album") {
|
||||
CHV.fn.list_editor.moveFromList($target, growl);
|
||||
return
|
||||
return;
|
||||
}
|
||||
$target.data("description", response.description);
|
||||
|
||||
@@ -4255,4 +4238,4 @@ CHV.fn.list_editor = {
|
||||
CHV.fn.queuePixel = function() {
|
||||
var img = '<img data-content="queue-pixel" src="'+ PF.obj.config.base_url + '?queue&r=' + PF.fn.generate_random_string(32) +'" width="1" height="1" alt="" style="display: none;">';
|
||||
$("body").append(img);
|
||||
}
|
||||
};
|
||||
60
app/lib/chevereto.min.js
vendored
60
app/lib/chevereto.min.js
vendored
@@ -1,6 +1,5 @@
|
||||
$(function(){$(window).on("resize",function(){CHV.fn.uploader.boxSizer();if(typeof user_background_full_fix=="function"){user_background_full_fix();}
|
||||
CHV.fn.bindSelectableItems();});if($("#home-cover, #maintenance-wrapper").exists()){if($("#maintenance-wrapper").exists()){var landing_src=$("#maintenance-wrapper").css("background-image").slice(4,-1).replace(/^\"|\"$/g,"");}else{var landing_src=$(".home-cover-img","#home-cover-slideshow").first().attr("data-src");}
|
||||
function showHomeCover(){$("body").addClass("load");if(!$("#maintenance-wrapper").exists()){$(".home-cover-img","#home-cover-slideshow").first().css("background-image","url("+landing_src+")").addClass("animate-in--alt").removeAttr("data-src");}
|
||||
CHV.fn.bindSelectableItems();});if($("#home-cover, #maintenance-wrapper").exists()){var landing_src=$("#maintenance-wrapper").exists()?$("#maintenance-wrapper").css("background-image").slice(4,-1).replace(/^\"|\"$/g,""):$(".home-cover-img","#home-cover-slideshow").first().attr("data-src");function showHomeCover(){$("body").addClass("load");if(!$("#maintenance-wrapper").exists()){$(".home-cover-img","#home-cover-slideshow").first().css("background-image","url("+landing_src+")").addClass("animate-in--alt").removeAttr("data-src");}
|
||||
setTimeout(function(){$("body").addClass("loaded");setTimeout(function(){showHomeSlideshow();},7000);},400*1.5);}
|
||||
var showHomeSlideshowInterval=function(){setTimeout(function(){showHomeSlideshow();},8000);};function showHomeSlideshow(){var $image=$(".home-cover-img[data-src]","#home-cover-slideshow").first();var $images=$(".home-cover-img","#home-cover-slideshow");if($image.length==0){if($images.length==1)return;$images.first().removeClass("animate-in");$("#home-cover-slideshow").append($images.first());setTimeout(function(){$(".home-cover-img:last","#home-cover-slideshow").addClass("animate-in");},20);setTimeout(function(){$(".home-cover-img:not(:last)","#home-cover-slideshow").removeClass("animate-in");},4000);showHomeSlideshowInterval();}else{var src=$image.attr("data-src");$("<img/>").attr("src",src).on("load error",function(){$(this).remove();$image.css("background-image","url("+src+")").addClass("animate-in").removeAttr("data-src");setTimeout(function(){$(".home-cover-img:not(:last)","#home-cover-slideshow").removeClass("animate-end animate-in--alt");},2000);showHomeSlideshowInterval();});}}
|
||||
if(landing_src){$("<img/>").attr("src",landing_src).on("load error",function(){$(this).remove();showHomeCover();});}else{showHomeCover();}}
|
||||
@@ -9,8 +8,7 @@ return isFileTransfer;}
|
||||
if($(CHV.fn.uploader.selectors.root).exists()){$("body").on({dragenter:function(e){e.preventDefault();if(!isFileTransfer(e)){return false;}
|
||||
if(!$(CHV.fn.uploader.selectors.dropzone).exists()){$("body").append($('<div id="'+CHV.fn.uploader.selectors.dropzone.replace("#","")+'"/>').css({width:"100%",height:"100%",position:"fixed",zIndex:1000,left:0,top:0}));}}});$(document).on({dragover:function(e){e.preventDefault();if(!isFileTransfer(e)){return false;}
|
||||
if(!$(CHV.fn.uploader.selectors.root).data("shown")){CHV.fn.uploader.toggle({reset:false});}},dragleave:function(e){$(CHV.fn.uploader.selectors.dropzone).remove();if($.isEmptyObject(CHV.fn.uploader.files)){CHV.fn.uploader.toggle();}},drop:function(e){e.preventDefault();CHV.fn.uploader.add(e);$(CHV.fn.uploader.selectors.dropzone).remove();},},CHV.fn.uploader.selectors.dropzone);}
|
||||
$(document).on("keyup change","[data-action=resize-combo-input]",function(e){var $parent=$(this).closest("[data-action=resize-combo-input]");var $input_width=$("[name=form-width]",$parent);var $input_height=$("[name=form-height]",$parent);var ratio=$input_width.data("initial")/ $input_height.data("initial");if($(e.target).is($input_width)){$input_height.prop("value",Math.round(Math.round($input_width.prop("value")/ratio)));}else{$input_width.prop("value",Math.round(Math.round($input_height.prop("value")*ratio)));}})
|
||||
$(document).on("click",anywhere_upload_queue+" [data-action=edit]",function(){var $item=$(this).closest("li"),$queue=$item.closest("ul"),id=$item.data("id"),file=CHV.fn.uploader.files[id];var modal=PF.obj.modal.selectors.root;var queueObject=$.extend({},file.formValues||file.parsedMeta);if(typeof queueObject.category_id==typeof undefined){var upload_category=$("[name=upload-category-id]",CHV.fn.uploader.selectors.root).prop("value")||null;queueObject.category_id=upload_category;}
|
||||
$(document).on("keyup change","[data-action=resize-combo-input]",function(e){var $parent=$(this).closest("[data-action=resize-combo-input]");var $input_width=$("[name=form-width]",$parent);var $input_height=$("[name=form-height]",$parent);var ratio=$input_width.data("initial")/ $input_height.data("initial");if($(e.target).is($input_width)){$input_height.prop("value",Math.round(Math.round($input_width.prop("value")/ratio)));}else{$input_width.prop("value",Math.round(Math.round($input_height.prop("value")*ratio)));}});$(document).on("click",anywhere_upload_queue+" [data-action=edit]",function(){var $item=$(this).closest("li"),$queue=$item.closest("ul"),id=$item.data("id"),file=CHV.fn.uploader.files[id];var modal=PF.obj.modal.selectors.root;var queueObject=$.extend({},file.formValues||file.parsedMeta);if(typeof queueObject.category_id==typeof undefined){var upload_category=$("[name=upload-category-id]",CHV.fn.uploader.selectors.root).prop("value")||null;queueObject.category_id=upload_category;}
|
||||
if(typeof queueObject.nsfw==typeof undefined){var upload_nsfw=$("[name=upload-nsfw]:checked",CHV.fn.uploader.selectors.root).prop("value")||null;queueObject.nsfw=upload_nsfw;}
|
||||
PF.fn.modal.call({type:"html",template:$("#anywhere-upload-edit-item").html(),callback:function(){$.each(queueObject,function(i,v){var name="[name=form-"+i.replace(/_/g,"-")+"]";var $input=$(name,modal);if(!$input.exists())return true;if($input.is(":checkbox")){$input.prop("checked",$input.attr("value")==v);}else if($input.is("select")){var $option=$input.find("[value="+v+"]");if(!$option.exists()){$option=$input.find("option:first");}
|
||||
$option.prop("selected",true);}else{$input.prop("value",v);}
|
||||
@@ -26,9 +24,10 @@ if(typeof CHV.fn.uploader.files[id]!==typeof undefined&&typeof CHV.fn.uploader.f
|
||||
delete CHV.fn.uploader.files[id];CHV.fn.uploader.queueSize();if(Object.size(CHV.fn.uploader.files)==0){if(Object.size(CHV.fn.uploader.success.error)==0&&Object.size(CHV.fn.uploader.results.error)==0){CHV.fn.uploader.reset();}}else{if(item_xhr_cancel){if($("li.waiting",$queue).first().length!==0){CHV.fn.uploader.upload($("li.waiting",$queue).first());}else if(Object.size(CHV.fn.uploader.success.error)!==0||Object.size(CHV.fn.uploader.results.error)!==0){CHV.fn.uploader.displayResults();}}}});$(document).on("click","[data-action=upload]",function(){$("[data-group=upload], [data-group=upload-queue-ready]",$anywhere_upload).hide();$("[data-group=uploading]",$anywhere_upload).show();CHV.fn.uploader.queueSize();CHV.fn.uploader.canAdd=false;$queue_items=$("li",$anywhere_upload_queue);$queue_items.addClass("uploading waiting");CHV.fn.uploader.timestamp=new Date().getTime();CHV.fn.uploader.upload($queue_items.first("li"));});if($("body#user").exists()){if(PF.obj.listing.query_string.page>1){var State=History.getState();if(State.data&&typeof State.data.scrollTop!=="undefined"){if($(window).scrollTop()!==State.data.scrollTop){$(window).scrollTop(State.data.scrollTop);}}else{var scrollTop=$("#background-cover").height()-160;$("html, body").animate({scrollTop:scrollTop},0);}}}
|
||||
if($("#top-bar-shade").exists()&&$("#top-bar-shade").css("opacity")){$("#top-bar-shade").data("initial-opacity",Number($("#top-bar-shade").css("opacity")));}
|
||||
if(PF.fn.isDevice('phone')){$("#top-bar-shade").css("opacity",1);}
|
||||
$(window).on("scroll resize",function(){if(PF.fn.isDevice('phone')){$("#background-cover-src").css("transform","");$("#top-bar-shade").css("opacity",1);return;};var Y=$(window).scrollTop();var is_slim_shady=$("#top-bar-shade").exists()&&!$("html").hasClass("top-bar-box-shadow-none");if(Y<0)return;var $top_bar=$("#top-bar");var rate=Number(Y /($("#background-cover, [data-content=follow-scroll-opacity]").height()-$top_bar.height()));if(rate>1)rate=1;if(is_slim_shady){if($("#top-bar-shade").data("initial-opacity")){rate+=$("#top-bar-shade").data("initial-opacity");}
|
||||
$(window).on("scroll resize",function(){if(PF.fn.isDevice('phone')){$("#background-cover-src").css("transform","");$("#top-bar-shade").css("opacity",1);return;}
|
||||
var Y=$(window).scrollTop();var is_slim_shady=$("#top-bar-shade").exists()&&!$("html").hasClass("top-bar-box-shadow-none");if(Y<0)return;var $top_bar=$("#top-bar");var rate=Number(Y /($("#background-cover, [data-content=follow-scroll-opacity]").height()-$top_bar.height()));if(rate>1)rate=1;if(is_slim_shady){if($("#top-bar-shade").data("initial-opacity")){rate+=$("#top-bar-shade").data("initial-opacity");}
|
||||
$("#top-bar-shade").css({opacity:rate});}
|
||||
if(rate==1)return;$("#background-cover-src").css({transform:"translate(0, "+Y*0.8+"px"+")"});});CHV.fn.bindSelectableItems();if($("body#image").exists()){if($(CHV.obj.image_viewer.selector+" [data-load=full]").length>0){$(document).on("click",CHV.obj.image_viewer.loader,function(e){CHV.fn.viewerLoadImage();});var image_size=$(CHV.obj.image_viewer.loader).data("size");if(image_size>"3 MB".getBytes()||(image_size>"500 KB".getBytes()&&PF.fn.isDevice(["phone","phablet"]))){$(CHV.obj.image_viewer.loader).css("display","block");}else{CHV.fn.viewerLoadImage();}
|
||||
if(rate==1)return;$("#background-cover-src").css({transform:"translate(0, "+Y*0.8+"px"+")"});});CHV.fn.bindSelectableItems();if($("body#image").exists()){if($(CHV.obj.image_viewer.selector+" [data-load=full]").length>0){$(document).on("click",CHV.obj.image_viewer.loader,function(e){CHV.fn.viewerLoadImage();});if($(CHV.obj.image_viewer.loader).data("size")>CHV.obj.config.image.load_max_filesize.getBytes()){$(CHV.obj.image_viewer.loader).css("display","block");}else{CHV.fn.viewerLoadImage();}
|
||||
$(document).bind("DOMSubtreeModified",function(){if($("html").height()>$(window).innerHeight()&&!$("html").hasClass("scrollbar-y")){$("html").addClass("scrollbar-y");$(document).data({width:$(this).width(),height:$(this).height()});CHV.fn.image_viewer_full_fix();}});$(window).on("resize",function(){CHV.fn.image_viewer_full_fix();});$(document).on("keyup",function(e){var $this=$(e.target),key=e.charCode||e.keyCode;if($this.is(":input")){return;}else{if(CHV.obj.image_viewer.$navigation.exists()&&(key==37||key==39)){var navigation_jump_url=$("[data-action="+(key==37?"prev":"next")+"]",CHV.obj.image_viewer.$navigation).attr("href");if(typeof navigation_jump_url!=="undefined"&&navigation_jump_url!==""){window.location=$("[data-action="+(key==37?"prev":"next")+"]",CHV.obj.image_viewer.$navigation).attr("href");}}}});}else{CHV.fn.viewerImageZoomClass();}}
|
||||
$(document).on("click",CHV.obj.image_viewer.container,function(e){if(!($(this).hasClass("cursor-zoom-in")||$(this).hasClass("cursor-zoom-out")))return;var zoom_in=$(this).hasClass("cursor-zoom-in");$(this).removeClass("cursor-zoom-in cursor-zoom-out");if(zoom_in){var width=$(this)[0].getBoundingClientRect().width,height=$(this)[0].getBoundingClientRect().height,ratio=$("img",this).attr("width")/$("img",this).attr("height"),new_width;if(typeof $(this).data("dimentions")==typeof undefined){$(this).data({dimentions:{width:width,height:height},ratio:ratio});}
|
||||
if($("img",this).attr("width")>$(window).width()){$(this).css({width:"100%"});new_width=$(this).width();$(this).css({width:width});}else{new_width=$("img",this).attr("width");}
|
||||
@@ -57,7 +56,7 @@ if(!PF.fn.form_modal_has_changed()){PF.fn.modal.close();return;}
|
||||
var album_object=new_album?"creating":"moving";PF.obj.modal.form_data={action:new_album?"create-album":"move",type:dealing_with,owner:CHV.obj.resource.user.id,multiple:true,album:{ids:ids,"new":new_album}};if(new_album){PF.obj.modal.form_data.album.name=$("[name=form-album-name]",$modal).val();PF.obj.modal.form_data.album.privacy=$("[name=form-privacy]",$modal).val();if(PF.obj.modal.form_data.album.privacy=="password"){PF.obj.modal.form_data.album.password=$("[name=form-album-password]",$modal).val();}
|
||||
PF.obj.modal.form_data.album.description=$("[name=form-album-description]",$modal).val();}else{PF.obj.modal.form_data.album.id=$("[name=form-album-id]",$modal).val();}
|
||||
return true;}});break;case"delete":PF.fn.modal.call({template:$("[data-modal=form-delete-multiple]").html(),button_submit:PF.fn._s("Confirm"),ajax:{url:PF.obj.config.json_api,deferred:{success:function(XHR){if(dealing_with=="albums"){$targets.each(function(){$("[name=form-album-id]","[data-modal]").find("[value="+$(this).data("id")+"]").remove();});CHV.fn.list_editor.updateUserCounters("image",XHR.responseJSON.success.affected,"-");}
|
||||
CHV.fn.list_editor.deleteFromList($targets);CHV.fn.queuePixel();}}},confirm:function(){PF.obj.modal.form_data={action:"delete",from:"list","delete":dealing_with,multiple:true,deleting:{ids:ids}};return true;}});break;case"assign-category":var category_id=$targets.first().data("category-id"),same_category=true;$targets.each(function(){if($(this).data("category-id")!==category_id){same_category=false;return false;}});PF.fn.modal.call({type:"html",template:$("[data-modal=form-assign-category]").html(),forced:true,ajax:{url:PF.obj.config.json_api,deferred:{success:function(XHR){$targets.each(function(){var response=XHR.responseJSON;$(this).data("category-id",response.category_id)});CHV.fn.list_editor.clearSelection();}}},confirm:function(){var $modal=$(PF.obj.modal.selectors.root),form_category=$("[name=form-category-id]",$modal).val()||null;if(same_category&&category_id==form_category){PF.fn.modal.close(function(){CHV.fn.list_editor.clearSelection();});return false;}
|
||||
CHV.fn.list_editor.deleteFromList($targets);CHV.fn.queuePixel();}}},confirm:function(){PF.obj.modal.form_data={action:"delete",from:"list","delete":dealing_with,multiple:true,deleting:{ids:ids}};return true;}});break;case"assign-category":var category_id=$targets.first().data("category-id"),same_category=true;$targets.each(function(){if($(this).data("category-id")!==category_id){same_category=false;return false;}});PF.fn.modal.call({type:"html",template:$("[data-modal=form-assign-category]").html(),forced:true,ajax:{url:PF.obj.config.json_api,deferred:{success:function(XHR){$targets.each(function(){var response=XHR.responseJSON;$(this).data("category-id",response.category_id);});CHV.fn.list_editor.clearSelection();}}},confirm:function(){var $modal=$(PF.obj.modal.selectors.root),form_category=$("[name=form-category-id]",$modal).val()||null;if(same_category&&category_id==form_category){PF.fn.modal.close(function(){CHV.fn.list_editor.clearSelection();});return false;}
|
||||
PF.obj.modal.form_data={action:"edit-category",from:"list",multiple:true,editing:{ids:ids,category_id:form_category}};return true;}});break;case"flag-safe":case"flag-unsafe":var action=$(this).data("action"),flag=action=="flag-safe"?"safe":"unsafe";PF.fn.modal.call({template:$("[data-modal=form-"+action+"]").html(),button_submit:PF.fn._s("Confirm"),ajax:{url:PF.obj.config.json_api,deferred:{success:function(XHR){$targets.each(function(){$(this).removeClass("safe unsafe").addClass(flag).removeAttr("data-flag").attr("data-flag",flag).data("flag",flag);});CHV.fn.list_editor.clearSelection();}}},confirm:function(){PF.obj.modal.form_data={action:action,from:"list",multiple:true,editing:{ids:ids,nsfw:action=="flag-safe"?0:1}};return true;}});break;}
|
||||
if(PF.fn.isDevice(["phone","phablet"])){return false;}});if($("body#image").exists()){$(window).scroll(function(){CHV.obj.topBar.transparencyScrollToggle();});}
|
||||
$(document).on("click","[data-action=disconnect]",function(){var $this=$(this),connection=$this.data("connection");PF.fn.modal.confirm({message:$this.data("confirm-message"),ajax:{data:{action:'disconnect',disconnect:connection,user_id:CHV.obj.resource.user.id},deferred:{success:function(XHR){var response=XHR.responseJSON;$("[data-connection="+connection+"]").fadeOut(function(){$($("[data-connect="+connection+"]")).fadeIn();$(this).remove();if($("[data-connection]").length==0){$("[data-content=empty-message]").show();}
|
||||
@@ -67,11 +66,11 @@ if(/^image\/.*$/.test(user_avatar_file.type)==false){PF.fn.growl.call(PF.fn._s("
|
||||
if(user_avatar_file.size>CHV.obj.config.user.avatar_max_filesize.getBytes()){PF.fn.growl.call(PF.fn._s("Please select a picture of at most %s size.",CHV.obj.config.user.avatar_max_filesize));return;}
|
||||
$loading.removeClass("hidden");PF.fn.loading.inline($loading,{center:true});$this.data("uploading",true);var user_avatar_fd=new FormData();user_avatar_fd.append("source",user_avatar_file);user_avatar_fd.append("action","upload");user_avatar_fd.append("type","file");user_avatar_fd.append("what","avatar");user_avatar_fd.append("owner",CHV.obj.resource.user.id);user_avatar_fd.append("auth_token",PF.obj.config.auth_token);avatarXHR=new XMLHttpRequest();avatarXHR.open("POST",PF.obj.config.json_api,true);avatarXHR.send(user_avatar_fd);avatarXHR.onreadystatechange=function(){if(this.readyState==4){var response=this.responseType!=="json"?JSON.parse(this.response):this.response,image=response.success.image;$loading.addClass("hidden").empty();if(this.status==200){change_avatar=function(parent){$("img.user-image",parent).attr("src",image.url).removeClass("hidden").show();};hide_default=function(parent){$(".default-user-image",parent).addClass("hidden");};hide_default($parent);$(".btn-alt",$parent).closest("div").show();change_avatar($parent);if(CHV.obj.logged_user.id==CHV.obj.resource.user.id){change_avatar($top);hide_default($top);}
|
||||
PF.fn.growl.expirable(PF.fn._s("Profile image updated."));}else{PF.fn.growl.expirable(PF.fn._s("An error occurred. Please try again later."));}
|
||||
$this.data("uploading",false);}}});$(document).on("change","[data-content=user-background-upload-input]",function(e){e.preventDefault();e.stopPropagation();var $this=$(this),$parent=$("[data-content=user-background-cover]"),$src=$("[data-content=user-background-cover-src]"),$loading=$(".loading-placeholder",$parent),$top=$("#top-bar"),user_file=$(this)[0].files[0];if($this.data("uploading")){return;}
|
||||
$this.data("uploading",false);}};});$(document).on("change","[data-content=user-background-upload-input]",function(e){e.preventDefault();e.stopPropagation();var $this=$(this),$parent=$("[data-content=user-background-cover]"),$src=$("[data-content=user-background-cover-src]"),$loading=$(".loading-placeholder",$parent),$top=$("#top-bar"),user_file=$(this)[0].files[0];if($this.data("uploading")){return;}
|
||||
if(/^image\/.*$/.test(user_file.type)==false){PF.fn.growl.call(PF.fn._s("Please select a valid image file type."));return;}
|
||||
if(user_file.size>CHV.obj.config.user.background_max_filesize.getBytes()){PF.fn.growl.call(PF.fn._s("Please select a picture of at most %s size.",CHV.obj.config.user.background_max_filesize));return;}
|
||||
$loading.removeClass("hidden");PF.fn.loading.inline($loading,{center:true,size:'big',color:'#FFF'});$this.data("uploading",true);var user_picture_fd=new FormData();user_picture_fd.append("source",user_file);user_picture_fd.append("action","upload");user_picture_fd.append("type","file");user_picture_fd.append("what","background");user_picture_fd.append("owner",CHV.obj.resource.user.id);user_picture_fd.append("auth_token",PF.obj.config.auth_token);avatarXHR=new XMLHttpRequest();avatarXHR.open("POST",PF.obj.config.json_api,true);avatarXHR.send(user_picture_fd);avatarXHR.onreadystatechange=function(){if(this.readyState==4){var response=this.responseType!=="json"?JSON.parse(this.response):this.response,image=response.success.image;if(this.status==200){var $img=$("<img/>");$img.attr('src',image.url).imagesLoaded(function(){$loading.addClass("hidden").empty();$src.css("background-image","url("+image.url+")").hide().fadeIn();$("[data-content=user-change-background]",$parent).removeClass("hidden");$parent.removeClass("no-background");$("[data-content=user-upload-background]").hide();$("[data-content=user-change-background]").show();PF.fn.growl.expirable(PF.fn._s("Profile background image updated."));$img.remove();if(typeof user_background_full_fix=="function"){user_background_full_fix();}});}else{$loading.addClass("hidden").empty();PF.fn.growl.expirable(PF.fn._s("An error occurred. Please try again later."));}
|
||||
$this.data("uploading",false);}}});CHV.fn.user_background={delete:{submit:function(){PF.obj.modal.form_data={action:"delete",delete:"background",owner:CHV.obj.resource.user.id};return true;},deferred:{success:{before:function(XHR){$("[data-content=user-background-cover-src]").css("background-image","none");$("[data-content=user-background-cover]").addClass("no-background").height("");$("[data-content=user-upload-background]").removeClass("hidden").show();$("[data-content=user-change-background]").hide();$("#top-bar").removeClass("transparent background-transparent");$("#top-bar-shade").remove();},done:function(XHR){PF.fn.modal.close(function(){PF.fn.growl.expirable(PF.fn._s("Profile background image deleted."));});}},error:function(XHR){PF.fn.growl.expirable(PF.fn._s("Error deleting profile background image."));}}}};CHV.str.mainform="[data-content=main-form]";CHV.obj.timezone={'selector':"[data-content=timezone]",'input':"#timezone-region"};$(document).on("keyup change",CHV.str.mainform+" :input",function(){if($(this).is("[name=username]")){$("[data-text=username]").text($(this).val());}});$(document).on("change",CHV.obj.timezone.input,function(){var value=$(this).val(),$timezone_combo=$("#timezone-combo-"+value);$timezone_combo.find("option:first").prop("selected",true);$(CHV.obj.timezone.selector).val($timezone_combo.val()).change();});$(document).on("change","[id^=timezone-combo-]",function(){var value=$(this).val();$(CHV.obj.timezone.selector).val(value).change();});$(document).on("keyup change blur","[name^=new-password]",function(){var $new_password=$("[name=new-password]"),$new_password_confirm=$("[name=new-password-confirm]"),hide=$new_password.val()==$new_password_confirm.val(),$warning=$new_password_confirm.closest(".input-password").find(".input-warning");if($(this).is($new_password_confirm)){$new_password_confirm.data("touched",true);}
|
||||
$this.data("uploading",false);}};});CHV.fn.user_background={delete:{submit:function(){PF.obj.modal.form_data={action:"delete",delete:"background",owner:CHV.obj.resource.user.id};return true;},deferred:{success:{before:function(XHR){$("[data-content=user-background-cover-src]").css("background-image","none");$("[data-content=user-background-cover]").addClass("no-background").height("");$("[data-content=user-upload-background]").removeClass("hidden").show();$("[data-content=user-change-background]").hide();$("#top-bar").removeClass("transparent background-transparent");$("#top-bar-shade").remove();},done:function(XHR){PF.fn.modal.close(function(){PF.fn.growl.expirable(PF.fn._s("Profile background image deleted."));});}},error:function(XHR){PF.fn.growl.expirable(PF.fn._s("Error deleting profile background image."));}}}};CHV.str.mainform="[data-content=main-form]";CHV.obj.timezone={'selector':"[data-content=timezone]",'input':"#timezone-region"};$(document).on("keyup change",CHV.str.mainform+" :input",function(){if($(this).is("[name=username]")){$("[data-text=username]").text($(this).val());}});$(document).on("change",CHV.obj.timezone.input,function(){var value=$(this).val(),$timezone_combo=$("#timezone-combo-"+value);$timezone_combo.find("option:first").prop("selected",true);$(CHV.obj.timezone.selector).val($timezone_combo.val()).change();});$(document).on("change","[id^=timezone-combo-]",function(){var value=$(this).val();$(CHV.obj.timezone.selector).val(value).change();});$(document).on("keyup change blur","[name^=new-password]",function(){var $new_password=$("[name=new-password]"),$new_password_confirm=$("[name=new-password-confirm]"),hide=$new_password.val()==$new_password_confirm.val(),$warning=$new_password_confirm.closest(".input-password").find(".input-warning");if($(this).is($new_password_confirm)){$new_password_confirm.data("touched",true);}
|
||||
if($new_password_confirm.data("touched")){$warning.text(!hide?$warning.data("text"):"")[!hide?'removeClass':'addClass']('hidden-visibility');}});$(document).on("submit",CHV.obj.mainform,function(){switch($(this).data("type")){case"password":var $p1=$("[name=new-password]",this),$p2=$("[name=new-password-confirm]",this);if($p1.val()!==""||$p2.val()!==""){if($p1.val()!==$p2.val()){$p1.highlight();$p2.highlight();PF.fn.growl.expirable(PF.fn._s("Passwords don't match"));return false;}}
|
||||
break;}});$(document).on("change","[name=theme_tone]",function(){$("html")[0].className=$("html")[0].className.replace(/\btone-[\w-]+\b/g,'');$("html").addClass("tone-"+$(this).val());});$(document).on("change","[name=theme_top_bar_color]",function(){$("#top-bar, .top-bar").removeClass("black white").addClass($(this).val());});$(document).on("click","[data-action=check-for-updates]",function(){PF.fn.loading.fullscreen();CHV.fn.system.checkUpdates(function(XHR){PF.fn.loading.destroy("fullscreen");if(XHR.status!==200){PF.fn.growl.call(PF.fn._s("An error occurred. Please try again later."));return;}
|
||||
var data=XHR.responseJSON.software;if(PF.fn.versionCompare(CHV.obj.system_info.version,data.current_version)==-1){PF.fn.modal.simple({title:PF.fn._s("Update available v%s",data.current_version),message:'<p>'+PF.fn._s('There is an update available for your system. You can automatic download and install this update or go to %s to proceed to download the file.','<a href="'+CHEVERETO.source.url+'" target="_blank">'+CHEVERETO.source.label+'</a>')+'<p>'+PF.fn._s('The release notes for this update are:')+'</p>'+'<textarea class="r4 resize-vertical">'+data.release_notes+'</textarea>'+'<div class="btn-container margin-bottom-0"><a href="'+PF.obj.config.base_url+'/update'+'" class="btn btn-input default">'+PF.fn._s('Update now')+'</a> <span class="btn-alt">'+PF.fn._s('or')+' <a data-action="cancel">'+PF.fn._s('cancel')+'</a></span></div>',html:true});}else{PF.fn.growl.call(PF.fn._s("Your website is running the latest version of %s",CHEVERETO.edition));}});});if(typeof PF.fn.get_url_var("checkUpdates")!==typeof undefined){$("[data-action=check-for-updates]").click();}
|
||||
@@ -87,10 +86,8 @@ $object.attr("data-followed",followed?0:1);});});function notifications_scroll()
|
||||
$(document).on("click","[data-action=top-bar-notifications]",function(e){var _this=this;var $this=$(this);var $container=$(".top-bar-notifications-container",$this);var $list=$(".top-bar-notifications-list",$this);var $ul=$("ul",$list);var $loading=$(".loading",$container);if($this.data("XHR")){return;}else{$loading.removeClass("hidden");PF.fn.loading.inline($loading,{size:"small",message:PF.fn._s("loading")});}
|
||||
$.ajax({data:{action:"notifications"},cache:false}).complete(function(XHR){var response=XHR.responseJSON;if(response.status_code!==200){PF.fn.growl.expirable(PF.fn._s("An error occurred. Please try again later."));$this.data("XHR",false);$loading.addClass("hidden").html("");return;}
|
||||
$this.data("XHR",true);$loading.remove();if(!response.html){$(".empty",$container).removeClass("hidden");return;}
|
||||
$list.removeClass("hidden");$ul.html(response.html);notifications_scroll();var $li=$("li.new",$ul);$li.addClass("transition");setTimeout(function(){$li.removeClass("new");$("[data-content=notifications-counter]",_this).removeClass("on").html("0");setTimeout(function(){$li.removeClass("transition");},150);},1500);})});if($("#g-recaptcha").is(':empty')&&CHV.obj.config.recaptcha.enabled&&CHV.obj.config.recaptcha.sitekey){reCaptchaCallback=function(){grecaptcha.render("g-recaptcha",{"sitekey":CHV.obj.config.recaptcha.sitekey});}
|
||||
$.getScript("https://www.google.com/recaptcha/api.js?onload=reCaptchaCallback&render=explicit");}
|
||||
$(document).on("click",".list-item a.image-container",function(e){var $parent=$(this).closest(".list-item");var $loadBtn=$parent.find("[data-action=load-image]");if($loadBtn.length>0){loadImageListing($loadBtn)
|
||||
e.preventDefault();}
|
||||
$list.removeClass("hidden");$ul.html(response.html);notifications_scroll();var $li=$("li.new",$ul);$li.addClass("transition");setTimeout(function(){$li.removeClass("new");$("[data-content=notifications-counter]",_this).removeClass("on").html("0");setTimeout(function(){$li.removeClass("transition");},150);},1500);});});if($("#g-recaptcha").is(':empty')&&CHV.obj.config.recaptcha.enabled&&CHV.obj.config.recaptcha.sitekey){reCaptchaCallback=function(){grecaptcha.render("g-recaptcha",{sitekey:CHV.obj.config.recaptcha.sitekey,});};$.getScript("https://www.google.com/recaptcha/api.js?onload=reCaptchaCallback&render=explicit");}
|
||||
$(document).on("click",".list-item a.image-container",function(e){var $parent=$(this).closest(".list-item");var $loadBtn=$parent.find("[data-action=load-image]");if($loadBtn.length>0){loadImageListing($loadBtn);e.preventDefault();}
|
||||
return;});$(document).on("click",".list-item [data-action=load-image]",function(e){loadImageListing($(this));e.preventDefault();e.stopPropagation();return;});function loadImageListing($this){$this.addClass("list-item-play-gif--loading");var $parent=$this.closest(".list-item");var $imageContainer=$(".image-container",$parent);var $image=$("img",$imageContainer);var md=".md";var imageSrc=$image.attr("src");var mdIndex=imageSrc.lastIndexOf(md);var loadSrc=imageSrc.substr(0,mdIndex)+imageSrc.substr(mdIndex+md.length,imageSrc.length);$imageContainer.append($imageContainer.html());$load=$parent.find(".image-container img").eq(1).attr("src",loadSrc).addClass("hidden");$load.imagesLoaded(function(){$this.remove();$image.remove();$(this.elements).removeClass("hidden");});}
|
||||
$(document).on("click","#album [data-tab=tab-codes]",function(){if(!PF.fn.is_user_logged()){return;}
|
||||
var $loading=$(".content-listing-loading","#tab-codes");if(!$loading.exists()){return;}
|
||||
@@ -107,23 +104,22 @@ var shade_target_opacity=1;if($("body").hasClass("landing")||$("body").hasClass(
|
||||
if(PF.fn.isDevice("phone")){$("#top-bar-shade").css({opacity:shade_target_opacity});}else{$("#top-bar-shade").animate({opacity:shade_target_opacity},animation.time/2,animation.easing);}
|
||||
$(".current[data-nav]",".top-bar").each(function(){if($(this).is("[data-action=top-bar-menu-full]"))return;$(this).removeClass("current").attr("data-current",1);});$(CHV.fn.uploader.selectors.root).removeClass("hidden-visibility").css({visibility:"visible",top:"-"+uploadBoxHeight});if(PF.fn.isDevice("mobile")){var $upload_heading=$(".upload-box-heading",$(CHV.fn.uploader.selectors.root));$upload_heading.css({position:"relative",top:0.5*($(window).height()-$upload_heading.height())+"px"});}
|
||||
$(CHV.fn.uploader.selectors.root).css({transform:"translate(0,"+animation.core+")"});CHV.fn.uploader.focus(function(){setTimeout(function(){callbacks();if(PF.fn.isDevice(["phone","phablet"])){$("html").addClass("overflow-hidden");}},animation.time);});}else{$("[data-nav][data-current=1]",".top-bar").each(function(){$(this).addClass("current");});var fade_slim_shady=function(){if(PF.fn.isDevice("phone")){$("#top-bar-shade").remove();return;}
|
||||
$("#top-bar-shade").animate({opacity:0},animation.time,animation.easing,function(){if(!is_slim_shady){$(this).remove();}});}
|
||||
if(!$("#top-bar").hasClass("transparent")){fade_slim_shady()}
|
||||
$(CHV.fn.uploader.selectors.fullscreen_mask).css({opacity:0});setTimeout(function(){$(CHV.fn.uploader.selectors.fullscreen_mask).remove();if($("html").data("followed-scroll")){$("html").addClass("followed-scroll");}},250);var _uploadBoxHeight=$(CHV.fn.uploader.selectors.root).outerHeight();var _uploadBoxPush=(_uploadBoxHeight-parseInt($(CHV.fn.uploader.selectors.root).data("initial-height")))+"px";$(CHV.fn.uploader.selectors.root).css({transform:"translate(0,-"+_uploadBoxPush+")"});setTimeout(function(){$("#top-bar").attr("class",$("#top-bar").data("stock_classes"));$("html").removeClass(($(".follow-scroll-wrapper.position-fixed").exists()?"":"top-bar-box-shadow-none"));},animation.time*1/3);setTimeout(function(){$(CHV.fn.uploader.selectors.root).css({top:""});if($("#top-bar-shade").exists()){fade_slim_shady()}
|
||||
$("#top-bar-shade").animate({opacity:0},animation.time,animation.easing,function(){if(!is_slim_shady){$(this).remove();}});};if(!$("#top-bar").hasClass("transparent")){fade_slim_shady();}
|
||||
$(CHV.fn.uploader.selectors.fullscreen_mask).css({opacity:0});setTimeout(function(){$(CHV.fn.uploader.selectors.fullscreen_mask).remove();if($("html").data("followed-scroll")){$("html").addClass("followed-scroll");}},250);var _uploadBoxHeight=$(CHV.fn.uploader.selectors.root).outerHeight();var _uploadBoxPush=(_uploadBoxHeight-parseInt($(CHV.fn.uploader.selectors.root).data("initial-height")))+"px";$(CHV.fn.uploader.selectors.root).css({transform:"translate(0,-"+_uploadBoxPush+")"});setTimeout(function(){$("#top-bar").attr("class",$("#top-bar").data("stock_classes"));$("html").removeClass(($(".follow-scroll-wrapper.position-fixed").exists()?"":"top-bar-box-shadow-none"));},animation.time*1/3);setTimeout(function(){$(CHV.fn.uploader.selectors.root).css({top:""});if($("#top-bar-shade").exists()){fade_slim_shady();}
|
||||
if($("body#image").exists()){CHV.obj.topBar.transparencyScrollToggle();}
|
||||
callbacks();$("html").removeClass("overflow-hidden").data({"top-bar-box-shadow-prevent":false});},animation.time);}
|
||||
$(CHV.fn.uploader.selectors.root).data("shown",show);$switch.toggleClass("current").removeClass("opened");},reset:function(){$.extend(this,$.extend(true,{},CHV.obj.uploaderReset));$("li",this.selectors.queue).remove();$(this.selectors.anywhere).height("").css({"overflow-y":"","overflow-x":""});$(this.selectors.queue).removeClass(this.selectors.queue_complete.substring(1));$("[data-group=upload-result] textarea",this.selectors.anywhere).prop("value","");$.each(['upload-queue-ready','uploading','upload-result','upload-queue-ready','upload-queue'],function(i,v){$("[data-group="+v+"]").hide();});$("[data-group=upload]",this.selectors.anywhere).show();$("[name=upload-category-id]",this.selectors.root).val("");$("[name=upload-nsfw]",this.selectors.root).prop("checked",this.defaultChecked);$(this.selectors.close_cancel,this.selectors.anywhere).hide().each(function(){if($(this).data("action")=="close-upload")$(this).show();});this.boxSizer(true);},focus:function(callback){if($(this.selectors.fullscreen_mask).exists())return;$("body").append($("<div/>",{id:(this.selectors.fullscreen_mask.replace("#","")),class:"fullscreen soft-black",}).css({top:PF.fn.isDevice("phone")?0:$(CHV.fn.uploader.selectors.root).data("top")}));setTimeout(function(){$(CHV.fn.uploader.selectors.fullscreen_mask).css({opacity:1})
|
||||
setTimeout(function(){if(typeof callback=="function"){callback();}},PF.fn.isDevice(["phone","phablet"])?0:250);},1);},boxSizer:function(forced){if($(this.selectors.root).css("visibility")=="visible"){$("html")[(PF.fn.isDevice(["phone","phablet"])?"add":"remove")+"Class"]("overflow-hidden");}
|
||||
$(CHV.fn.uploader.selectors.root).data("shown",show);$switch.toggleClass("current").removeClass("opened");},reset:function(){$.extend(this,$.extend(true,{},CHV.obj.uploaderReset));$("li",this.selectors.queue).remove();$(this.selectors.anywhere).height("").css({"overflow-y":"","overflow-x":""});$(this.selectors.queue).removeClass(this.selectors.queue_complete.substring(1));$("[data-group=upload-result] textarea",this.selectors.anywhere).prop("value","");$.each(['upload-queue-ready','uploading','upload-result','upload-queue-ready','upload-queue'],function(i,v){$("[data-group="+v+"]").hide();});$("[data-group=upload]",this.selectors.anywhere).show();$("[name=upload-category-id]",this.selectors.root).val("");$("[name=upload-nsfw]",this.selectors.root).prop("checked",this.defaultChecked);$(this.selectors.close_cancel,this.selectors.anywhere).hide().each(function(){if($(this).data("action")=="close-upload")$(this).show();});this.boxSizer(true);},focus:function(callback){if($(this.selectors.fullscreen_mask).exists())return;$("body").append($("<div/>",{id:(this.selectors.fullscreen_mask.replace("#","")),class:"fullscreen soft-black",}).css({top:PF.fn.isDevice("phone")?0:$(CHV.fn.uploader.selectors.root).data("top")}));setTimeout(function(){$(CHV.fn.uploader.selectors.fullscreen_mask).css({opacity:1});setTimeout(function(){if(typeof callback=="function"){callback();}},PF.fn.isDevice(["phone","phablet"])?0:250);},1);},boxSizer:function(forced){if($(this.selectors.root).css("visibility")=="visible"){$("html")[(PF.fn.isDevice(["phone","phablet"])?"add":"remove")+"Class"]("overflow-hidden");}
|
||||
var doit=$(this.selectors.root).css("visibility")=="visible"||forced;if(!doit)return;$(this.selectors.root).height("");if($(this.selectors.root).height()+$("#top-bar").outerHeight(true)>$(window).height()){$(this.selectors.root).height($(window).height()-$("#top-bar").outerHeight(true)).css({"overflow-y":"scroll","overflow-x":"auto"});$("body").addClass("overflow-hidden");}else{$(this.selectors.root).css("overflow-y","");$("body").removeClass("overflow-hidden");}},pasteURL:function(){var urlvalues=$("[name=urls]","#fullscreen-modal").val();if(urlvalues){CHV.fn.uploader.add({},urlvalues);}},pasteImageHandler:function(e){if($(e.target).is(":input")){return;}
|
||||
if(typeof e.clipboardData!==typeof undefined&&e.clipboardData.items){var items=e.clipboardData.items;}else{setTimeout(function(){e.clipboardData={};e.clipboardData.items=[];$.each($("img",CHV.fn.uploader.$pasteCatcher),function(i,v){e.clipboardData.items.push(PF.fn.dataURItoBlob($(this).attr("src")));});$(CHV.fn.uploader.selectors.paste).html("");return CHV.fn.uploader.pasteImageHandler(e);},1);}
|
||||
if(items){for(var i=0;i<items.length;i++){if(items[i].type.indexOf("image")!==-1){var file=items[i]instanceof Blob?items[i]:items[i].getAsFile();var reader=new FileReader();reader.onload=function(evt){var uploaderIsVisible=$(CHV.fn.uploader.selectors.root).data("shown");file.name=PF.fn._s('Clipboard image')+' '+PF.fn.getDateTime();var file_evt={originalEvent:{dataTransfer:{files:[file]},preventDefault:function(){},stopPropagation:function(){},clipboard:true,dataURL:evt.target.result,name:file.name}};if(!uploaderIsVisible){CHV.fn.uploader.toggle({callback:function(){CHV.fn.uploader.add(file_evt);}});}else{CHV.fn.uploader.add(file_evt);}};reader.readAsDataURL(file);}}}},add:function(e,urls){var md5;if(!this.canAdd){var e=e.originalEvent;e.preventDefault();e.stopPropagation();return false;};$fileinput=$(this.selectors.file);$fileinput.replaceWith($fileinput=$fileinput.clone(true));var item_queue_template=$(this.selectors.upload_item_template).html();var files=[];if(typeof urls==typeof undefined){var e=e.originalEvent;e.preventDefault();e.stopPropagation();files=e.dataTransfer||e.target;files=$.makeArray(files.files);if(e.clipboard){md5=PF.fn.md5(e.dataURL);if($.inArray(md5,this.clipboardImages)!=-1){return null;}
|
||||
if(items){for(var i=0;i<items.length;i++){if(items[i].type.indexOf("image")!==-1){var file=items[i]instanceof Blob?items[i]:items[i].getAsFile();var reader=new FileReader();reader.onload=function(evt){var uploaderIsVisible=$(CHV.fn.uploader.selectors.root).data("shown");file.name=PF.fn._s('Clipboard image')+' '+PF.fn.getDateTime();var file_evt={originalEvent:{dataTransfer:{files:[file]},preventDefault:function(){},stopPropagation:function(){},clipboard:true,dataURL:evt.target.result,name:file.name}};if(!uploaderIsVisible){CHV.fn.uploader.toggle({callback:function(){CHV.fn.uploader.add(file_evt);}});}else{CHV.fn.uploader.add(file_evt);}};reader.readAsDataURL(file);}}}},add:function(e,urls){var md5;if(!this.canAdd){var e=e.originalEvent;e.preventDefault();e.stopPropagation();return false;}
|
||||
$fileinput=$(this.selectors.file);$fileinput.replaceWith($fileinput=$fileinput.clone(true));var item_queue_template=$(this.selectors.upload_item_template).html();var files=[];if(typeof urls==typeof undefined){var e=e.originalEvent;e.preventDefault();e.stopPropagation();files=e.dataTransfer||e.target;files=$.makeArray(files.files);if(e.clipboard){md5=PF.fn.md5(e.dataURL);if($.inArray(md5,this.clipboardImages)!=-1){return null;}
|
||||
this.clipboardImages.push(md5);}
|
||||
var failed_files=[];for(var i=0;i<files.length;i++){var file=files[i];var image_type_str;if(typeof file.type=="undefined"||file.type==""){image_type_str=file.name.substr(file.name.lastIndexOf('.')+1).toLowerCase();}else{image_type_str=file.type.replace("image/","");}
|
||||
if(file.size>CHV.obj.config.image.max_filesize.getBytes()){failed_files.push({uid:i,name:file.name.truncate_middle()+" - "+PF.fn._s("File too big.")});continue;}
|
||||
if(CHV.obj.config.upload.image_types.indexOf(image_type_str)==-1&&/android/i.test(navigator.userAgent)==false){failed_files.push({uid:i,name:file.name.truncate_middle()+" - "+PF.fn._s("Invalid or unsupported file format.")});continue;}
|
||||
if(md5){file.md5=md5;}
|
||||
file.fromClipboard=e.clipboard==true;file.uid=i;}
|
||||
for(var i=0;i<failed_files.length;i++){var failed_file=failed_files[i];files.splice(failed_file.id,1)}
|
||||
for(var i=0;i<failed_files.length;i++){var failed_file=failed_files[i];files.splice(failed_file.id,1);}
|
||||
if(failed_files.length>0&&files.length==0){var failed_message='';for(var i=0;i<failed_files.length;i++){failed_message+="<li>"+failed_files[i].name+"</li>";}
|
||||
PF.fn.modal.simple({title:PF.fn._s("Some files couldn't be added"),message:"<ul>"+"<li>"+failed_message+"</ul>"});return;}
|
||||
if(files.length==0){return;}}else{urls=urls.replace(/(<([^>]+)>)/g,'').replace(/(\[([^\]]+)\])/g,'');files=urls.match_urls();if(!files)return;files=files.array_unique();files=$.map(files,function(file,i){return{uid:i,name:file,url:file};});}
|
||||
@@ -134,15 +130,14 @@ $(this.selectors.queue,this.selectors.root).append(item_queue_template.repeat(fi
|
||||
if(!(i in files)){return;}
|
||||
var file=files[i];$(CHV.fn.uploader.selectors.queue_item+":not([data-id]) .load-url",CHV.fn.uploader.selectors.queue)[typeof file.url!=="undefined"?"show":"remove"]();loadImage.parseMetaData(file.url?file.url:file,function(data){$(CHV.fn.uploader.selectors.queue_item+":not([data-id]) .preview:empty",CHV.fn.uploader.selectors.queue).first().closest("li").attr("data-id",file.uid);loadImage(file.url?file.url:file,function(img){++j;var $queue_item=$(CHV.fn.uploader.selectors.queue_item+"[data-id="+(file.uid)+"]",CHV.fn.uploader.selectors.queue);if(img.type==="error"){failed_files.push({id:file.uid,name:file.name.truncate_middle()});}else{if(!$("[data-group=upload-queue]",CHV.fn.uploader.selectors.root).is(":visible")){$("[data-group=upload-queue]",CHV.fn.uploader.selectors.root).css("display","block");}
|
||||
var mimetype="image/jpeg";if(typeof data.buffer!==typeof undefined){var buffer=(new Uint8Array(data.buffer)).subarray(0,4);var header="";for(var i=0;i<buffer.length;i++){header+=buffer[i].toString(16);}
|
||||
var header_to_mime={'89504e47':'image/png','47494638':'image/gif','ffd8ffe0':'image/jpeg',}
|
||||
$.each(['ffd8ffe1','ffd8ffe2'],function(i,v){header_to_mime[v]=header_to_mime['ffd8ffe0'];});if(typeof header_to_mime[header]!==typeof undefined){mimetype=header_to_mime[header];}}
|
||||
var header_to_mime={'89504e47':'image/png','47494638':'image/gif','ffd8ffe0':'image/jpeg',};$.each(['ffd8ffe1','ffd8ffe2'],function(i,v){header_to_mime[v]=header_to_mime['ffd8ffe0'];});if(typeof header_to_mime[header]!==typeof undefined){mimetype=header_to_mime[header];}}
|
||||
var title=null;if(typeof file.name!==typeof undefined){var basename=PF.fn.baseName(file.name);title=$.trim(basename.substring(0,100).capitalizeFirstLetter());}
|
||||
CHV.fn.uploader.files[file.uid].parsedMeta={title:title,width:img.originalWidth,height:img.originalHeight,mimetype:mimetype,};$queue_item.show();$("[data-group=upload-queue-ready]",CHV.fn.uploader.selectors.root).show();$("[data-group=upload]",CHV.fn.uploader.selectors.root).hide();$queue_item.find(".load-url").remove();$queue_item.find(".preview").removeClass("soft-hidden").show().append(img);$img=$queue_item.find(".preview").find("img,canvas");$img.attr("class","canvas");queue_item_h=$queue_item.height();queue_item_w=$queue_item.width();var img_w=parseInt($img.attr("width"))||$img.width();var img_h=parseInt($img.attr("height"))||$img.height();var img_r=img_w/img_h;$img.hide();if(img_w>img_h||img_w==img_h){var queue_img_h=img_h<queue_item_h?img_h:queue_item_h;if(img_w>img_h){$img.height(queue_img_h).width(queue_img_h*img_r);}}
|
||||
if(img_w<img_h||img_w==img_h){var queue_img_w=img_w<queue_item_w?img_w:queue_item_w;if(img_w<img_h){$img.width(queue_img_w).height(queue_img_w/img_r);}}
|
||||
if(img_w==img_h){$img.height(queue_img_h).width(queue_img_w);}
|
||||
$img.css({marginTop:-$img.height()/2,marginLeft:-$img.width()/2}).show();CHV.fn.uploader.boxSizer();}
|
||||
if(j==files.length){if(typeof failed_before!=="undefined"){failed_files=failed_files.concat(failed_before);}
|
||||
PF.fn.loading.destroy("fullscreen");if(failed_files.length>0){var failed_message="";for(var i=0;i<failed_files.length;i++){failed_message+="<li>"+failed_files[i].name+"</li>";delete CHV.fn.uploader.files[failed_files[i].uid];$("li[data-id="+failed_files[i].uid+"]",CHV.fn.uploader.selectors.queue).find("[data-action=cancel]").click()}
|
||||
PF.fn.loading.destroy("fullscreen");if(failed_files.length>0){var failed_message="";for(var i=0;i<failed_files.length;i++){failed_message+="<li>"+failed_files[i].name+"</li>";delete CHV.fn.uploader.files[failed_files[i].uid];$("li[data-id="+failed_files[i].uid+"]",CHV.fn.uploader.selectors.queue).find("[data-action=cancel]").click();}
|
||||
PF.fn.modal.simple({title:PF.fn._s("Some files couldn't be added"),message:'<ul>'+failed_message+'</ul>'});}else{CHV.fn.uploader.focus();}
|
||||
CHV.fn.uploader.boxSizer();}},$.extend({},default_options,{orientation:data.exif?data.exif.get("Orientation"):1}));setTimeout(function(){CHVLoadImage(i+1);},25);});}
|
||||
PF.fn.loading.fullscreen();CHVLoadImage();},queueSize:function(){$("[data-text=queue-objects]",this.selectors.root).text(PF.fn._n("image","images",Object.size(this.files)));$("[data-text=queue-size]",this.selectors.root).text(Object.size(this.files));},queueProgress:function(e,id){var queue_size=Object.size(this.files);this.files[id].progress=e.loaded / e.total;var progress=0;for(var i=0;i<queue_size;i++){if(typeof this.files[i]==typeof undefined||!('progress'in this.files[i]))continue;progress+=this.files[i].progress;}
|
||||
@@ -152,10 +147,11 @@ var self=this;this.uploadParsedIds.push(id);var f=this.files[id];var queue_is_ur
|
||||
return;}
|
||||
$(this.selectors.close_cancel,this.selectors.root).hide().each(function(){if($(this).data("action")=="cancel-upload")$(this).show();});this.uploadThreads+=1;if(this.uploadThreads<CHV.obj.config.upload.threads&&nextId){this.upload($queue_item.next());}
|
||||
this.isUploading=true;var form=new FormData();var formData={source:null,type:queue_is_url?"url":"file",action:"upload",privacy:$("[data-privacy]",this.selectors.root).first().data("privacy"),timestamp:this.timestamp,auth_token:PF.obj.config.auth_token,category_id:$("[name=upload-category-id]",this.selectors.root).val()||null,nsfw:$("[name=upload-nsfw]",this.selectors.root).prop("checked")?1:0};if(queue_is_url){formData.source=source;}else{form.append("source",source,f.name);}
|
||||
if(hasForm){$.each(f.formValues,function(i,v){formData[i.replace(/image_/g,"")]=v;});};$.each(formData,function(i,v){form.append(i,v);});this.files[id].xhr=new XMLHttpRequest();$queue_item.removeClass("waiting");if(!queue_is_url){this.files[id].xhr.upload.onprogress=function(e){if(e.lengthComputable){CHV.fn.uploader.queueProgress(e,id);percentComplete=parseInt((e.loaded / e.total)*100);$(CHV.fn.uploader.selectors.item_progress_percent,$queue_item).text(percentComplete);$(CHV.fn.uploader.selectors.item_progress_bar,$queue_item).width(100-percentComplete+"%");if(percentComplete==100){$(CHV.fn.uploader.selectors.item_progress_percent,$queue_item).text("");CHV.fn.uploader.itemLoading($queue_item);}}}}else{this.queueSize();this.queueProgress({loaded:1,total:1},id);this.itemLoading($queue_item);}
|
||||
if(hasForm){$.each(f.formValues,function(i,v){formData[i.replace(/image_/g,"")]=v;});}
|
||||
$.each(formData,function(i,v){form.append(i,v);});this.files[id].xhr=new XMLHttpRequest();$queue_item.removeClass("waiting");if(!queue_is_url){this.files[id].xhr.upload.onprogress=function(e){if(e.lengthComputable){CHV.fn.uploader.queueProgress(e,id);percentComplete=parseInt((e.loaded / e.total)*100);$(CHV.fn.uploader.selectors.item_progress_percent,$queue_item).text(percentComplete);$(CHV.fn.uploader.selectors.item_progress_bar,$queue_item).width(100-percentComplete+"%");if(percentComplete==100){$(CHV.fn.uploader.selectors.item_progress_percent,$queue_item).text("");CHV.fn.uploader.itemLoading($queue_item);}}};}else{this.queueSize();this.queueProgress({loaded:1,total:1},id);this.itemLoading($queue_item);}
|
||||
this.files[id].xhr.onreadystatechange=function(){var is_error=false;if(this.readyState==4&&typeof CHV.fn.uploader.files[id].xhr!=="undefined"&&CHV.fn.uploader.files[id].xhr.status!==0){self.uploadProcessedIds.push(id);self.uploadThreads-=1;$(".loading-indicator",$queue_item).remove();$queue_item.removeClass("waiting uploading");try{var JSONresponse=this.responseType!=="json"?JSON.parse(this.response):this.response;if(typeof JSONresponse!=="undefined"&&this.status==200){$("[data-group=image-link]",$queue_item).attr("href",JSONresponse.image.url_viewer);}else{if(JSONresponse.error.context=="PDOException"){JSONresponse.error.message="Database error";}
|
||||
JSONresponse.error.message=CHV.fn.uploader.files[id].name.truncate_middle()+" - "+JSONresponse.error.message;}
|
||||
CHV.fn.uploader.results[this.status==200?"success":"error"][id]=JSONresponse;if(this.status!==200)is_error=true;}catch(err){is_error=true;var err_handle;if(typeof JSONresponse=="undefined"){err_handle={status:500,statusText:"Internal server error"}}else{err_handle={status:400,statusText:JSONresponse.error.message}}
|
||||
CHV.fn.uploader.results[this.status==200?"success":"error"][id]=JSONresponse;if(this.status!==200)is_error=true;}catch(err){is_error=true;var err_handle;if(typeof JSONresponse=="undefined"){err_handle={status:500,statusText:"Internal server error"};}else{err_handle={status:400,statusText:JSONresponse.error.message};}
|
||||
JSONresponse={status_code:err_handle.status,error:{message:CHV.fn.uploader.files[id].name.truncate_middle()+" - Server error ("+err_handle.statusText+")",code:err_handle.status,context:"XMLHttpRequest"},status_txt:err_handle.statusText};CHV.fn.uploader.results.error[Object.size(CHV.fn.uploader.results.error)+1]=JSONresponse;console.log("server error",JSONresponse);}
|
||||
$queue_item.addClass(!is_error?"completed":"failed");if(typeof JSONresponse.error!=="undefined"&&typeof JSONresponse.error.message!=="undefined"){$queue_item.attr("rel","tooltip").data("tiptip","top").attr("title",JSONresponse.error.message);PF.fn.bindtipTip($queue_item);}
|
||||
if(self.uploadThreads<CHV.obj.config.upload.threads&&nextId){CHV.fn.uploader.upload($queue_item.next());$(CHV.fn.uploader.selectors.close_cancel,CHV.fn.uploader.selectors.root).hide().each(function(){if($(this).data("action")=="cancel-upload-remaining"){$(this).show();}});}
|
||||
@@ -182,7 +178,7 @@ return true;};CHV.fn.complete_image_edit={success:function(XHR){var response=XHR
|
||||
CHV.fn.resource_privacy_toggle(response.album.privacy);$.each(["description","title"],function(i,v){var $obj=$("[data-text=image-"+v+"]");$obj.html(PF.fn.nl2br(PF.fn.htmlEncode(response[v])));if($obj.html()!==""){$obj.show();}});CHV.fn.common.updateDoctitle(response.title);PF.fn.growl.expirable(PF.fn._s("Image edited successfully."));CHV.fn.list_editor.addAlbumtoModals(response.album);var $modal=$("[data-submit-fn='CHV.fn.submit_image_edit']");$.each(["description","name","password"],function(i,v){var $input=$("[name=form-album-"+v+"]",$modal);if($input.is("textarea")){$input.val("").html("");}else{$input.val("").attr("value","");}});$("[name=form-privacy] option",$modal).each(function(){$(this).removeAttr("selected");});$("[data-combo-value=password]",$modal).hide();$("[name=form-album-id]",$modal).find("option").removeAttr("selected");$("[name=form-album-id]",$modal).find("[value="+response.album.id_encoded+"]").attr("selected",true);}};CHV.fn.before_album_edit=function(e){var modal_source="[data-before-fn='CHV.fn.before_album_edit']";$("[data-action=album-switch]",modal_source).remove();};CHV.fn.submit_album_edit=function(){var $modal=$(PF.obj.modal.selectors.root);if(!$("[name=form-album-name]",$modal).val()){PF.fn.growl.call(PF.fn._s("You must enter the album name."));$("[name=form-album-name]",$modal).highlight();return false;}
|
||||
PF.obj.modal.form_data={action:"edit",edit:"album",editing:{id:CHV.obj.resource.id,name:$("[name=form-album-name]",$modal).val(),privacy:$("[name=form-privacy]",$modal).val(),description:$("[name=form-album-description]",$modal).val()}};if(PF.obj.modal.form_data.editing.privacy=="password"){PF.obj.modal.form_data.editing.password=$("[name=form-album-password]",$modal).val();}
|
||||
return true;};CHV.fn.complete_album_edit={success:function(XHR){var album=XHR.responseJSON.album;$("[data-text=album-name]").html(PF.fn.htmlEncode(album.name));$("[data-text=album-description]").html(PF.fn.htmlEncode(album.description));CHV.fn.resource_privacy_toggle(album.privacy);var stock=CHV.obj.resource.type;CHV.obj.resource.type=null;CHV.fn.list_editor.updateItem($(".list-item"),XHR.responseJSON);CHV.obj.resource.type=stock;$("[data-modal]").each(function(){$("option[value="+album.id_encoded+"]",this).text(album.name+(album.privacy!=="public"?' ('+PF.fn._s("private")+')':''));});CHV.fn.common.updateDoctitle(album.name);PF.fn.growl.expirable(PF.fn._s("Album edited successfully."));}};CHV.fn.category={formFields:["id","name","url_key","description"],validateForm:function(id){var modal=PF.obj.modal.selectors.root,submit=true,used_url_key=false;if(!CHV.fn.common.validateForm(modal)){return false;}
|
||||
if(/^[-\w]+$/.test($("[name=form-category-url_key]",modal).val())==false){PF.fn.growl.call(PF.fn._s("Invalid URL key."));$("[name=form-category-url_key]",modal).highlight();return false;}
|
||||
if(/^[-\w]+$/.test($("[name=form-category-url_key]",modal).val())===false){PF.fn.growl.call(PF.fn._s("Invalid URL key."));$("[name=form-category-url_key]",modal).highlight();return false;}
|
||||
if(Object.size(CHV.obj.categories)>0){$.each(CHV.obj.categories,function(i,v){if(typeof id!=="undefined"&&v.id==id)return true;if(v.url_key==$("[name=form-category-url_key]",modal).val()){used_url_key=true;return false;}});}
|
||||
if(used_url_key){PF.fn.growl.call(PF.fn._s("Category URL key already being used."));$("[name=form-category-url_key]",modal).highlight();return false;}
|
||||
return true;},edit:{before:function(e){var $this=$(e.target),id=$this.data("category-id"),category=CHV.obj.categories[id],modal_source="[data-modal="+$this.data("target")+"]";$.each(CHV.fn.category.formFields,function(i,v){var i="form-category-"+v,v=category[v],$input=$("[name="+i+"]",modal_source);if($input.is("textarea")){$input.html(PF.fn.htmlEncode(v));}else{$input.attr("value",v);}});},submit:function(){var modal=PF.obj.modal.selectors.root,id=$("[name=form-category-id]",modal).val();if(!CHV.fn.category.validateForm(id)){return false;}
|
||||
@@ -206,12 +202,12 @@ PF.fn.loading.fullscreen();$.ajax({data:data}).always(function(data,status,XHR){
|
||||
var storage=data.storage;CHV.obj.storages[storage.id]=storage;PF.fn.growl.expirable(PF.fn._s("Storage successfully edited."));switch(string){case"https":$("[data-content=storage-url]",$root).html(storage.url);break;}
|
||||
CHV.fn.storage.toggleBoolDisplay($el,toggle);CHV.fn.queuePixel();});},edit:{before:function(e){var $this=$(e.target),id=$this.data("storage-id"),storage=CHV.obj.storages[id],modal_source="[data-modal="+$this.data("target")+"]",combo="[data-combo-value~="+storage['api_id']+"]";$.each(CHV.fn.storage.formFields,function(i,v){var i="form-storage-"+v,v=storage[v],$combo_input=$(combo+" [name="+i+"]",modal_source),$global_input=$("[name="+i+"]",modal_source),$input=$combo_input.exists()?$combo_input:$global_input;if($input.is("textarea")){$input.html(PF.fn.htmlEncode(v));}else if($input.is("select")){$("option",$input).removeAttr("selected");$("option",$input).each(function(){if($(this).attr("value")==v){$(this).attr("selected","selected");return false;}});}else{if($input.is("[name=form-storage-capacity]")&&typeof v!=="undefined"&&v>0){v=v.formatBytes(2);}
|
||||
$input.attr("value",v);}});$("[data-combo-value]").addClass("soft-hidden");$(combo).removeClass("soft-hidden");},submit:function(){var modal=PF.obj.modal.selectors.root,id=$("[name=form-storage-id]",modal).val(),used_url_key=false;if(!CHV.fn.storage.validateForm()){return false;}
|
||||
PF.obj.modal.form_data={action:"edit",edit:"storage",editing:{}};$.each(CHV.fn.storage.formFields,function(i,v){var sel;sel="[name=form-storage-"+v+"]";if($(sel,modal).attr("type")!=="hidden"){sel+=":visible"}
|
||||
PF.obj.modal.form_data={action:"edit",edit:"storage",editing:{}};$.each(CHV.fn.storage.formFields,function(i,v){var sel;sel="[name=form-storage-"+v+"]";if($(sel,modal).attr("type")!=="hidden"){sel+=":visible";}
|
||||
PF.obj.modal.form_data.editing[v]=$(sel,modal).val();});return true;},complete:{success:function(XHR){var storage=XHR.responseJSON.storage,parent="[data-content=storage][data-storage-id="+storage.id+"]",$el=$("[data-action=toggle-storage-https]",parent);$.each(storage,function(i,v){$("[data-content=storage-"+i+"]",parent).html(PF.fn.htmlEncode(v));});CHV.obj.storages[storage.id]=storage;CHV.fn.storage.toggleBoolDisplay($el,storage['is_https']==1);CHV.fn.queuePixel();},error:function(XHR){var response=XHR.responseJSON,message=response.error.message;PF.fn.growl.call(message);}}},add:{submit:function(){if(!CHV.fn.storage.validateForm()){return false;}
|
||||
var modal=PF.obj.modal.selectors.root;PF.obj.modal.form_data={action:"add-storage",storage:{}};$.each(CHV.fn.storage.formFields,function(i,v){if(v=="id")return;var sel;sel="[name=form-storage-"+v+"]";if($(sel,modal).attr("type")!=="hidden"){sel+=":visible"}
|
||||
var modal=PF.obj.modal.selectors.root;PF.obj.modal.form_data={action:"add-storage",storage:{}};$.each(CHV.fn.storage.formFields,function(i,v){if(v=="id")return;var sel;sel="[name=form-storage-"+v+"]";if($(sel,modal).attr("type")!=="hidden"){sel+=":visible";}
|
||||
PF.obj.modal.form_data.storage[v]=$(sel,modal).val();});return true;},complete:{success:function(XHR){var storage=XHR.responseJSON.storage,list="[data-content=dashboard-storages-list]",html=$("[data-content=storage-dashboard-template]").html(),replaces={};$.each(storage,function(i,v){var upper=i.toUpperCase();if(i=="is_https"||i=="is_active"){var v=CHV.obj.storageTemplate.icon.replace("%TITLE%",CHV.obj.storageTemplate.messages[i]).replace("%ICON%",CHV.obj.storageTemplate.checkboxes[v]).replace("%PROP%",i.replace("is_",""));}
|
||||
html=html.replace(new RegExp("%"+upper+"%","g"),v?v:"");});$(list).append(html);PF.fn.bindtipTip($("[data-storage-id="+storage.id+"]"));if(CHV.obj.storages.length==0){CHV.obj.storages={};}
|
||||
CHV.obj.storages[storage.id]=storage;CHV.fn.queuePixel();},error:function(XHR){var response=XHR.responseJSON,message=response.error.message;PF.fn.growl.call(message);}}},toggleBoolDisplay:function($el,toggle){var icons={0:$el.data("unchecked-icon"),1:$el.data("checked-icon")};$el.removeClass(icons[0]+" "+icons[1]).addClass(icons[toggle?1:0]);}};CHV.fn.common={validateForm:function(modal){if(typeof modal=="undefined"){var modal=PF.obj.modal.selectors.root}
|
||||
CHV.obj.storages[storage.id]=storage;CHV.fn.queuePixel();},error:function(XHR){var response=XHR.responseJSON,message=response.error.message;PF.fn.growl.call(message);}}},toggleBoolDisplay:function($el,toggle){var icons={0:$el.data("unchecked-icon"),1:$el.data("checked-icon")};$el.removeClass(icons[0]+" "+icons[1]).addClass(icons[toggle?1:0]);}};CHV.fn.common={validateForm:function(modal){if(typeof modal=="undefined"){var modal=PF.obj.modal.selectors.root;}
|
||||
var submit=true;$.each($(":input:visible",modal),function(i,v){if($(this).val()==""&&$(this).attr("required")){$(this).highlight();submit=false;}});if(!submit){PF.fn.growl.call(PF.fn._s("Please fill all the required fields."));return false;}
|
||||
return true;},updateDoctitle:function(pre_doctitle){if(typeof CHV.obj.page_info!==typeof undefined){CHV.obj.page_info.pre_doctitle=pre_doctitle;CHV.obj.page_info.doctitle=CHV.obj.page_info.pre_doctitle+CHV.obj.page_info.pos_doctitle;document.title=CHV.obj.page_info.doctitle;}}};CHV.fn.user={add:{submit:function(){var $modal=$(PF.obj.modal.selectors.root),submit=true;$.each($(":input",$modal),function(i,v){if($(this).val()==""&&$(this).attr("required")){$(this).highlight();submit=false;}});if(!submit){PF.fn.growl.call(PF.fn._s("Please fill all the required fields."));return false;}
|
||||
PF.obj.modal.form_data={action:"add-user",user:{username:$("[name=form-username]",$modal).val(),email:$("[name=form-email]",$modal).val(),password:$("[name=form-password]",$modal).val(),role:$("[name=form-role]",$modal).val()}};return true;},complete:{success:function(XHR){var response=XHR.responseJSON;PF.fn.growl.expirable(PF.fn._s("User added successfully."));},error:function(XHR){var response=XHR.responseJSON;PF.fn.growl.call(PF.fn._s(response.error.message));}}},delete:{submit:function(){PF.obj.modal.form_data={action:"delete",delete:"user",owner:CHV.obj.resource.user.id,deleting:CHV.obj.resource.user};return true;}}};CHV.fn.submit_resource_delete=function(){PF.obj.modal.form_data={action:"delete",delete:CHV.obj.resource.type,from:"resource",owner:typeof CHV.obj.resource.user!=="undefined"?CHV.obj.resource.user.id:null,deleting:CHV.obj.resource};return true;};CHV.fn.complete_resource_delete={success:function(XHR){var response=XHR.responseJSON;$("body").fadeOut("normal",function(){var redir;if(CHV.obj.resource.type=="album"||CHV.obj.resource.type=="image"){redir=CHV.obj.resource.parent_url;}else{redir=CHV.obj.resource.user?CHV.obj.resource.user.url:CHV.obj.resource.url;}
|
||||
@@ -219,7 +215,7 @@ if(typeof redir!=="undefined"){window.location=redir+"?deleted";}});}};CHV.fn.li
|
||||
if($(this).is(":visible")){CHV.fn.list_editor.listMassActionSet(all_count==selection_count?"clear":"select");}});},removeFromList:function($target,msg){if(typeof $target=="undefined")return;var $target=$target instanceof jQuery==false?$($target):$target,$content_listing=$(PF.obj.listing.selectors.content_listing_visible),target_size=$target.length;$target.fadeOut("fast");var type=$target.first().data("type"),new_count=parseInt($("[data-text="+type+"-count]").text())-target_size;CHV.fn.list_editor.updateUserCounters($target.first().data("type"),target_size,"-");$target.promise().done(function(){var affected_content_lists={};$target.each(function(){$("[data-id="+$(this).data("id")+"]").each(function(){var list_id=$(this).closest(PF.obj.listing.selectors.content_listing).attr("id");if(!affected_content_lists[list_id]){affected_content_lists[list_id]=0;}
|
||||
affected_content_lists[list_id]+=1;});});if(target_size==1){$("[data-id="+$(this).data("id")+"]").remove();}else{$target.each(function(){$("[data-id="+$(this).data("id")+"]").remove();});}
|
||||
PF.fn.listing.columnizerQueue();PF.fn.listing.refresh();CHV.fn.list_editor.selectionCount();if(typeof msg!=="undefined"&&typeof msg=="string"){PF.fn.growl.expirable(msg);}
|
||||
for(var k in affected_content_lists){var $list=$("#"+k),stock_offset=$list.data("offset"),offset=-affected_content_lists[k];;stock_offset=(typeof stock_offset=="undefined")?0:parseInt(stock_offset);$list.data("offset",stock_offset+offset);}
|
||||
for(var k in affected_content_lists){var $list=$("#"+k),stock_offset=$list.data("offset"),offset=-affected_content_lists[k];stock_offset=(typeof stock_offset=="undefined")?0:parseInt(stock_offset);$list.data("offset",stock_offset+offset);}
|
||||
if(!$(PF.obj.listing.selectors.content_listing_pagination,$content_listing).exists()&&$(".list-item",$content_listing).length==0){new_count=0;}
|
||||
if(new_count==0){$content_listing.html(PF.obj.listing.template.empty);$(PF.obj.listing.selectors.content_listing+":not("+PF.obj.listing.selectors.content_listing_visible+")").data({empty:null,load:"ajax"});$("[data-content=list-selection][data-tab="+$content_listing.attr("id")+"]").addClass("disabled");}else{if($(PF.obj.listing.selectors.list_item,$content_listing).length==0){$(PF.obj.listing.selectors.pad_content).height(0);$content_listing.find("[data-action=load-more]").click();PF.obj.listing.recolumnize=true;}}});},deleteFromList:function($target){if(typeof growl=="undefined"){var growl=true;}
|
||||
var $target=$target instanceof jQuery==false?$($target):$target;this.removeFromList($target,growl?PF.fn._s("The content has been deleted."):null);},moveFromList:function($target,growl){if(typeof growl=="undefined"){var growl=true;}
|
||||
@@ -227,7 +223,7 @@ var $target=$target instanceof jQuery==false?$($target):$target;this.removeFromL
|
||||
var $icon=$("[data-action=select] .btn-icon",$list_item),add_class,remove_class,label_text;if(!select){$list_item.removeClass("selected").find(".list-item-image-tools").css("display","none");add_class=$icon.data("icon-unselected");remove_class=$icon.data("icon-selected");label_text=PF.fn._s("Select");setTimeout(function(){$list_item.find(".list-item-image-tools").css("display","");},0);}else{$list_item.addClass("selected");add_class=$icon.data("icon-selected");remove_class=$icon.data("icon-unselected");label_text=PF.fn._s("Unselect");}
|
||||
$("[data-action=select] .label",$list_item).text(label_text);$icon.removeClass(remove_class).addClass(add_class);CHV.fn.list_editor.selectionCount();},selectItem:function($list_item){this.toggleSelectItem($list_item,true);},unselectItem:function($list_item){this.toggleSelectItem($list_item,false);},clearSelection:function(all){var $targets=$(PF.obj.listing.selectors.list_item+".selected",PF.obj.listing.selectors[all?"content_listing":"content_listing_visible"]);this.unselectItem($targets);this.listMassActionSet("select");},listMassActionSet:function(action){var current=action=="select"?"clear":"select";var $target=$("[data-action=list-"+current+"-all]:visible");var text=$target.data("text-"+action+"-all");$target.text(text).attr("data-action","list-"+action+"-all");},updateItem:function($target,response,action,growl){if($target instanceof jQuery==false){var $target=$($target);}
|
||||
var dealing_with=$target.data("type"),album=dealing_with=="image"?response.album:response;this.addAlbumtoModals(album);$("option[value="+album.id_encoded+"]","[name=form-album-id]").html(PF.fn.htmlEncode(album.name));if(typeof action=="undefined"){var action="edit";}
|
||||
if(action=="edit"||action=="move"){if(action=="move"&&CHV.obj.resource.type=="album"){CHV.fn.list_editor.moveFromList($target,growl);return}
|
||||
if(action=="edit"||action=="move"){if(action=="move"&&CHV.obj.resource.type=="album"){CHV.fn.list_editor.moveFromList($target,growl);return;}
|
||||
$target.data("description",response.description);if(dealing_with=="image"){if(typeof response.title!==typeof undefined){$target.data("title",response.title);$target.find("[title]").attr("title",response.title);$("[data-text=image-title]",$target).html(PF.fn.htmlEncode(response.title));}
|
||||
if(typeof response.title_truncated!==typeof undefined){$("[data-text=image-title-truncated]",$target).html(PF.fn.htmlEncode(response.title_truncated));}
|
||||
if(typeof response.category_id!==typeof undefined){$target.data("category-id",response.category_id);}
|
||||
@@ -238,4 +234,4 @@ delta=new_count-old_count;var $total_count=$("[data-text=total-"+$count.data("te
|
||||
if(typeof response.albums_old!=="undefined"){for(var i=0;i<response.albums_old.length;i++){CHV.fn.list_editor.updateAlbum(response.albums_old[i]);}}else{CHV.fn.list_editor.updateAlbum(response.old_album);}
|
||||
if(response.album){if(typeof response.albums_old!=="undefined"?response.request.album.new=="true":response.request.editing.new_album=="true"){CHV.fn.list_editor.addAlbumtoModals(response.album);var old_count=parseInt($("[data-text=album-count]").text())-1;$(PF.obj.listing.selectors.pad_content).each(function(){var list_count=$(this).find(PF.obj.listing.selectors.list_item).length;if(list_count==0){return;}
|
||||
var params=PF.fn.deparam($(this).closest(PF.obj.listing.selectors.content_listing).data("params"));if(params.sort=="date_desc"||old_count==list_count){$(this)[params.sort=="date_desc"?"prepend":"append"](response.album.html);}});}else{CHV.fn.list_editor.updateAlbum(response.album);}}
|
||||
PF.fn.listing.columnizerQueue();PF.fn.listing.refresh(0);}}};CHV.fn.queuePixel=function(){var img='<img data-content="queue-pixel" src="'+PF.obj.config.base_url+'?queue&r='+PF.fn.generate_random_string(32)+'" width="1" height="1" alt="" style="display: none;">';$("body").append(img);}
|
||||
PF.fn.listing.columnizerQueue();PF.fn.listing.refresh(0);}}};CHV.fn.queuePixel=function(){var img='<img data-content="queue-pixel" src="'+PF.obj.config.base_url+'?queue&r='+PF.fn.generate_random_string(32)+'" width="1" height="1" alt="" style="display: none;">';$("body").append(img);};
|
||||
@@ -198,20 +198,6 @@ class Notification {
|
||||
if(isset($row['user']['id'])) {
|
||||
User::fill($row['user']);
|
||||
}
|
||||
switch($row['type']) {
|
||||
case 'like':
|
||||
$message = _s('%u liked your %t %c', [
|
||||
'%t' => _s($row['content_type']),
|
||||
'%c' => '<a href="'.$row['image']['url_viewer'].'">'.$row['image']['title_truncated_html'].'</a>'
|
||||
]);
|
||||
break;
|
||||
case 'follow':
|
||||
$message = _s('%u is now following you');
|
||||
break;
|
||||
}
|
||||
$row['message'] = strtr($message, [
|
||||
'%u' => '<a href="'.$row['user']['url'].'">'.$row['user']['name_short_html'].'</a>',
|
||||
]);
|
||||
}
|
||||
}
|
||||
class NotificationException extends Exception {}
|
||||
@@ -60,6 +60,9 @@ class Settings {
|
||||
'upload_enabled_image_formats' => 'jpg,png,bmp,gif',
|
||||
'upload_threads' => '2',
|
||||
'enable_automatic_updates_check'=> 1,
|
||||
// 1.0.6
|
||||
'comments_api' => 'js',
|
||||
'image_load_max_filesize_mb' => '3',
|
||||
];
|
||||
|
||||
// Default listing thing
|
||||
@@ -118,7 +121,7 @@ class Settings {
|
||||
'user_password_max_length' => 32,
|
||||
'user_password_pattern' => '^.{6,32}$',
|
||||
'maintenance_image' => 'default/maintenance_cover.jpg',
|
||||
'ip_whois_url' => 'https://who.is/whois-ip/ip-address/%IP',
|
||||
'ip_whois_url' => 'https://ipinfo.io/%IP',
|
||||
'available_button_colors' => ['blue', 'green', 'orange', 'red', 'grey', 'black', 'white', 'default'],
|
||||
'routing_regex' => '([\w_-]+)',
|
||||
'routing_regex_path' => '([\w\/_-]+)',
|
||||
|
||||
@@ -491,9 +491,11 @@ class User {
|
||||
// Do some safe cleaning
|
||||
if(isset($user['website'])) {
|
||||
$user['website_safe_html'] = G\safe_html($user['website']);
|
||||
$user['website_display'] = $user['is_admin'] ? $user['website_safe_html'] : get_redirect_url($user['website_safe_html']);
|
||||
}
|
||||
if(isset($user['bio'])) {
|
||||
$user['bio_safe_html'] = G\safe_html($user['bio']);
|
||||
$user['bio_linkify'] = $user['is_admin'] ? G\linkify($user['bio'], ['attr' => ['target' => '_blank']]) : linkify_redirector($user['bio']);
|
||||
}
|
||||
|
||||
if(empty($user['name'])) {
|
||||
|
||||
@@ -445,6 +445,17 @@ function decodeID($var) {
|
||||
return cheveretoID($var, "decode");
|
||||
}
|
||||
|
||||
// Linkify stuff to the internal redirector
|
||||
function linkify_redirector($text) {
|
||||
return G\linkify_safe($text, ['callback' => function($url, $caption, $options) {
|
||||
return '<a href="' . get_redirect_url($url) . '" '. $options['attr']. '>' . $caption . '</a>';
|
||||
}]);
|
||||
}
|
||||
|
||||
// A simple base64 encode, perfect to avoid SEO bitches
|
||||
function get_redirect_url($url) {
|
||||
return G\get_base_url('redirect/' . base64_encode($url));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get some URLs
|
||||
|
||||
@@ -38,11 +38,11 @@ function check_system_integrity() {
|
||||
@ini_set('session.use_trans_sid', FALSE);
|
||||
@ini_set('session.use_only_cookies', TRUE);
|
||||
@ini_set('session.hash_bits_per_character', 4);
|
||||
|
||||
$missng_fn_tpl = '%n (<a href="http://php.net/manual/en/function.%u.php">%f</a>) function is disabled in this server. This function must be enabled in your PHP configuration (php.ini) and/or you must add this missing function.';
|
||||
|
||||
$missing_tpl = '%n (<a href="http://php.net/manual/en/%t.%u.php" target="_blank">%f</a>) %t is disabled in this server. This %t must be enabled in your PHP configuration (php.ini) and/or you must add this missing %t.';
|
||||
|
||||
if(version_compare(PHP_VERSION, '5.4.0', '<')) {
|
||||
$install_errors[] = 'This server is currently running PHP version '.PHP_VERSION.' and Chevereto needs at least PHP 5.5.0 to run. You need to update PHP in this server.';
|
||||
$install_errors[] = 'This server is currently running PHP version '.PHP_VERSION.' and Chevereto needs at least PHP 5.4.0 to run. You need to update PHP in this server.';
|
||||
}
|
||||
if(ini_get('allow_url_fopen') !== 1 && !function_exists('curl_init')) {
|
||||
$install_errors[] = "cURL isn't installed and allow_url_fopen is disabled. Chevereto needs one of these to perform HTTP requests to remote servers.";
|
||||
@@ -62,20 +62,49 @@ function check_system_integrity() {
|
||||
if(!imagetypes() & IMG_WBMP) $install_errors[] = 'BMP ' . $imagetype_fail;
|
||||
}
|
||||
|
||||
if(!extension_loaded('pdo')) {
|
||||
$install_errors[] = 'PHP Data Objects (<a href="http://www.php.net/manual/book.pdo.php">PDO</a>) is not loaded in this server. PDO is needed to perform database operations.';
|
||||
foreach([
|
||||
'pdo' => [
|
||||
'%label'=> 'PDO',
|
||||
'%name' => 'PHP Data Objects',
|
||||
'%slug' => 'book.pdo',
|
||||
'%desc' => 'PDO is needed to perform database operations'
|
||||
],
|
||||
'pdo_mysql' => [
|
||||
'%label'=> 'PDO_MYSQL',
|
||||
'%name' => 'PDO MySQL Functions',
|
||||
'%slug' => 'ref.pdo-mysql',
|
||||
'%desc' => 'PDO_MYSQL is needed to work with a MySQL database',
|
||||
],
|
||||
'mbstring' => [
|
||||
'%label'=> 'mbstring',
|
||||
'%name' => 'Multibyte string',
|
||||
'%slug' => 'book.mbstring',
|
||||
'%desc' => 'Mbstring is needed to handle multibyte strings',
|
||||
]
|
||||
] as $k => $v) {
|
||||
if(!extension_loaded($k)) {
|
||||
$install_errors[] = strtr('%name (<a href="http://www.php.net/manual/%slug.php">%label</a>) is not loaded in this server. %desc.', $v);
|
||||
}
|
||||
}
|
||||
if(!extension_loaded('pdo_mysql')) {
|
||||
$install_errors[] = 'PDO MySQL Functions (<a href="http://www.php.net/manual/ref.pdo-mysql.php" target="_blank">PDO_MYSQL</a>) is not loaded in this server. PDO_MYSQL is needed to work with a MySQL database.';
|
||||
|
||||
// Check those bundled classes
|
||||
$disabled_classes = explode(',', preg_replace('/\s+/', '', @ini_get('disable_classes')));
|
||||
if(!empty($disabled_classes)) {
|
||||
foreach(['DirectoryIterator', 'RegexIterator', 'Pdo', 'Exception'] as $k) {
|
||||
if(in_array($k, $disabled_classes)) {
|
||||
$install_errors[] = strtr(str_replace('%t', 'class', $missing_tpl), ['%n' => $k, '%f' => $k, '%u' => str_replace('_', '-', strtolower($k))]);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!extension_loaded('mbstring')) {
|
||||
$install_errors[] = 'Multibyte string (<a href="http://php.net/manual/en/book.mbstring.php" target="_blank">mbstring</a>) is not loaded in this server. mbstring is needed to handle multibyte strings.';
|
||||
}
|
||||
if(!function_exists('utf8_encode')) {
|
||||
$install_errors[] = strtr($missng_fn_tpl, ['%n' => 'UTF-8 encode', '%f' => 'utf8_encode', '%u' => 'utf8-encode']);
|
||||
}
|
||||
if(!function_exists('utf8_decode')) {
|
||||
$install_errors[] = strtr($missng_fn_tpl, ['%n' => 'UTF-8 decode', '%f' => 'utf8_decode', '%u' => 'utf8-decode']);
|
||||
|
||||
// Check those missing functions
|
||||
foreach([
|
||||
'utf8_encode' => 'UTF-8 encode',
|
||||
'utf8_decode' => 'UTF-8 decode'
|
||||
] as $k => $v) {
|
||||
if(!function_exists($k)) {
|
||||
$install_errors[] = strtr(str_replace('%t', 'function', $missing_tpl), ['%n' => $v, '%f' => $k, '%u' => str_replace('_', '-', $k)]);
|
||||
}
|
||||
}
|
||||
|
||||
/*** Folders check ***/
|
||||
|
||||
@@ -42,7 +42,7 @@ $route = function($handler) {
|
||||
$is_owner = $album['user']['id'] == $logged_user['id'];
|
||||
|
||||
// Password protected content
|
||||
if((!$handler::getCond('admin') || !$is_owner) && $album['privacy'] == 'password' && isset($album['password'])) {
|
||||
if(!($handler::getCond('admin') || $is_owner) && $album['privacy'] == 'password' && isset($album['password'])) {
|
||||
|
||||
$is_error = FALSE;
|
||||
$error_message = NULL;
|
||||
|
||||
@@ -670,6 +670,11 @@ $route = function($handler) {
|
||||
'validate' => preg_match('/^[\w\d-_]+$/', $_POST['route_album']),
|
||||
'error_msg' => _s('Only alphanumeric, hyphen and underscore characters are allowed')
|
||||
],
|
||||
'image_load_max_filesize_mb' =>
|
||||
[
|
||||
'validate' => filter_var($_POST['image_load_max_filesize_mb'], FILTER_VALIDATE_INT),
|
||||
'error_msg' => _s('Invalid value')
|
||||
]
|
||||
];
|
||||
|
||||
// Detect funny stuff
|
||||
|
||||
@@ -77,7 +77,7 @@ $route = function($handler) {
|
||||
$is_owner = $image['user']['id'] !== NULL ? ($image['user']['id'] == $logged_user['id']) : false;
|
||||
|
||||
// Password protected content
|
||||
if((!$handler::getCond('admin') || !$is_owner) && $image['album']['privacy'] == 'password' && !CHV\Album::checkSessionPassword($image['album'])) {
|
||||
if(!($handler::getCond('admin') || $is_owner) && $image['album']['privacy'] == 'password' && !CHV\Album::checkSessionPassword($image['album'])) {
|
||||
G\redirect($image['album']['url']);
|
||||
}
|
||||
|
||||
@@ -202,12 +202,18 @@ $route = function($handler) {
|
||||
if($image['description']) {
|
||||
$meta_description = $image['description'];
|
||||
} else {
|
||||
if($image['album']['name']) {
|
||||
$meta_description = _s('Image %i in %a album', ['%i' => $image[is_null($image['title']) ? 'filename' : 'title'], '%a' => $image['album']['name']]);
|
||||
$image_tr = [
|
||||
'%i' => $image[is_null($image['title']) ? 'filename' : 'title'],
|
||||
'%a' => $image['album']['name'],
|
||||
'%w' => CHV\getSetting('website_name'),
|
||||
'%c' => $image['category']['name']
|
||||
];
|
||||
if($image['album']['id'] || (!$image['user']['is_private'] && $image['album']['name'])) {
|
||||
$meta_description = _s('Image %i in %a album', $image_tr);
|
||||
} else if($image['category']['id']) {
|
||||
$meta_description = _s('Image %i in %c category', ['%i' => $image[is_null($image['title']) ? 'filename' : 'title'], '%c' => $image['category']['name']]);
|
||||
$meta_description = _s('Image %i in %c category', $image_tr);
|
||||
} else {
|
||||
$meta_description = _s('Image %i hosted in %w', ['%i' => $image[is_null($image['title']) ? 'filename' : 'title'], '%w' => CHV\getSetting('website_name')]);
|
||||
$meta_description = _s('Image %i hosted in %w', $image_tr);
|
||||
}
|
||||
}
|
||||
$handler::setVar('meta_description', htmlspecialchars($meta_description));
|
||||
|
||||
29
app/routes/route.redirect.php
Normal file
29
app/routes/route.redirect.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/* --------------------------------------------------------------------
|
||||
|
||||
Chevereto
|
||||
http://chevereto.com/
|
||||
|
||||
@author Rodolfo Berrios A. <http://rodolfoberrios.com/>
|
||||
<inbox@rodolfoberrios.com>
|
||||
|
||||
Copyright (C) Rodolfo Berrios A. All rights reserved.
|
||||
|
||||
BY USING THIS SOFTWARE YOU DECLARE TO ACCEPT THE CHEVERETO EULA
|
||||
http://chevereto.com/license
|
||||
|
||||
--------------------------------------------------------------------- */
|
||||
|
||||
$route = function($handler) {
|
||||
try {
|
||||
$base64 = $handler->request[0];
|
||||
$url = base64_decode($base64);
|
||||
if(!filter_var($url, FILTER_VALIDATE_URL)) {
|
||||
return $handler->issue404();
|
||||
}
|
||||
G\redirect($url, 302);
|
||||
} catch(Exception $e) {
|
||||
G\exception_to_error($e);
|
||||
}
|
||||
};
|
||||
@@ -121,21 +121,6 @@ $route = function($handler) {
|
||||
$error_message = NULL;
|
||||
$changed_email_message = NULL;
|
||||
|
||||
if(in_array($doing, array('', 'account'))) {
|
||||
// reCaptcha thing
|
||||
$captcha_needed = CHV\getSettings()['recaptcha'] ? CHV\must_use_recaptcha($request_log['day']) : false;
|
||||
|
||||
if($captcha_needed) {
|
||||
if($_POST) {
|
||||
$captcha = CHV\recaptcha_check();
|
||||
if(!$captcha->is_valid) {
|
||||
$is_error = true;
|
||||
$error_message = _s("The reCAPTCHA wasn't entered correctly");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($_POST) {
|
||||
|
||||
$field_limits = 255;
|
||||
@@ -452,9 +437,6 @@ $route = function($handler) {
|
||||
if(in_array($doing, array('', 'account')) and !$is_dashboard_user) {
|
||||
CHV\Requestlog::insert(array('type' => 'account-edit', 'result' => 'fail'));
|
||||
$error_message = _s('Wrong Username/Email values');
|
||||
if(CHV\getSettings()['recaptcha'] and CHV\must_use_recaptcha($request_log['day'] + 1)) {
|
||||
$captcha_needed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -380,7 +380,6 @@ $route = function($handler) {
|
||||
} else {
|
||||
$meta_description = _s('%n (%u) on %w');
|
||||
}
|
||||
|
||||
}
|
||||
$handler::setVar('meta_description', strtr($meta_description, ['%n' => $user['name'], '%u' => $user['username'], '%w' => CHV\getSetting('website_name')]));
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ switch(true) {
|
||||
'image:width' => get_image()['width'],
|
||||
'image:height' => get_image()['height']
|
||||
];
|
||||
if(get_image()['is_animated']) {
|
||||
if(get_image()['is_animated'] && get_image()['size'] < G\get_bytes('8 MiB')) {
|
||||
$open_graph_extend['type'] = 'video.other';
|
||||
$open_graph_extend['url'] = get_image()['url'];
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ CHV.obj.config = {
|
||||
image : {
|
||||
max_filesize: "<?php echo CHV\getSetting('upload_max_filesize_mb') . ' MB'; ?>",
|
||||
right_click: <?php echo json_encode(CHV\getSetting('theme_image_right_click')); ?>,
|
||||
load_max_filesize: "<?php echo CHV\getSetting('image_load_max_filesize_mb') . ' MB'; ?>",
|
||||
},
|
||||
upload: {
|
||||
redirect_single_upload: <?php echo json_encode(CHV\getSetting('enable_redirect_single_upload')); ?>,
|
||||
@@ -102,7 +103,7 @@ CHV.obj.resource = {
|
||||
id: "<?php echo $route["id_encoded"]; ?>",
|
||||
type: "<?php echo G\get_route_name(); ?>",
|
||||
url: "<?php echo (G\get_route_name() == "image" ? $route["url_viewer"] : $route["url"]); ?>",
|
||||
parent_url: "<?php echo G\get_route_name() == "image" ? get_image()['album']['url'] : (G\get_route_name() == 'dashboard' ? NULL : $route_user['url']) ?>"
|
||||
parent_url: "<?php echo G\get_route_name() == "image" ? (get_image()['user']['is_private'] ? G\get_base_url() : get_image()['album']['url']) : (G\get_route_name() == 'dashboard' ? NULL : $route_user['url']) ?>"
|
||||
};
|
||||
|
||||
<?php
|
||||
|
||||
@@ -118,6 +118,4 @@ foreach($tabs as $tab) {
|
||||
} // for
|
||||
?>
|
||||
|
||||
<!--googleoff: index-->
|
||||
<?php G\Render\include_theme_file("snippets/templates_content_listing"); ?>
|
||||
<!--googleon: index-->
|
||||
<?php G\Render\include_theme_file("snippets/templates_content_listing"); ?>
|
||||
@@ -3,7 +3,7 @@ Theme Name: Peafowl
|
||||
Theme URL: http://chevereto.com/
|
||||
Version: 3
|
||||
Author: Rodolfo Berrios
|
||||
@Chevereto: 3.8.9
|
||||
@Chevereto: 3.8.10
|
||||
@requires peafowl.css
|
||||
*/
|
||||
|
||||
@@ -44,6 +44,7 @@ body.landing {
|
||||
|
||||
body.split {
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.fluid .content-width, .content-width.fluid {
|
||||
@@ -1303,8 +1304,8 @@ body#consent-screen {
|
||||
}
|
||||
}
|
||||
|
||||
.form-content, #dashboard-settings {
|
||||
overflow: auto;
|
||||
#dashboard-settings {
|
||||
min-height: 400px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
|
||||
2
app/themes/Peafowl/style.min.css
vendored
2
app/themes/Peafowl/style.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -1417,6 +1417,13 @@
|
||||
|
||||
<hr class="line-separator"></hr>
|
||||
|
||||
<div class="input-label">
|
||||
<label for="image_load_max_filesize_mb"><?php _se('Image load max. filesize'); ?> (MB)</label>
|
||||
<div class="c2"><input type="number" min="0" pattern="\d+" name="image_load_max_filesize_mb" id="image_load_max_filesize_mb" class="text-input" value="<?php echo get_safe_post() ? get_safe_post()['image_load_max_filesize_mb'] : CHV\Settings::get('image_load_max_filesize_mb'); ?>" placeholder="MB" required></div>
|
||||
<div class="input-below input-warning red-warning"><?php echo get_input_errors()['image_load_max_filesize_mb']; ?></div>
|
||||
<div class="input-below"><?php _se('Images greater than this size will show a button to load full resolution image.'); ?></div>
|
||||
</div>
|
||||
|
||||
<div class="input-label">
|
||||
<label for="theme_download_button"><?php _se('Enable download button'); ?></label>
|
||||
<div class="c5 phablet-c1"><select type="text" name="theme_download_button" id="theme_download_button" class="text-input">
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php if(get_image()['is_use_loader']) { ?>
|
||||
<div id="image-viewer-loader" data-size="<?php echo get_image()['size']; ?>"><?php if(get_image()['is_animated']) { ?><span class="btn-icon icon icon-play3"></span><?php } ?><span class="btn-text"><?php get_image()['is_animated'] ? _se('Play GIF') : _se('Load full resolution'); ?> - <?php echo get_image()['size_formatted']; ?></span></div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
CHV\Render\show_banner('image_image-viewer_foot', !get_image()['nsfw']);
|
||||
?>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<?php if(get_user()['is_private']) { ?>
|
||||
<span class="user-meta font-size-small"><span class="icon icon-lock"></span><?php _se('Private profile'); ?></span>
|
||||
<?php } ?>
|
||||
<div class="user-meta"><span class="user-social-networks"><?php if(get_user()["twitter"]) { ?><a class="icon-twitter" href="<?php echo get_user()["twitter"]["url"]; ?>" rel="nofollow" target="_blank"></a><?php } if(get_user()["facebook"]) { ?><a class="icon-facebook" href="<?php echo get_user()["facebook"]["url"]; ?>" rel="nofollow" target="_blank"></a><?php } if(get_user()["website"]) { ?><a class="icon-globe" href="<?php echo get_user()["website_safe_html"]; ?>" rel="nofollow" target="_blank"></a><?php } ?></span><?php
|
||||
<div class="user-meta"><span class="user-social-networks"><?php if(get_user()["twitter"]) { ?><a class="icon-twitter" href="<?php echo get_user()["twitter"]["url"]; ?>" rel="nofollow" target="_blank"></a><?php } if(get_user()["facebook"]) { ?><a class="icon-facebook" href="<?php echo get_user()["facebook"]["url"]; ?>" rel="nofollow" target="_blank"></a><?php } if(get_user()["website"]) { ?><a class="icon-globe" href="<?php echo get_user()['website_display']; ?>"<?php echo !get_user()['is_admin'] ? ' rel="nofollow"' : NULL; ?> target="_blank"></a><?php } ?></span><?php
|
||||
if(is_owner() or is_admin()) {
|
||||
?>
|
||||
<a class="edit-link" href="<?php echo G\get_base_url(is_owner() ? 'settings/profile' : 'dashboard/user/' . get_user()['id']); ?>"><span class="icon-edit"></span><span><?php _se('Edit profile'); ?></span></a>
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
<?php if(get_user()['bio']) { ?>
|
||||
<div class="user-meta overflow-hidden">
|
||||
<p class="c18 word-break-break-word"><?php echo G\linkify_safe(get_user()['bio']); ?></p>
|
||||
<p class="c18 word-break-break-word"><?php echo get_user()['bio_linkify']; ?></p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
93
app/vendor/phpmailer/class.phpmailer.php
vendored
93
app/vendor/phpmailer/class.phpmailer.php
vendored
@@ -31,7 +31,7 @@ class PHPMailer
|
||||
* The PHPMailer Version number.
|
||||
* @var string
|
||||
*/
|
||||
public $Version = '5.2.16';
|
||||
public $Version = '5.2.21';
|
||||
|
||||
/**
|
||||
* Email priority.
|
||||
@@ -423,6 +423,13 @@ class PHPMailer
|
||||
*/
|
||||
public $DKIM_private = '';
|
||||
|
||||
/**
|
||||
* DKIM private key string.
|
||||
* If set, takes precedence over `$DKIM_private`.
|
||||
* @var string
|
||||
*/
|
||||
public $DKIM_private_string = '';
|
||||
|
||||
/**
|
||||
* Callback Action function name.
|
||||
*
|
||||
@@ -685,7 +692,7 @@ class PHPMailer
|
||||
$subject = $this->encodeHeader($this->secureHeader($subject));
|
||||
}
|
||||
|
||||
//Can't use additional_parameters in safe_mode
|
||||
//Can't use additional_parameters in safe_mode, calling mail() with null params breaks
|
||||
//@link http://php.net/manual/en/function.mail.php
|
||||
if (ini_get('safe_mode') or !$this->UseSendmailOptions or is_null($params)) {
|
||||
$result = @mail($to, $subject, $body, $header);
|
||||
@@ -1287,9 +1294,11 @@ class PHPMailer
|
||||
|
||||
// Sign with DKIM if enabled
|
||||
if (!empty($this->DKIM_domain)
|
||||
&& !empty($this->DKIM_private)
|
||||
&& !empty($this->DKIM_selector)
|
||||
&& file_exists($this->DKIM_private)) {
|
||||
&& (!empty($this->DKIM_private_string)
|
||||
|| (!empty($this->DKIM_private) && file_exists($this->DKIM_private))
|
||||
)
|
||||
) {
|
||||
$header_dkim = $this->DKIM_Add(
|
||||
$this->MIMEHeader . $this->mailHeader,
|
||||
$this->encodeHeader($this->secureHeader($this->Subject)),
|
||||
@@ -1355,19 +1364,24 @@ class PHPMailer
|
||||
*/
|
||||
protected function sendmailSend($header, $body)
|
||||
{
|
||||
if ($this->Sender != '') {
|
||||
// CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.
|
||||
if (!empty($this->Sender) and self::isShellSafe($this->Sender)) {
|
||||
if ($this->Mailer == 'qmail') {
|
||||
$sendmail = sprintf('%s -f%s', escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));
|
||||
$sendmailFmt = '%s -f%s';
|
||||
} else {
|
||||
$sendmail = sprintf('%s -oi -f%s -t', escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));
|
||||
$sendmailFmt = '%s -oi -f%s -t';
|
||||
}
|
||||
} else {
|
||||
if ($this->Mailer == 'qmail') {
|
||||
$sendmail = sprintf('%s', escapeshellcmd($this->Sendmail));
|
||||
$sendmailFmt = '%s';
|
||||
} else {
|
||||
$sendmail = sprintf('%s -oi -t', escapeshellcmd($this->Sendmail));
|
||||
$sendmailFmt = '%s -oi -t';
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: If possible, this should be changed to escapeshellarg. Needs thorough testing.
|
||||
$sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender);
|
||||
|
||||
if ($this->SingleTo) {
|
||||
foreach ($this->SingleToArray as $toAddr) {
|
||||
if (!@$mail = popen($sendmail, 'w')) {
|
||||
@@ -1413,6 +1427,40 @@ class PHPMailer
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters.
|
||||
*
|
||||
* Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows.
|
||||
* @param string $string The string to be validated
|
||||
* @see https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report
|
||||
* @access protected
|
||||
* @return boolean
|
||||
*/
|
||||
protected static function isShellSafe($string)
|
||||
{
|
||||
// Future-proof
|
||||
if (escapeshellcmd($string) !== $string
|
||||
or !in_array(escapeshellarg($string), array("'$string'", "\"$string\""))
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$length = strlen($string);
|
||||
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$c = $string[$i];
|
||||
|
||||
// All other characters have a special meaning in at least one common shell, including = and +.
|
||||
// Full stop (.) has a special meaning in cmd.exe, but its impact should be negligible here.
|
||||
// Note that this does permit non-Latin alphanumeric characters based on the current locale.
|
||||
if (!ctype_alnum($c) && strpos('@_-.', $c) === false) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send mail using the PHP mail() function.
|
||||
* @param string $header The message headers
|
||||
@@ -1432,10 +1480,13 @@ class PHPMailer
|
||||
|
||||
$params = null;
|
||||
//This sets the SMTP envelope sender which gets turned into a return-path header by the receiver
|
||||
if (!empty($this->Sender)) {
|
||||
$params = sprintf('-f%s', $this->Sender);
|
||||
if (!empty($this->Sender) and $this->validateAddress($this->Sender)) {
|
||||
// CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.
|
||||
if (self::isShellSafe($this->Sender)) {
|
||||
$params = sprintf('-f%s', $this->Sender);
|
||||
}
|
||||
}
|
||||
if ($this->Sender != '' and !ini_get('safe_mode')) {
|
||||
if (!empty($this->Sender) and !ini_get('safe_mode') and $this->validateAddress($this->Sender)) {
|
||||
$old_from = ini_get('sendmail_from');
|
||||
ini_set('sendmail_from', $this->Sender);
|
||||
}
|
||||
@@ -1489,10 +1540,10 @@ class PHPMailer
|
||||
if (!$this->smtpConnect($this->SMTPOptions)) {
|
||||
throw new phpmailerException($this->lang('smtp_connect_failed'), self::STOP_CRITICAL);
|
||||
}
|
||||
if ('' == $this->Sender) {
|
||||
$smtp_from = $this->From;
|
||||
} else {
|
||||
if (!empty($this->Sender) and $this->validateAddress($this->Sender)) {
|
||||
$smtp_from = $this->Sender;
|
||||
} else {
|
||||
$smtp_from = $this->From;
|
||||
}
|
||||
if (!$this->smtp->mail($smtp_from)) {
|
||||
$this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError()));
|
||||
@@ -2127,6 +2178,14 @@ class PHPMailer
|
||||
return rtrim($this->MIMEHeader . $this->mailHeader, "\n\r") . self::CRLF . self::CRLF . $this->MIMEBody;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create unique ID
|
||||
* @return string
|
||||
*/
|
||||
protected function generateId() {
|
||||
return md5(uniqid(time()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Assemble the message body.
|
||||
* Returns an empty string on failure.
|
||||
@@ -2138,7 +2197,7 @@ class PHPMailer
|
||||
{
|
||||
$body = '';
|
||||
//Create unique IDs and preset boundaries
|
||||
$this->uniqueid = md5(uniqid(time()));
|
||||
$this->uniqueid = $this->generateId();
|
||||
$this->boundary[1] = 'b1_' . $this->uniqueid;
|
||||
$this->boundary[2] = 'b2_' . $this->uniqueid;
|
||||
$this->boundary[3] = 'b3_' . $this->uniqueid;
|
||||
@@ -3709,7 +3768,7 @@ class PHPMailer
|
||||
}
|
||||
return '';
|
||||
}
|
||||
$privKeyStr = file_get_contents($this->DKIM_private);
|
||||
$privKeyStr = !empty($this->DKIM_private_string) ? $this->DKIM_private_string : file_get_contents($this->DKIM_private);
|
||||
if ('' != $this->DKIM_passphrase) {
|
||||
$privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase);
|
||||
} else {
|
||||
|
||||
39
app/vendor/phpmailer/class.smtp.php
vendored
39
app/vendor/phpmailer/class.smtp.php
vendored
@@ -30,7 +30,7 @@ class SMTP
|
||||
* The PHPMailer SMTP version number.
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '5.2.16';
|
||||
const VERSION = '5.2.21';
|
||||
|
||||
/**
|
||||
* SMTP line break constant.
|
||||
@@ -81,7 +81,7 @@ class SMTP
|
||||
* @deprecated Use the `VERSION` constant instead
|
||||
* @see SMTP::VERSION
|
||||
*/
|
||||
public $Version = '5.2.16';
|
||||
public $Version = '5.2.21';
|
||||
|
||||
/**
|
||||
* SMTP server port number.
|
||||
@@ -150,6 +150,17 @@ class SMTP
|
||||
*/
|
||||
public $Timelimit = 300;
|
||||
|
||||
/**
|
||||
* @var array patterns to extract smtp transaction id from smtp reply
|
||||
* Only first capture group will be use, use non-capturing group to deal with it
|
||||
* Extend this class to override this property to fulfil your needs.
|
||||
*/
|
||||
protected $smtp_transaction_id_patterns = array(
|
||||
'exim' => '/[0-9]{3} OK id=(.*)/',
|
||||
'sendmail' => '/[0-9]{3} 2.0.0 (.*) Message/',
|
||||
'postfix' => '/[0-9]{3} 2.0.0 Ok: queued as (.*)/'
|
||||
);
|
||||
|
||||
/**
|
||||
* The socket for the server connection.
|
||||
* @var resource
|
||||
@@ -1211,4 +1222,28 @@ class SMTP
|
||||
self::DEBUG_CONNECTION
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Will return the ID of the last smtp transaction based on a list of patterns provided
|
||||
* in SMTP::$smtp_transaction_id_patterns.
|
||||
* If no reply has been received yet, it will return null.
|
||||
* If no pattern has been matched, it will return false.
|
||||
* @return bool|null|string
|
||||
*/
|
||||
public function getLastTransactionID()
|
||||
{
|
||||
$reply = $this->getLastReply();
|
||||
|
||||
if (empty($reply)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
foreach($this->smtp_transaction_id_patterns as $smtp_transaction_id_pattern) {
|
||||
if(preg_match($smtp_transaction_id_pattern, $reply, $matches)) {
|
||||
return $matches[1];
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 217 KiB After Width: | Height: | Size: 350 KiB |
@@ -18,7 +18,7 @@ namespace G;
|
||||
|
||||
if(!defined('access') or !access) die("This file cannot be directly accessed.");
|
||||
|
||||
define('G_VERSION', '1.0.33');
|
||||
define('G_VERSION', '1.0.34');
|
||||
|
||||
// Error reporting setup
|
||||
@ini_set('log_errors', TRUE);
|
||||
|
||||
@@ -312,18 +312,15 @@ class Minify {
|
||||
$this->minifyDirectToOutput($js, $options);
|
||||
// Sometimes there's a leading new line, so we trim that out here.
|
||||
$js = ltrim(ob_get_clean());
|
||||
//$js = str_replace("\n", NULL, $js);
|
||||
$js = $this->unlock($js);
|
||||
unset($this);
|
||||
return $js;
|
||||
} catch (Exception $e) {
|
||||
|
||||
if (isset($this)) {
|
||||
// Since the breakdownScript function probably wasn't finished
|
||||
// we clean it out before discarding it.
|
||||
$this->clean();
|
||||
unset($this);
|
||||
}
|
||||
|
||||
// without this call things get weird, with partially outputted js.
|
||||
ob_end_clean();
|
||||
throw $e;
|
||||
|
||||
@@ -126,8 +126,8 @@ namespace G {
|
||||
*/
|
||||
function random_string($length) {
|
||||
switch(true) {
|
||||
case function_exists('mcrypt_create_iv') :
|
||||
$r = mcrypt_create_iv($length, MCRYPT_DEV_URANDOM);
|
||||
case function_exists('random_bytes') :
|
||||
$r = random_bytes($length);
|
||||
break;
|
||||
case function_exists('openssl_random_pseudo_bytes') :
|
||||
$r = openssl_random_pseudo_bytes($length);
|
||||
@@ -408,7 +408,7 @@ namespace G {
|
||||
|
||||
// Linkify functions borrowed from https://github.com/misd-service-development/php-linkify
|
||||
function linkify($text, array $options = array()) {
|
||||
$attr = '';
|
||||
$attr = '';
|
||||
if (true === array_key_exists('attr', $options)) {
|
||||
foreach ($options['attr'] as $key => $value) {
|
||||
if (true === is_array($value)) {
|
||||
@@ -498,7 +498,7 @@ namespace G {
|
||||
$match[0] = 'http://' . $match[0];
|
||||
}
|
||||
if (isset($options['callback'])) {
|
||||
$cb = $options['callback']($match[0], $caption, false);
|
||||
$cb = $options['callback']($match[0], $caption, $options);
|
||||
if (!is_null($cb)) {
|
||||
return $cb;
|
||||
}
|
||||
@@ -508,8 +508,9 @@ namespace G {
|
||||
return preg_replace_callback($pattern, $callback, $text);
|
||||
}
|
||||
|
||||
function linkify_safe($text, $options = []) {
|
||||
return linkify(htmlspecialchars($text), ['attr' => array_merge(['rel' => 'nofollow', 'target' => '_blank'], $options)]);;
|
||||
function linkify_safe($text, $options=[]) {
|
||||
$options = array_merge(['attr' => ['rel' => 'nofollow', 'target' => '_blank']], $options);
|
||||
return linkify(htmlspecialchars($text), $options);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1258,13 +1259,29 @@ namespace G {
|
||||
}
|
||||
}
|
||||
|
||||
// Returns bytes for SIZE + Suffix format
|
||||
function get_bytes($size, $cut=-2){
|
||||
$units = ['KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
||||
$suffix = strtoupper(substr($size, $cut));
|
||||
// Returns bytes for SIZE + Suffix format (dec + bin)
|
||||
function get_bytes($size, $cut=NULL) {
|
||||
if($cut == NULL) {
|
||||
$suffix = substr($size, -3);
|
||||
$suffix = preg_match('/([A-Za-z]){3}/', $suffix) ? $suffix : substr($size, -2);
|
||||
} else {
|
||||
$suffix = substr($size, $cut);
|
||||
}
|
||||
|
||||
$suffix = strtoupper($suffix);
|
||||
|
||||
$units = ['KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; // Default dec units
|
||||
|
||||
if(strlen($suffix) == 3) { // Convert units to bin
|
||||
foreach($units as &$unit) {
|
||||
$split = str_split($unit);
|
||||
$unit = $split[0] . 'I' . $split[1];
|
||||
}
|
||||
}
|
||||
|
||||
if(strlen($suffix) == 1) {
|
||||
$ini_to_suffix = [
|
||||
'M' => 'MB'
|
||||
'M' => 'MB',
|
||||
];
|
||||
$suffix = $ini_to_suffix[$suffix];
|
||||
}
|
||||
@@ -1272,7 +1289,7 @@ namespace G {
|
||||
return $size;
|
||||
}
|
||||
$pow_factor = array_search($suffix, $units) + 1;
|
||||
return $size * pow(1000, $pow_factor);
|
||||
return $size * pow(strlen($suffix) == 2 ? 1000 : 1024, $pow_factor);
|
||||
}
|
||||
|
||||
// Converts bytes to MB
|
||||
|
||||
Reference in New Issue
Block a user