Fork from 3.15.2

This commit is contained in:
Rodolfo Berrios 2020-06-24 14:35:15 -04:00
parent 7b3af3ec48
commit 75e3b66082
266 changed files with 126013 additions and 71667 deletions

View file

@ -1,31 +1,34 @@
# Disable server signature
ServerSignature Off
# Disable directory listing (-indexes), Multiviews (-MultiViews) and enable Follow system links (+FollowSymLinks)
Options -Indexes
Options -MultiViews
<IfModule mod_rewrite.c>
RewriteEngine On
# If you have problems with the rewrite rules remove the "#" from the following RewriteBase line
# You will also have to change the path to reflect the path to your Chevereto installation
# If you are using alias is most likely that you will need this.
#RewriteBase /
# 404 images
# If you want to have your own fancy "image not found" image remove the "#" from RewriteCond and RewriteRule lines
# Make sure to apply the correct paths to reflect your current installation
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule images/.+\.(gif|jpe?g|png|bmp) - [NC,L,R=404]
#RewriteRule images/.+\.(gif|jpe?g|png|bmp) content/images/system/default/404.gif [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !\.(css|js|html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpe?g|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ [NC]
RewriteRule . index.php [L]
</IfModule>
# Disable server signature
ServerSignature Off
# Enable CORS across all your subdomains (replace dev\.local with your domain\.com)
# SetEnvIf Origin ^(https?://.+\.dev\.local(?::\d{1,5})?)$ CORS_ALLOW_ORIGIN=$1
# Header append Access-Control-Allow-Origin %{CORS_ALLOW_ORIGIN}e env=CORS_ALLOW_ORIGIN
# Header merge Vary "Origin"
# Disable directory listing (-indexes), Multiviews (-MultiViews)
Options -Indexes
Options -MultiViews
<IfModule mod_rewrite.c>
RewriteEngine On
# If you have problems with the rewrite rules remove the "#" from the following RewriteBase line
# You will also have to change the path to reflect the path to your Chevereto installation
# If you are using alias is most likely that you will need this.
#RewriteBase /
# 404 images
# If you want to have your own fancy "image not found" image remove the "#" from RewriteCond and RewriteRule lines
# Make sure to apply the correct paths to reflect your current installation
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule images/.+\.(gif|jpe?g|png|bmp|webp) - [NC,L,R=404]
#RewriteRule images/.+\.(gif|jpe?g|a?png|bmp|webp) content/images/system/default/404.gif [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !\.(css|js|html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpe?g|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|webp|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ [NC]
RewriteRule . index.php [L]
</IfModule>

2
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,2 @@
{
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,8 @@
<?php
$translation_header = array (
'Project-Id-Version' => 'VERSION',
'POT-Creation-Date' => '2018-05-22 17:25+0000',
'PO-Revision-Date' => '2018-05-22 17:25+0000',
'POT-Creation-Date' => '2020-04-16 20:33+0000',
'PO-Revision-Date' => '2020-04-16 20:33+0000',
'Last-Translator' => 'FULL NAME <EMAIL@ADDRESS>',
'Language-Team' => 'LANGUAGE TEAM <EMAIL@ADDRESS>',
'Language' => 'da',
@ -52,6 +52,9 @@ $translation_table = [
"Personal" => [
0 => "Personlig",
],
"Can't connect to %s" => [
0 => "Kan ikke oprette forbindelse til %s",
],
"Update in progress" => [
0 => "Opdatering i gang",
],
@ -79,6 +82,141 @@ $translation_table = [
"Can't update %s file - %e" => [
0 => "Kan ikke opdatere %s fil - %e",
],
"Check the errors in the form to continue." => [
0 => "Kontroller fejlene i formularen for at fortsætte.",
],
"You must enter the album name." => [
0 => "Indtast venligst albummets navn.",
],
"Confirm" => [
0 => "Bekræft",
],
"Select existing album" => [
0 => "Vælg eksisterende album",
],
"An error occurred. Please try again later." => [
0 => "Der er sket en fejl. Venligt prøv igen senere.",
],
"Please select a valid image file type." => [
0 => "Venligst vælg en godkendt filtype.",
],
"Please select a picture of at most %s size." => [
0 => "Venligst vælg en fil der ikke er større end %s.",
],
"Profile image updated." => [
0 => "Profilbillede opdateret.",
],
"Profile background image updated." => [
0 => "Profil bagrundsbillede opdateret.",
],
"Profile background image deleted." => [
0 => "Profil bagrundsbillede slettet.",
],
"Error deleting profile background image." => [
0 => "Der er sket en fejl, og din profils bagrundsbillede er ikke blevet slettet.",
],
"Passwords don't match" => [
0 => "Adgangskoderne matcher ikke",
],
"The release notes for this update are:" => [
0 => "Udgivelsesnote til denne opdatering:",
],
"or" => [
0 => "eller",
],
"cancel" => [
0 => "annuller",
],
"loading" => [
0 => "Indlæser",
],
"Like" => [
0 => "Synes godt om",
],
"Edit" => [
0 => "Rediger",
],
"Album" => [
0 => "Album",
1 => "Albummer",
],
"Delete" => [
0 => "Slet",
],
"Close" => [
0 => "Luk",
],
"Previous" => [
0 => "Tidligere",
],
"Next" => [
0 => "Næste",
],
"Clipboard image" => [
0 => "Billede udklipsholder",
],
"File too big." => [
0 => "Filen er for stor.",
],
"Invalid or unsupported file format." => [
0 => "Ugyldigt eller ikke understøttet filformat.",
],
"Some files couldn't be added" => [
0 => "Nogle filer kunne ikke tilføjes.",
],
"image" => [
0 => "billede",
1 => "billeder",
],
"%s's Albums" => [
0 => "%s's Albummer",
],
"Image edited successfully." => [
0 => "Billede redigeret succesfuldt.",
],
"private" => [
0 => "Privat",
],
"Album edited successfully." => [
0 => "Album redigeret succesfuldt.",
],
"Invalid URL key." => [
0 => "Ugyldig URL nøgle.",
],
"Category URL key already being used." => [
0 => "Kategori URL nøgle bruges allerede.",
],
"Invalid expiration date." => [
0 => "Ugyldig udløbsdato.",
],
"IP %s banned." => [
0 => "IP %s er bannet.",
],
"Storage capacity can't be lower than its current usage (%s)." => [
0 => "Lagerkapacitet kan ikke være lavere end den aktuelle brug (%s).",
],
"Invalid URL." => [
0 => "Ugyldig URL.",
],
"The content has been deleted." => [
0 => "Indholdet er blevet slettet.",
],
"The content has been moved." => [
0 => "Indholdet er blevet flyttet.",
],
"Select" => [
0 => "Vælgt",
],
"Unselect" => [
0 => "Fravælg",
],
"The content has been edited." => [
0 => "Indholdet er blevet redigeret.",
],
"album" => [
0 => "album",
1 => "albums",
],
"Untitled" => [
0 => "Unavngivet",
],
@ -153,10 +291,6 @@ $translation_table = [
0 => "synes godt om",
1 => "synes godt om",
],
"image" => [
0 => "billede",
1 => "billeder",
],
"Recent" => [
0 => "Nylig",
],
@ -197,10 +331,6 @@ $translation_table = [
0 => "Billede",
1 => "Billeder",
],
"Album" => [
0 => "Album",
1 => "Albummer",
],
"User" => [
0 => "Bruger",
1 => "Brugere",
@ -217,9 +347,6 @@ $translation_table = [
"Can't insert storage." => [
0 => "Kan ikke indsætte lager.",
],
"Storage capacity can't be lower than its current usage (%s)." => [
0 => "Lagerkapacitet kan ikke være lavere end den aktuelle brug (%s).",
],
"Can't update storage details." => [
0 => "Kan ikke opdatere lageroplysninger.",
],
@ -266,9 +393,6 @@ $translation_table = [
"There is an update available for your Chevereto based website." => [
0 => "Der er en opdatering tilgængelig til din Chevereto baserede hjemmeside.",
],
"The release notes for this update are:" => [
0 => "Udgivelsesnote til denne opdatering:",
],
"admin dashboard" => [
0 => "admin startside",
],
@ -278,20 +402,14 @@ $translation_table = [
"view on %s" => [
0 => "visning på %s",
],
"You have been forbidden to use this website." => [
0 => "Du er bannet at bruge denne hjemmeside.",
"cookie policy" => [
0 => "cookie politik",
],
"Feel free to browse and discover all my shared images and albums." => [
0 => "Du er velkommen til at gennemse og opdage alle mine delte billeder og albums.",
"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_link." => [
0 => "Vi bruger vores egne og tredjeparts cookies til at forbedre din browseroplevelse og vores tjenester. Hvis du fortsætter med at bruge vores hjemmeside, forstås det, at du accepterer %cookie_policy_link.",
],
"View all my images" => [
0 => "Vis alle mine billeder",
],
"Plugin" => [
0 => "Plugin",
],
"That page doesn't exist" => [
0 => "Denne side findes ikke",
"I understand" => [
0 => "Jeg forstår",
],
"Forgot password?" => [
0 => "Glemt adgangskode?",
@ -308,9 +426,6 @@ $translation_table = [
"Email changed" => [
0 => "Email opdateret",
],
"The reCAPTCHA wasn't entered correctly" => [
0 => "reCAPTCHA blev ikke indtastet korrekt",
],
"Invalid Username/Email" => [
0 => "Ugyldig Brugernavn eller Email",
],
@ -338,15 +453,9 @@ $translation_table = [
"Welcome to %s" => [
0 => "Velkommen til %s",
],
"Passwords don't match" => [
0 => "Adgangskoderne matcher ikke",
],
"Email already being used" => [
0 => "Denne email er allerede taget i brug",
],
"Check the errors in the form to continue." => [
0 => "Kontroller fejlene i formularen for at fortsætte.",
],
"Password required" => [
0 => "Adgangskode kræves",
],
@ -441,15 +550,9 @@ $translation_table = [
"Changelog" => [
0 => "Seneste nyt",
],
"Request new features" => [
0 => "Anmod om nye funktioner",
],
"Bug tracking" => [
0 => "Fejlfinding",
],
"Blog" => [
0 => "Blog",
],
"Website" => [
0 => "Hjemmeside",
],
@ -546,6 +649,9 @@ $translation_table = [
"Before main title (%s)" => [
0 => "Før hovedtitel (%s)",
],
"After call to action (%s)" => [
0 => "Efter opfordring til handling (%s)",
],
"After cover (%s)" => [
0 => "Efter cover (%s)",
],
@ -738,9 +844,6 @@ $translation_table = [
"Sign in" => [
0 => "Log ind",
],
"Logged out" => [
0 => "Logget ud",
],
"Upload images" => [
0 => "Upload billeder",
],
@ -810,9 +913,6 @@ $translation_table = [
"%s's Images" => [
0 => "%s's Billeder",
],
"%s's Albums" => [
0 => "%s's Albummer",
],
"Results for" => [
0 => "Resultater for",
],
@ -834,9 +934,6 @@ $translation_table = [
"Discovery" => [
0 => "Opdagelse",
],
"Close" => [
0 => "Luk",
],
"Advanced search" => [
0 => "Avanceret søgning",
],
@ -846,39 +943,9 @@ $translation_table = [
"Notices (%s)" => [
0 => "Meddelelser (%s)",
],
"Sign in with another account" => [
0 => "Log ind med en anden konto",
],
"or" => [
0 => "eller",
],
"Username or Email address" => [
0 => "Brugernavn eller Email",
],
"Keep me logged in" => [
0 => "Husk mig",
],
"Don't have an account? <a href='%s'>Sign up</a> now." => [
0 => "Har du ikke en konto? <a href='%s'>Opret</a> nu.",
],
"Sign up with another account" => [
0 => "Log ind med en anden konto",
],
"Email address" => [
0 => "Email addresse",
],
"Username" => [
0 => "Brugernavn",
],
"I'm at least %s years old" => [
0 => "Jeg er mindst %s år gammel",
],
"Notifications" => [
0 => "Notifikationer",
],
"loading" => [
0 => "Indlæser",
],
"You don't have notifications" => [
0 => "Du har ingen notifikationer :(",
],
@ -1005,9 +1072,6 @@ $translation_table = [
"sign in" => [
0 => "log ind",
],
"You can %s or %l to save this content into your account." => [
0 => "Du kan %s eller %l for at gemme dette indhold i din konto.",
],
"No %s have been uploaded" => [
0 => "Ingen %s er blevet uploadet",
],
@ -1029,9 +1093,6 @@ $translation_table = [
"Uploading" => [
0 => "Uploader",
],
"cancel" => [
0 => "annuller",
],
"cancel remaining" => [
0 => "Annullere resterende",
],
@ -1059,9 +1120,6 @@ $translation_table = [
"insert" => [
0 => "indsæt",
],
"Edit" => [
0 => "Rediger",
],
"Remove" => [
0 => "Fjern",
],
@ -1116,9 +1174,6 @@ $translation_table = [
"Create album" => [
0 => "Opret album",
],
"The uploaded content will be moved to this newly created album. You can also move the content to an <a class=\"modal-switch\" data-switch=\"move-existing-album\">existing album</a>." => [
0 => "Det uploadede indhold vil blive flyttet til dette nyoprettede album. Du kan også flytte indholdet til et <a class=\"modal-switch\" data-switch=\"move-existing-album\">eksisterende album</a>",
],
"Move to album" => [
0 => "Flyt til album",
],
@ -1128,10 +1183,6 @@ $translation_table = [
"Error report" => [
0 => "Fejl rapport",
],
"album" => [
0 => "album",
1 => "albums",
],
"Viewer links" => [
0 => "Viewer links",
],
@ -1171,6 +1222,15 @@ $translation_table = [
"Album name" => [
0 => "Album navn",
],
"Album description" => [
0 => "Albumbeskrivelse",
],
"Brief description of this album" => [
0 => "Kort beskrivelse af dette album",
],
"Album privacy" => [
0 => "Albums privatliv",
],
"Who can view this content" => [
0 => "Hvem kan se dette indhold",
],
@ -1180,12 +1240,42 @@ $translation_table = [
"Private (anyone with the link)" => [
0 => "Privat (alle med linket)",
],
"Private (password protected)" => [
0 => "Privat (adgangskode beskyttet)",
],
"Album password" => [
0 => "Album adgangskode",
],
"Name" => [
0 => "Navn",
],
"Category name" => [
0 => "Kategori navn",
],
"URL key" => [
0 => "URL nøgle",
],
"Category URL key" => [
0 => "Kategori URL nøgle",
],
"Only letters, numbers, and hyphens" => [
0 => "Kun bogstaver, tal og bindestreger",
],
"Brief description of this category" => [
0 => "Kort beskrivelse af denne kategori",
],
"Untitled image" => [
0 => "Unavngivet billede",
],
"You can use wildcard * characters." => [
0 => "Du kan bruge wildcard * tegn.",
],
"Expiration date" => [
0 => "Udløbsdato",
],
"Example" => [
0 => "Eksempel",
],
"Message" => [
0 => "Besked",
],
@ -1195,6 +1285,9 @@ $translation_table = [
"create new album" => [
0 => "opret nyt album",
],
"Username" => [
0 => "Brugernavn",
],
"view more" => [
0 => "Se mere",
],
@ -1213,14 +1306,14 @@ $translation_table = [
"Flag as safe" => [
0 => "Marker som sikker",
],
"Delete" => [
0 => "Slet",
],
"Create new album" => [
0 => "Opret nyt album",
],
"To use all the features of this site you must be logged in. If you don't have an account you can <a href=\"%s\">sign up</a> right now." => [
0 => "For at bruge alle funktionerne skal de logge ind. Hvis du ikke har en bruger kan du <a href=\"%s\">lave en</a> nu.",
"Sign in with another account" => [
0 => "Log ind med en anden konto",
],
"Home" => [
0 => "Hjem",
],
"There's nothing to show here." => [
0 => "Der er ikke noget at se her.",
@ -1276,9 +1369,6 @@ $translation_table = [
"Keyboard shortcuts" => [
0 => "Tastaturgenveje",
],
"Like" => [
0 => "Synes godt om",
],
"Uploaded by guest" => [
0 => "Uploadet af gæst",
],
@ -1291,12 +1381,12 @@ $translation_table = [
"by %u" => [
0 => "af %u",
],
"Select" => [
0 => "Vælgt",
],
"Toggle unsafe flag" => [
0 => "Skift usikre flag",
],
"That page doesn't exist" => [
0 => "Denne side findes ikke",
],
"The requested page was not found." => [
0 => "Den anmodet side er ikke blevet fundet",
],
@ -1306,18 +1396,12 @@ $translation_table = [
"The user has been deleted" => [
0 => "Brugeren er blevet slettet",
],
"The content has been deleted." => [
0 => "Indholdet er blevet slettet.",
],
"Your account is almost ready" => [
0 => "Din bruger er næsten klar",
],
"An email to %s has been sent with instructions to activate your account. The activation link is only valid for 48 hours. If you don't receive the instructions try checking your junk or spam filters." => [
0 => "En email er blevet sendt til %s med instrukser til hvordan du skal aktivere din bruger. Aktivationslinket er kun gyldig de næste 48 timer. Hvis du ikke modtager nogle instrusker anbefaler vi at du prøver at checke din junk eller spam filtrer.",
],
"Go to homepage" => [
0 => "Gå til hjemmesiden",
],
"Resend activation" => [
0 => "Gensend aktivering",
],
@ -1333,26 +1417,20 @@ $translation_table = [
"Your email address" => [
0 => "Din email addresse",
],
"Add email" => [
0 => "Tilføj email",
"Submit" => [
0 => "Indsend",
],
"An email with instructions to reset your password has been sent to the registered email address. If you don't receive the instructions try checking your junk or spam filters." => [
0 => "En email med instruktioner til hvordan du nulstiller deres kodeord er blevet sendt til det registreret email addresse. Hvis du ikke modtager instrukserne, skal du checke din junk og spam filtrer.",
],
"Resend instructions" => [
0 => "Gensend instrukser",
],
"An error occurred. Please try again later." => [
0 => "Der er sket en fejl. Venligt prøv igen senere.",
],
"A previous email has been sent with instructions to reset your password. If you did not receive the instructions try checking your junk or spam filters." => [
0 => "En email er blevet sendt til %s med instrukser til hvordan du skal aktivere din konto.n\\Hvis du modtager instrukserne, check din junk og spam filtrer.",
],
"Enter your username or the email address that you used to create your account." => [
0 => "Indtast dit brugernavn eller email adressen som du brugte til at lave kontoen med.",
"Resend instructions" => [
0 => "Gensend instrukser",
],
"Submit" => [
0 => "Indsend",
"Username or Email address" => [
0 => "Brugernavn eller Email",
],
"Your password has been changed. You can now try logging in using your new password." => [
0 => "Dit kodeord er blevet ændret. Du kan logge ind med dit nye kodeord.",
@ -1360,20 +1438,11 @@ $translation_table = [
"Login now" => [
0 => "Log ind nu",
],
"Enter the new password that you want to use." => [
0 => "Indtast den nye kodeord du vil bruge.",
],
"New Password" => [
0 => "Nyt Kodeord",
],
"%d characters min" => [
0 => "%d tegn min",
],
"Enter your new password" => [
0 => "Indtast dit nye kordord",
],
"Confirm password" => [
0 => "Bekræft kodeord",
"%d characters min" => [
0 => "%d tegn min",
],
"Re-enter your new password" => [
0 => "Genindtast dit nye kodeord.",
@ -1381,9 +1450,6 @@ $translation_table = [
"An email to %s has been sent with instructions to activate your account. If you don't receive the instructions try checking your junk or spam filters." => [
0 => "En email til %s er blevet sendt med instruktioner for at aktivere din konto. Hvis du ikke modtager vejledningen, skal du prøve at kontrollere dine junk eller spamfiltre.",
],
"Enter the username or email address that you used to create your account to continue." => [
0 => "Indtast brugernavnet eller e-mail adressen, som du brugte til at oprette din konto for at fortsætte.",
],
"This content is private" => [
0 => "Indholdet er privat",
],
@ -1408,9 +1474,15 @@ $translation_table = [
"Disk used" => [
0 => "Plads brugt",
],
"Status" => [
0 => "Status",
],
"Role" => [
0 => "Rolle",
],
"Email address" => [
0 => "Email addresse",
],
"Add category" => [
0 => "Tilføj kategori",
],
@ -1438,6 +1510,12 @@ $translation_table = [
"Private mode will make the website only available for registered users." => [
0 => "Privat tilstand vil gøre at hjemmesiden kun er tilgængelig for registrerede brugere.",
],
"Privacy" => [
0 => "Privatliv",
],
"Contact" => [
0 => "Kontakt",
],
"pages" => [
0 => "sider",
],
@ -1663,6 +1741,9 @@ $translation_table = [
"Check the errors to proceed." => [
0 => "Se fejlene før de fortsætter.",
],
"Play GIF" => [
0 => "Afspil GIF",
],
"Load full resolution" => [
0 => "Indlæs billedet i fuld opløsning",
],
@ -1706,14 +1787,23 @@ $translation_table = [
0 => "Tilmeld dig for at låse op for alle funktioner",
],
"Manage your content, create private albums, customize your profile and more." => [
0 => "Administrer dit indhold, opret privat album, tilpass din profil og meget mere.",
0 => "Administrer dit indhold, opret privat album, tilpas din profil og meget mere.",
],
"Enter your password" => [
0 => "Indtast dit kodeord",
"Sign in with your account" => [
0 => "Log ind med din konto",
],
"Don't have an account? <a href='%s'>Sign up</a> now." => [
0 => "Har du ikke en konto? <a href='%s'>Opret</a> nu.",
],
"Logged out" => [
0 => "Logget ud",
],
"You have been logged off %s. Hope to see you soon." => [
0 => "Du er blevet logget ud %s. Vi håber vi ser dig snart igen.",
],
"Go to homepage" => [
0 => "Gå til hjemmesiden",
],
"Website under maintenance" => [
0 => "Hjemmesiden er under vedligeholdelse",
],
@ -1771,9 +1861,6 @@ $translation_table = [
"Registration IP" => [
0 => "Registrerings IP",
],
"Status" => [
0 => "Status",
],
"Valid" => [
0 => "Gyldig",
],
@ -1831,6 +1918,12 @@ $translation_table = [
"This user doesn't have a password. Add one using this form." => [
0 => "Denne bruger har ikke et kodeord. Tilføj et med denne formel.",
],
"Enter your password" => [
0 => "Indtast dit kodeord",
],
"Confirm password" => [
0 => "Bekræft kodeord",
],
"Re-enter your password" => [
0 => "Genindtast dit kodeord",
],
@ -1840,9 +1933,6 @@ $translation_table = [
"Delete existing image" => [
0 => "Slet eksisterende billede",
],
"Privacy" => [
0 => "Privatliv",
],
"Make my profile and identity totally private" => [
0 => "Gør min profil og identitet helt privat",
],
@ -1864,9 +1954,6 @@ $translation_table = [
"User has no connections." => [
0 => "Brugeren har ikke nogen forbindelser",
],
"Link your account to external services to be able to login and share content." => [
0 => "Link konti til eksterne services for at login og dele indhold.",
],
"Do you really want to disconnect %s from this account?" => [
0 => "Vil du virkelig afbryde %s fra denne konto?",
],
@ -1888,14 +1975,38 @@ $translation_table = [
"Connect %s" => [
0 => "Forbind %s",
],
"Feel free to browse and discover all my shared images and albums." => [
0 => "Du er velkommen til at gennemse og opdage alle mine delte billeder og albums.",
],
"Button" => [
0 => "Knap",
],
"View all my images" => [
0 => "Vis alle mine billeder",
],
"Login" => [
0 => "Log på",
],
"Already have an account? %s now." => [
0 => "Har du allerede en bruger? %s nu.",
],
"resend account activation" => [
0 => "gensend konto aktivering",
],
"If you have already signed up maybe you need to request to %s" => [
0 => "Hvis du allerede har tilmeldt dig, skal du anmode om at %s",
"If you have already signed up maybe you need to request to %s to activate your account." => [
0 => "Hvis du allerede har tilmeldt dig, skal du anmode om at %s for at aktiveret din konto.",
],
"I'm at least %s years old" => [
0 => "Jeg er mindst %s år gammel",
],
"terms" => [
0 => "betingelser",
],
"privacy policy" => [
0 => "Fortrolighedspolitik",
],
"I agree to the %terms_link and %privacy_link" => [
0 => "Jeg er enig i %terms_link and %privacy_link",
],
"Upload profile background" => [
0 => "Upload profil baggrundsbillede",
@ -1919,6 +2030,12 @@ $translation_table = [
"Follow" => [
0 => "Følg",
],
"You have been forbidden to use this website." => [
0 => "Du er bannet at bruge denne hjemmeside.",
],
"Plugin" => [
0 => "Plugin",
],
"General questions/comments" => [
0 => "Generelt spørgsmål/kommentarer",
],
@ -1931,18 +2048,12 @@ $translation_table = [
"Invalid subject" => [
0 => "Ugyldig emne",
],
"Invalid reCAPTCHA" => [
0 => "Ugyldig reCAPTCHA",
],
"Mail error" => [
0 => "Mail fejl",
],
"Message sent" => [
0 => "Besked sendt",
],
"Contact" => [
0 => "Kontakt",
],
"Message sent. We will get in contact soon." => [
0 => "Besked sendt. Vi kontakter dig hurtigst muligt.",
],
@ -1955,90 +2066,6 @@ $translation_table = [
"Subject" => [
0 => "Emne",
],
"Can't connect to %s" => [
0 => "Kan ikke oprette forbindelse til %s",
],
"Please provide a valid email address" => [
0 => "Angiv en gyldig e-mail adresse",
],
"You must enter the album name." => [
0 => "Indtast venligst albummets navn.",
],
"Confirm" => [
0 => "Bekræft",
],
"Select existing album" => [
0 => "Vælg eksisterende album",
],
"Please select a valid image file type." => [
0 => "Venligst vælg en godkendt filtype.",
],
"Please select a picture of at most %s size." => [
0 => "Venligst vælg en fil der ikke er større end %s.",
],
"Profile image updated." => [
0 => "Profilbillede opdateret.",
],
"Profile background image updated." => [
0 => "Profil bagrundsbillede opdateret.",
],
"Profile background image deleted." => [
0 => "Profil bagrundsbillede slettet.",
],
"Error deleting profile background image." => [
0 => "Der er sket en fejl, og din profils bagrundsbillede er ikke blevet slettet.",
],
"Previous" => [
0 => "Tidligere",
],
"Next" => [
0 => "Næste",
],
"Clipboard image" => [
0 => "Billede udklipsholder",
],
"File too big." => [
0 => "Filen er for stor.",
],
"Invalid or unsupported file format." => [
0 => "Ugyldigt eller ikke understøttet filformat.",
],
"Some files couldn't be added" => [
0 => "Nogle filer kunne ikke tilføjes.",
],
"Image edited successfully." => [
0 => "Billede redigeret succesfuldt.",
],
"private" => [
0 => "Privat",
],
"Album edited successfully." => [
0 => "Album redigeret succesfuldt.",
],
"Invalid URL key." => [
0 => "Ugyldig URL nøgle.",
],
"Category URL key already being used." => [
0 => "Kategori URL nøgle bruges allerede.",
],
"Invalid expiration date." => [
0 => "Ugyldig udløbsdato.",
],
"IP %s banned." => [
0 => "IP %s er bannet.",
],
"Invalid URL." => [
0 => "Ugyldig URL.",
],
"The content has been moved." => [
0 => "Indholdet er blevet flyttet.",
],
"Unselect" => [
0 => "Fravælg",
],
"The content has been edited." => [
0 => "Indholdet er blevet redigeret.",
],
"All the changes that you have made will be lost if you continue." => [
0 => "Alle ændringerne du har lavet vil gå tabt",
],

File diff suppressed because it is too large Load diff

View file

@ -1,21 +1,22 @@
<?php
$translation_header = array (
'Project-Id-Version' => 'Chevereto V3',
'POT-Creation-Date' => '2018-06-01 19:18-0400',
'PO-Revision-Date' => '2018-06-01 19:19-0400',
'POT-Creation-Date' => '2020-04-15 13:52-0400',
'PO-Revision-Date' => '2020-04-15 13:52-0400',
'Last-Translator' => 'Rodolfo Berríos <inbox@rodolfoberrios.com>',
'Language-Team' => '',
'Language' => 'e',
'Language' => 'en_US',
'MIME-Version' => '1.0',
'Content-Type' => 'text/plain; charset=UTF-8',
'Content-Transfer-Encoding' => '8bit',
'X-Generator' => 'Poedit 2.0.7',
'X-Poedit-Basepath' => '.',
'X-Generator' => 'Poedit 2.3',
'X-Poedit-Basepath' => '../../..',
'Plural-Forms' => 'nplurals=2; plural=(n != 1);',
'X-Poedit-KeywordsList' => '_s;_se;_n:1,2;_ne:1,2;PF.fn._s;PF.fn._n:1,2',
'X-Poedit-SourceCharset' => 'UTF-8',
'X-Poedit-SearchPath-0' => '../../..',
'X-Poedit-SearchPathExcluded-0' => '../../../app/vendor',
'X-Poedit-SearchPath-0' => '.',
'X-Poedit-SearchPathExcluded-0' => 'app/vendor',
'X-Poedit-SearchPathExcluded-1' => 'app/content/languages/cache',
);
$translation_plural = array (
'nplurals' => 2,

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,489 @@
<?php
$translation_header = array (
'Project-Id-Version' => 'VERSION',
'POT-Creation-Date' => '2020-03-31 21:05+0000',
'PO-Revision-Date' => '2020-03-31 21:05+0000',
'Last-Translator' => 'FULL NAME <EMAIL@ADDRESS>',
'Language-Team' => 'LANGUAGE TEAM <EMAIL@ADDRESS>',
'Language' => 'et_EE',
'MIME-Version' => '1.0',
'Content-Type' => 'text/plain; charset=UTF-8',
'Content-Transfer-Encoding' => '8bit',
'Plural-Forms' => 'nplurals=2; plural=(n != 1);',
);
$translation_plural = array (
'nplurals' => 2,
'function' => '($n != 1)',
);
$translation_table = [
"Invalid email" => [
0 => "Vigane email",
],
"Invalid username" => [
0 => "Vigane kasutaja",
],
"Invalid password" => [
0 => "Vigane parool",
],
"Invalid website mode" => [
0 => "Vigane veebilehe laad",
],
"From email address" => [
0 => "Saatja email",
],
"Sender email for emails sent to users." => [
0 => "Saatja email millega saadetakse kasutajatele.",
],
"Incoming email address" => [
0 => "Sissetulev emaili aadres",
],
"Website mode" => [
0 => "Veebilehe laad",
],
"You can switch the website mode anytime." => [
0 => "Saad vahetada veebilehe laadi igal ajal.",
],
"Community" => [
0 => "Kommuun",
],
"Personal" => [
0 => "Peronaalne",
],
"Update in progress" => [
0 => "Käimas on uuendamine",
],
"Missing %s file" => [
0 => "Puudu %s fail",
],
"Invalid license info" => [
0 => "Vigane litsentsi info",
],
"Invalid license key" => [
0 => "Vigane litsentsi kood",
],
"Can't save file" => [
0 => "Faili ei saa salvestada",
],
"Can't download %s" => [
0 => "Ei saa alla laadida %s",
],
"An error occurred. Please try again later." => [
0 => "Ilmnes viga. Palun proovi hiljem uuesti.",
],
"Passwords don't match" => [
0 => "Parool ei ühti",
],
"cancel" => [
0 => "katkesta",
],
"Edit" => [
0 => "Muuda",
],
"Album" => [
0 => "Album",
1 => "Albumid",
],
"Close" => [
0 => "Sulge",
],
"image" => [
0 => "pilt",
1 => "pildid",
],
"%s's Albums" => [
0 => "%s Albumid",
],
"Untitled" => [
0 => "Tiitlita",
],
"Note: This content is password protected. Remember to pass the content password to share." => [
0 => "Märkus: Sisu on märgitud parooliga kaitstuks. Pea meeles jagada parooli.",
],
"Note: This content is private. Change privacy to \"public\" to share." => [
0 => "Märkus: Sisu on märgitud privaatseks. Määra privaatsus seadetest \"avalik\" teistega jagamiseks.",
],
"Private" => [
0 => "Privaatne",
],
"Public" => [
0 => "Avalik",
],
"Link" => [
0 => "Link",
],
"Password" => [
0 => "Parool",
],
"view" => [
0 => "vaatamine",
1 => "vaatamist",
],
"minute" => [
0 => "minut",
1 => "minutit",
],
"hour" => [
0 => "tund",
1 => "tundi",
],
"day" => [
0 => "päev",
1 => "päeva",
],
"week" => [
0 => "nädal",
1 => "nädalat",
],
"month" => [
0 => "kuu",
1 => "kuud",
],
"year" => [
0 => "aasta",
1 => "aastat",
],
"Don't autodelete" => [
0 => "Ära kustuta automaatselt",
],
"Private upload" => [
0 => "Privaatne üleslaadimine",
],
"like" => [
0 => "meeldimine",
1 => "meeldimist",
],
"Recent" => [
0 => "Viimati lisatud",
],
"Trending" => [
0 => "Kuum",
],
"Top users" => [
0 => "Top kasutajad",
],
"Most recent" => [
0 => "Viimased",
],
"Oldest" => [
0 => "Vanimad",
],
"Most viewed" => [
0 => "Enim vaadatud",
],
"Popular" => [
0 => "Populaarsed",
],
"Explore" => [
0 => "Sirvi pilte",
],
"Animated" => [
0 => "Animeeritud",
],
"Search" => [
0 => "Otsi",
],
"Image" => [
0 => "pilt",
1 => "Pildid",
],
"User" => [
0 => "Kasutaja",
1 => "Kasutajad",
],
"Can't update storage details." => [
0 => "Ei saanud uuendada salvestamise detaile.",
],
"Unlimited" => [
0 => "Piiramatu",
],
"used" => [
0 => "kasutatud",
],
"Private profile" => [
0 => "Privaatne profiil",
],
"second" => [
0 => "sekund",
1 => "sekundit",
],
"%s ago" => [
0 => "%s tagasi",
],
"moments ago" => [
0 => "hetk tagasi",
],
"That page doesn't exist" => [
0 => "Seda lehte ei eksisteeri",
],
"Forgot password?" => [
0 => "Unustasid parooli ?",
],
"Reset password" => [
0 => "Taasta parool",
],
"Resend account activation" => [
0 => "Saada uuesti konto kinnitamise e-mail",
],
"Add your email address" => [
0 => "Lisa oma e-mail",
],
"Email changed" => [
0 => "E-mail muudetud",
],
"Invalid Username/Email" => [
0 => "Vale Kasutajanimi/Parool",
],
"Account needs to be activated to use this feature" => [
0 => "Konto peab olema aktiveeritud",
],
"Account already activated" => [
0 => "Konto on juba aktiveeritud",
],
"Allow up to 15 minutes for the email. You can try again later." => [
0 => "E-maili saabumine võib võtta aega kuni 15 minutit. Proovi hiljem uuesti.",
],
"Email already being used" => [
0 => "E-mail on juba kasutusel",
],
"Password required" => [
0 => "Parool nõutud",
],
"Share" => [
0 => "Jaga",
],
"Embed codes" => [
0 => "HTML ja BBKoodi tag'id",
],
"Stats" => [
0 => "Statistika",
],
"Images" => [
0 => "Pildid",
],
"Albums" => [
0 => "Albumid",
],
"Users" => [
0 => "Kasutajad",
],
"Settings" => [
0 => "Seaded",
],
"Chevereto version" => [
0 => "Chevereto versioon",
],
"install update" => [
0 => "installeeri uuendus",
],
"check for updates" => [
0 => "kontrolli uuendusi",
],
"Support" => [
0 => "Kasutajatugi",
],
"Enabled" => [
0 => "Lubatud",
],
"Disabled" => [
0 => "Keelatud",
],
"Max. upload file size" => [
0 => "Max faili suurus",
],
"Invalid timezone" => [
0 => "Vale ajatsoon",
],
"Sign in" => [
0 => "Logi sisse",
],
"Upload images" => [
0 => "Lae pilt ülesse",
],
"Account" => [
0 => "Konto",
],
"Profile" => [
0 => "Profiil",
],
"Wrong password" => [
0 => "Vale parool",
],
"Password has been changed" => [
0 => "Parool muudetud edukalt",
],
"Create account" => [
0 => "Loo konto",
],
"Upload" => [
0 => "Lae pilt...",
],
"Discovery" => [
0 => "Avasta",
],
"Advanced search" => [
0 => "Täpsem otsing",
],
"Random" => [
0 => "Suvaline pilt",
],
"My Profile" => [
0 => "Minu konto",
],
"Sign out" => [
0 => "Logi välja",
],
"Drag and drop or paste images here to upload" => [
0 => "Lohista fail siia või lae ülesse clipboardist",
],
"browse from your computer" => [
0 => "valida faili arvutist",
],
"add image URLs" => [
0 => "lisada läbi lingi",
],
"You can also %i or %u." => [
0 => "Sa saad %i või %u",
],
"Edit or resize any image by clicking the image preview" => [
0 => "Muuda pilti või pildi suurust vajutades pisipildile",
],
"your computer" => [
0 => "arvutist",
],
"You can add more images from %i or %u." => [
0 => "Saad lisada pilte juurde %i või %u",
],
"sign in" => [
0 => "logi sisse",
],
"close" => [
0 => "sulge",
],
"Remove" => [
0 => "Kustuta",
],
"Edit image" => [
0 => "Muuda pilti",
],
"Title" => [
0 => "Pealkiri",
],
"optional" => [
0 => "valikuline",
],
"Resize image" => [
0 => "Pildi mõõtmed",
],
"Note: Animated GIF images won't be resized." => [
0 => "Animeeritud (gif) failide pildi suurust ei saa muuta!",
],
"Auto delete image" => [
0 => "Kustuta pilt automaatselt",
],
"Description" => [
0 => "Kirjeldus",
],
"Brief description of this image" => [
0 => "....",
],
"Album name" => [
0 => "Albumi nimi",
],
"Private (just me)" => [
0 => "Privaatne(ainult minule)",
],
"Album password" => [
0 => "Albumi parool",
],
"Name" => [
0 => "Nimi",
],
"Select all" => [
0 => "Vali kõik",
],
"Clear selection" => [
0 => "Eemalda valik",
],
"Selection" => [
0 => "Valitud",
],
"Sign in with another account" => [
0 => "Logi sisse kasutades...",
],
"There's nothing to show here." => [
0 => "Tühjus... Pole midagi näidata!",
],
"Edit image details" => [
0 => "Muuda pilti",
],
"The requested page was not found." => [
0 => "Soovitud lehekülge ei leitud!",
],
"The user has been deleted" => [
0 => "Kasutaja kustutatud",
],
"Submit" => [
0 => "Edasi",
],
"Username or Email address" => [
0 => "Kasutajanimi või e-mail",
],
"Enter your new password" => [
0 => "Sisesta uus parool",
],
"Re-enter your new password" => [
0 => "Sisesta uuesti uus parool",
],
"Delete album" => [
0 => "Kustuta album",
],
"Album link" => [
0 => "Albumi link",
],
"Email address" => [
0 => "E-mail",
],
"Save changes" => [
0 => "Salvesta",
],
"Uploaded %s" => [
0 => "Üles laetud %s",
],
"More Exif data" => [
0 => "Vaata exif andmeid",
],
"Share image" => [
0 => "Jaga pilti",
],
"Upload and share your images." => [
0 => "Lae pilt ülesse ja jaga seda",
],
"Drag and drop anywhere you want and start uploading your images now. %s limit. Direct image links, BBCode and HTML thumbnails." => [
0 => "Lohista oma pilt siia ja alusta üleslaadimist. Kuni %s",
],
"Start uploading" => [
0 => "Lae pilt...",
],
"Logged out" => [
0 => "Välja logitud",
],
"Go to homepage" => [
0 => "Mine esilehele",
],
"Timezone" => [
0 => "Ajatsoon",
],
"Current password" => [
0 => "Praegune parool",
],
"Enter your current password" => [
0 => "Sisesta praegune parool",
],
"Upload new image" => [
0 => "Lae pilt",
],
"If you want to send a message fill the form below." => [
0 => "Kirjuta meile.",
],
];
?>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,8 @@
<?php
$translation_header = array (
'Project-Id-Version' => 'VERSION',
'POT-Creation-Date' => '2018-06-29 19:18+0000',
'PO-Revision-Date' => '2018-06-29 19:18+0000',
'POT-Creation-Date' => '2018-12-19 20:57+0000',
'PO-Revision-Date' => '2018-12-19 20:57+0000',
'Last-Translator' => 'FULL NAME <EMAIL@ADDRESS>',
'Language-Team' => 'LANGUAGE TEAM <EMAIL@ADDRESS>',
'Language' => 'vi',
@ -16,18 +16,6 @@ $translation_plural = array (
'function' => '($n != 1)',
);
$translation_table = [
"To use all the features of this site you must be logged in." => [
0 => "Bạn cần đăng nhập để sử dụng tất cả tính năng của website.",
],
"If you don't have an account you can <a href=\"%s\">sign up</a> right now." => [
0 => "Bạn có thể <a href=\"%s\">đăng ký</a> tài khoản.",
],
"Decode ID" => [
0 => "Decode ID",
],
"Encode ID" => [
0 => "Encode ID",
],
"Invalid email" => [
0 => "Email không hợp lệ",
],
@ -266,7 +254,7 @@ $translation_table = [
0 => "Đã có sẵn bản cập nhật cho trang Chevereto của bạn.",
],
"The release notes for this update are:" => [
0 => "CHú ý cho bản cập nhật này là:",
0 => "Chú ý cho bản cập nhật này là:",
],
"admin dashboard" => [
0 => "bảng điều khiển ",
@ -280,6 +268,9 @@ $translation_table = [
"cookie policy" => [
0 => "chính sách cookie",
],
"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_link." => [
0 => "Chúng tôi sử dụng cookie của mình và các bên thứ ba để tối ưu hoá trải nghiệm người dùng của bạn cũng như các dịch vụ của mình. Nếu bạn tiếp tục truy cập website, đồng nghĩa với việc bạn hiểu và chấp nhận %cookie_policy_link.",
],
"I understand" => [
0 => "Tôi hiểu",
],
@ -313,8 +304,8 @@ $translation_table = [
"Email changed" => [
0 => "Email đã đổi",
],
"The reCAPTCHA wasn't entered correctly" => [
0 => "reCAPTCHA chưa nhập đúng",
"%s says you are a robot" => [
0 => "%s cho rằng bạn là robot",
],
"Invalid Username/Email" => [
0 => "Sai Tên / Email",
@ -382,6 +373,9 @@ $translation_table = [
"Settings" => [
0 => "Cài đặt",
],
"Bulk importer" => [
0 => "Công cụ import số lượng lớn",
],
"Chevereto version" => [
0 => "Phiên bản Chevereto",
],
@ -451,9 +445,6 @@ $translation_table = [
"Bug tracking" => [
0 => "Theo dõi lỗi",
],
"Blog" => [
0 => "Blog",
],
"Website" => [
0 => "Website",
],
@ -571,15 +562,24 @@ $translation_table = [
"Content (image and album)" => [
0 => "Nội dung (trong xem ảnh và album)",
],
"Tab about column" => [
0 => "Tab cột giới thiệu",
],
"Before comments" => [
0 => "Phía dưới bình luận",
],
"Image page" => [
0 => "Tranh hình ảnh",
],
"Inside viewer top (image page)" => [
0 => "Trong phần trên của trình duyệt ảnh (trang xem ảnh)",
],
"Expected banner size 728x90" => [
0 => "Size tốt nhất 728x90",
],
"Inside viewer foot (image page)" => [
0 => "Trong phần chân của trình duyệt ảnh (trang xem ảnh)",
],
"Before header (image page)" => [
0 => "Trước đầu trang (trang ảnh)",
],
@ -604,6 +604,9 @@ $translation_table = [
"Invalid timezone" => [
0 => "Sai múi giờ",
],
"Invalid value: %s" => [
0 => "Giá trị không hợp lệ: %s",
],
"Invalid upload storage mode" => [
0 => "Sai chế độ lưu trữ",
],
@ -616,6 +619,9 @@ $translation_table = [
"Invalid thumb height" => [
0 => "Chiều cao thumb bị sai",
],
"Invalid medium size" => [
0 => "Kích thước trung bình không hợp lệ",
],
"Invalid watermark percentage" => [
0 => "Phần trăm vị trí của ảnh đóng dấu không hợp lệ",
],
@ -638,7 +644,7 @@ $translation_table = [
0 => "sai màu của top bar",
],
"Invalid theme top bar button color" => [
0 => "sai màu nút trên topbar",
0 => "Sai màu nút trên topbar",
],
"Invalid theme image listing size" => [
0 => "sai size của danh sách hình ảnh",
@ -655,6 +661,12 @@ $translation_table = [
"Invalid SMTP security" => [
0 => "Sai bảo mật SMTP",
],
"Invalid personal mode user ID" => [
0 => "ID người dùng chế độ cá nhân không hợp lệ",
],
"Invalid website privacy mode" => [
0 => "Chế độ bảo mật website không hợp lệ",
],
"Invalid website content privacy mode" => [
0 => "sai chết độ riêng tư",
],
@ -662,7 +674,40 @@ $translation_table = [
0 => "sai style trang chủ",
],
"Invalid homepage call to action button color" => [
0 => "sai màu của nút kêu gọi trang chủ",
0 => "Sai màu của nút nhấp trên trang chủ",
],
"Invalid homepage call to action functionality" => [
0 => "Hàm gọi hành động trên homepage không hợp lệ",
],
"Invalid title" => [
0 => "Tiêu đề không hợp lệ",
],
"Invalid type" => [
0 => "nhập không hợp lệ",
],
"Invalid visibility" => [
0 => "Hiển thị không hợp lệ",
],
"Invalid rel attribute" => [
0 => "Thuộc tính rel không hợp lệ",
],
"Invalid icon" => [
0 => "icon không hợp lệ",
],
"Invalid URL key" => [
0 => "URL key không hợp lệ",
],
"Invalid file path" => [
0 => "Đường dẫn file không hợp lệ",
],
"Invalid link URL" => [
0 => "URL liên kết không hợp lệ",
],
"Invalid user minimum age" => [
0 => "Độ tuổi tối thiểu của người dùng không hợp lệ",
],
"Only alphanumeric, hyphen and underscore characters are allowed" => [
0 => "Chỉ chữ cái a-z, dấu gạch dưới và kí tự gạch ngang được chấp nhận",
],
"Invalid URL" => [
0 => "Sai URL",
@ -682,6 +727,12 @@ $translation_table = [
"Invalid SMTP username" => [
0 => "Sai tên người dùng SMTP",
],
"This URL key is already being used by another page (ID %s)" => [
0 => "URL key này đã được một trang khác sử dụng (ID %s)",
],
"This file path is already being used by another page (ID %s)" => [
0 => "Đường dẫn file này đã được một trang khác sử dụng (ID %s)",
],
"About" => [
0 => "Giới thiệu",
],
@ -704,7 +755,10 @@ $translation_table = [
0 => "ảnh %i trong %a album",
],
"Image %i in %c category" => [
0 => "ảnh %i trong %c chuyên mục",
0 => "Ảnh %i trong %c chuyên mục",
],
"Image %i hosted in %w" => [
0 => "Ảnh %i lưu trữ tại %w",
],
"Direct links" => [
0 => "Link trực tiếp",
@ -721,27 +775,72 @@ $translation_table = [
"Medium URL" => [
0 => "URL ảnh trung bình",
],
"Full image" => [
0 => "Ảnh gốc",
],
"Full image (linked)" => [
0 => "Ảnh gốc (có liên kết)",
],
"Medium image (linked)" => [
0 => "Ảnh cỡ vừa (có liên kết)",
],
"Thumbnail image (linked)" => [
0 => "Ảnh thu nhỏ (có liên kết)",
],
"Login needed" => [
0 => "Cần đăng nhập",
],
"IP address already banned" => [
0 => "Địa chỉ IP đã bị cấm",
],
"Missing values" => [
0 => "Thiếu dữ liệu",
],
"Username already being used" => [
0 => "Tên tài khoản đã có người sử dụng",
],
"Add a password or another social connection before deleting %s" => [
0 => "Nhập mật khẩu hoặc kết nối mạng xã hội khác trước khi xoá %s",
],
"Add an email or another social connection before deleting %s" => [
0 => "Nhập email hoặc kết nối mạng xã hội khác trước khi xoá %s",
],
"%s has been disconnected." => [
0 => "%s đã bị ngắt",
],
"Test email from %s @ %t" => [
0 => "Email kiểm tra từ %s @ %t",
],
"This is just a test" => [
0 => "Đây chỉ là nội dung kiểm tra",
],
"Test email sent to %s." => [
0 => "Email kiểm tra đã gửi đến %s.",
],
"Downloading %s data" => [
0 => "Đang tải %s dữ liệu",
],
"User %s followed" => [
0 => "Người dùng %s quan tâm",
],
"User %s unfollowed" => [
0 => "Người dùng %s bỏ theo dõi",
],
"Content liked" => [
0 => "Đã like",
],
"Content disliked" => [
0 => "Đã disliked",
],
"%u liked your %t %c" => [
0 => "%u đã thích %t %c của bạn",
],
"%u is now following you" => [
0 => "%u quan tâm ảnh của bạn",
],
"A private user" => [
0 => "Người dùng RIêng tư",
],
"Wrong Username/Email password combination" => [
0 => "Tên người dùng hoặc mật khẩu bị sai",
],
@ -751,6 +850,12 @@ $translation_table = [
"Logged out" => [
0 => "Đã đăng xuất",
],
"Upload images" => [
0 => "Upload ảnh",
],
"Upload plugin" => [
0 => "Upload plugin",
],
"Image search results for %s" => [
0 => "Kết quả tìm kiếm hình ảnh cho truy vấn: %s",
],
@ -799,6 +904,12 @@ $translation_table = [
"Settings for %s" => [
0 => "Thiết lập cho %s",
],
"You must agree to the terms and privacy policy" => [
0 => "Bạn phải đồng ý với các điều khoản và chính sách bảo mật",
],
"You must be at least %s years old to use this website." => [
0 => "Bạn phải có ít nhất %s tuổi để sử dụng website này",
],
"Create account" => [
0 => "Đăng kí",
],
@ -823,6 +934,18 @@ $translation_table = [
"Followers" => [
0 => "Người quan tâm",
],
"%n (%u) albums on %w" => [
0 => "%n (%u) albums trên %w",
],
"%n (%u) on %w" => [
0 => "%n (%u) trên %w",
],
"Discovery" => [
0 => "Khám phá",
],
"Close" => [
0 => "Đóng",
],
"Advanced search" => [
0 => "Tìm kiếm nâng cao",
],
@ -832,30 +955,6 @@ $translation_table = [
"Notices (%s)" => [
0 => "Thông báo (%s)",
],
"Sign in with another account" => [
0 => "Đăng nhập với tài khoản khác",
],
"or" => [
0 => "hoặc",
],
"Username or Email address" => [
0 => "Tên người dùng hoặc Email",
],
"Keep me logged in" => [
0 => "Giữ nguyên trạng thái đăng nhập",
],
"Don't have an account? <a href='%s'>Sign up</a> now." => [
0 => "Chưa có tài khoản? <a href='%s'>Đăng ký </a> ngay!",
],
"Sign up with another account" => [
0 => "Đăng kí vơi tài khoản khác",
],
"Email address" => [
0 => "Địa chỉ email",
],
"Username" => [
0 => "Tên tài khoản",
],
"Notifications" => [
0 => "Thông báo",
],
@ -919,12 +1018,66 @@ $translation_table = [
"Select the images to upload" => [
0 => "Chọn ảnh để upload",
],
"browse from your computer" => [
0 => "tải lên từ máy tính",
],
"add image URLs" => [
0 => "thêm địa chỉ ảnh",
],
"You can also %i or %u." => [
0 => "Bạn có thể %i hoặc %u.",
],
"browse from your device" => [
0 => "tải từ thiết bị",
],
"take a picture" => [
0 => "chụp ảnh",
],
"You can also %i, %c or %u." => [
0 => "Bạn còn có thể %i, %c hoặc %u.",
],
"Edit or resize any image by clicking the image preview" => [
0 => "Sửa hoặc chỉnh cỡ bất kì ảnh nào bởi nhấp vào xem thử",
],
"Edit any image by touching the image preview" => [
0 => "Sửa bất kì ảnh nào bởi chạm vào xem thử",
],
"your computer" => [
0 => "máy tính của bạn",
],
"You can add more images from %i or %u." => [
0 => "Bạn có thể thêm nhiều ảnh nữa từ %i hoặc %u.",
],
"your device" => [
0 => "thiết bị của bạn",
],
"Uploading %q %o" => [
0 => "Đang tải lên %q %o",
],
"complete" => [
0 => "Hoàn tất",
],
"The queue is being uploaded, it should take just a few seconds to complete." => [
0 => "Danh sách đang được tải lên, nó có thể mất đôi chút thời gian để hoàn thành.",
],
"Upload complete" => [
0 => "Upload xong rồi!",
],
"Uploaded content added to %s." => [
0 => "Đã tải nội dung lên %s.",
],
"create a new album" => [
0 => "tạo album mới",
],
"move it to an existing album" => [
0 => "chuyển nó đến album đã có sẵn",
],
"create an account" => [
0 => "tạo tài khoản",
],
"sign in" => [
0 => "đăng nhập",
],
"Some errors have occured and the system couldn't process your request." => [
0 => "Có lỗi xảy ra, hệ thống không thể xử lý yêu cầu vừa rồi của bạn.",
],
@ -943,6 +1096,9 @@ $translation_table = [
"Uploading" => [
0 => "Đang đăng",
],
"or" => [
0 => "hoặc",
],
"cancel" => [
0 => "hủy",
],
@ -958,12 +1114,24 @@ $translation_table = [
"Check the <a data-modal=\"simple\" data-target=\"failed-upload-result\">error report</a> for more information." => [
0 => "Chọn <a data-modal=\"simple\" data-target=\"failed-upload-result\">thông báo lỗi</a> để biết thêm chi tiết.",
],
"reset" => [
0 => "reset",
],
"close" => [
0 => "đóng",
],
"copy" => [
0 => "sao chép",
],
"insert" => [
0 => "chèn",
],
"Edit" => [
0 => "Sửa",
],
"Edit image" => [
0 => "Sửa ảnh",
],
"Title" => [
0 => "Tiêu đề",
],
@ -985,6 +1153,9 @@ $translation_table = [
"Auto delete image" => [
0 => "Tự động xoá ảnh",
],
"Sign up" => [
0 => "Đăng ký",
],
"Mark this if the image is not family safe" => [
0 => "Stick chọn cái này nếu tải lên là ảnh 18+. Không sẽ bị xoá không thương tiếc mà không cần báo trước nhé!!!",
],
@ -1006,9 +1177,6 @@ $translation_table = [
"Create album" => [
0 => "Tạo Album",
],
"The uploaded content will be moved to this newly created album. You can also move the content to an <a class=\"modal-switch\" data-switch=\"move-existing-album\">existing album</a>." => [
0 => "Hình ảnh vừa upload sẽ được chuyển vào Album mới tạo này. Hoặc bạn có thể chuyển những hình ảnh mới upload vào <a class=\"modal-switch\" data-switch=\"move-existing-album\">Album sẵn có</a>.",
],
"Move to album" => [
0 => "Chuyển vào Album",
],
@ -1036,12 +1204,24 @@ $translation_table = [
"BBCodes" => [
0 => "BBCodes",
],
"BBCode full" => [
0 => "Nhúng diễn đàn BBCode",
],
"BBCode full linked" => [
0 => "Nhúng diễn đàn BBCode kèm liên kết",
],
"BBCode medium linked" => [
0 => "BBCode medium linked",
],
"BBCode thumbnail linked" => [
0 => "BBCode thumbnail linked",
],
"Storage" => [
0 => "Lưu trữ",
],
"IP address" => [
0 => "Địa chỉ IP",
],
"Album name" => [
0 => "Tên Album",
],
@ -1078,15 +1258,117 @@ $translation_table = [
"Brief description of this category" => [
0 => "Mô tả tóm tắt của danh sách này",
],
"Path" => [
0 => "Đường dẫn",
],
"Until which date this IP address will be banned? Leave it empty for no expiration." => [
0 => "Đến ngày nào sẽ cấm IP này? để trống nếu muốn không thời hạn",
],
"Message" => [
0 => "Nội dung",
],
"Text message, HTML or a redirect URL" => [
0 => "Tin nhắn Text, HTML hoặc URL chuyển hướng",
],
"Existing album" => [
0 => "Album hiện có",
],
"create new album" => [
0 => "tạo album mới",
],
"Storage name" => [
0 => "Tên bộ nhớ",
],
"API" => [
0 => "API",
],
"Region" => [
0 => "Region",
],
"Storage region" => [
0 => "Storage region",
],
"Storage bucket" => [
0 => "Storage bucket\n",
],
"Key" => [
0 => "Key",
],
"Storage key" => [
0 => "Storage key",
],
"Secret" => [
0 => "Secret",
],
"Storage secret" => [
0 => "Storage secret",
],
"Private key" => [
0 => "Private key",
],
"Google Cloud JSON key" => [
0 => "Google Cloud JSON key",
],
"You will need a <a %s>service account</a> for this." => [
0 => "Bạn cần một <a %s>service account</a> cho việc này",
],
"Service name" => [
0 => "Service name",
],
"Identity URL" => [
0 => "Identity URL",
],
"Identity API endpoint" => [
0 => "Identity API endpoint",
],
"API endpoint for OpenStack identity" => [
0 => "API endpoint for OpenStack identity",
],
"Username" => [
0 => "Tên tài khoản",
],
"Container" => [
0 => "Container",
],
"Storage container" => [
0 => "Storage container",
],
"Tenant id" => [
0 => "Tenant id",
],
"Tenant id (account id)" => [
0 => "Tenant id (account id)",
],
"Tenant name" => [
0 => "Tenant name",
],
"Tenant name (account name)" => [
0 => "Tenant name (account name)",
],
"Hostname or IP of the storage server" => [
0 => "Hostname or IP of the storage server",
],
"Server path" => [
0 => "Đường dẫn Server",
],
"Server password" => [
0 => "Server password",
],
"Storage capacity" => [
0 => "Storage capacity",
],
"Example: 20 GB, 1 TB, etc." => [
0 => "Ví dụ: 20 GB, 1 TB, v.v.",
],
"This storage will be disabled when it reach this capacity. Leave it blank or zero for no limit." => [
0 => "Bộ nhớ sẽ bị disabled khi nó đạt đến dung lượng này. Để trống hoặc điền 0 nếu không giới hạn.",
],
"Storage URL" => [
0 => "Storage URL",
],
"The system will map the images of this storage to this URL." => [
0 => "Hệ thống sẽ sử dụng địa chỉ này khi tạo link đến hình ảnh từ storage này.",
],
"view more" => [
0 => "xem thêm",
],
@ -1114,8 +1396,11 @@ $translation_table = [
"Delete" => [
0 => "Xóa",
],
"To use all the features of this site you must be logged in. If you don't have an account you can <a href=\"%s\">sign up</a> right now." => [
0 => "Bạn phải đăng nhập để xem đầy đủ. Nếu chưa có tài khoản hãy <a href=\"%s\">sign up</a> ngay.",
"Create new album" => [
0 => "Tạo album mới",
],
"Sign in with another account" => [
0 => "Đăng nhập với tài khoản khác",
],
"There's nothing to show here." => [
0 => "Không có gì để hiện.",
@ -1138,6 +1423,12 @@ $translation_table = [
"Select an existing album to move the images. You can also <a class=\"modal-switch\" data-switch=\"move-new-album\">create a new album</a> and move the images there." => [
0 => "Chọn album để chuyển hình đến đó. Bạn có thể <a class=\"modal-switch\" data-switch=\"move-new-album\">tạo album mới</a> và chuyển hình đến đó.",
],
"All the selected images will be assigned to this category." => [
0 => "Tất cả hình ảnh được chọn sẽ được gán cho danh mục này.",
],
"There is no categories." => [
0 => "Không có danh mục nào.",
],
"Confirm flag content as safe" => [
0 => "Xác nhận đánh dấu hình ảnh an toàn",
],
@ -1159,15 +1450,39 @@ $translation_table = [
"Do you really want to remove all the selected content? This can't be undone." => [
0 => "Bạn có thực sự muốn xóa các nội dụng được chọn? Việc này không thể hoàn tác.",
],
"Fullscreen" => [
0 => "Full screen",
],
"Exit fullscreen" => [
0 => "Thoát full screen\n",
],
"Guest" => [
0 => "Khách",
],
"Keyboard shortcuts" => [
0 => "Phím tắt",
],
"Like" => [
0 => "Thích",
],
"Uploaded by guest" => [
0 => "Upload by khách",
],
"From %s" => [
0 => "Từ %s",
],
"Uploaded by private" => [
0 => "Upload by ẩn danh",
],
"by %u" => [
0 => "bởi %u",
],
"Select" => [
0 => "Chọn",
],
"Toggle unsafe flag" => [
0 => "Bật kiểm tra nội dung không an toàn",
],
"The requested page was not found." => [
0 => "Không tìm thấy trang yêu cầu",
],
@ -1186,9 +1501,6 @@ $translation_table = [
"An email to %s has been sent with instructions to activate your account. The activation link is only valid for 48 hours. If you don't receive the instructions try checking your junk or spam filters." => [
0 => "Một email đến %s đã gửi. Link kích hoạt chỉ tồn tại trong 48 tiếng. Kiểm tra trong Spam nếu không có.",
],
"Go to homepage" => [
0 => "Về trang chủ",
],
"Resend activation" => [
0 => "Gửi kích hoạt lại",
],
@ -1204,26 +1516,20 @@ $translation_table = [
"Your email address" => [
0 => "Địa chỉ email của bạn",
],
"Add email" => [
0 => "Thêm email",
"Submit" => [
0 => "Gửi",
],
"An email with instructions to reset your password has been sent to the registered email address. If you don't receive the instructions try checking your junk or spam filters." => [
0 => "Chúng tôi đã gửi 1 email chứa mã reset và hướng dẫn cách reset lại mật khẩu đến địa chỉ email đăng ký tài khoản. Nếu không nhận được email nào trong vòng 10 phút, hãy kiểm tra lại hộp thư rác và Spam",
],
"Resend instructions" => [
0 => "Gửi lại hướng dẫn",
],
"An error occurred. Please try again later." => [
0 => "Có lỗi xảy ra, hãy quay lại sau.",
],
"A previous email has been sent with instructions to reset your password. If you did not receive the instructions try checking your junk or spam filters." => [
0 => "Chúng tôi đã gửi email chứa mã reset mật khẩu và hướng dẫn. Nếu không nhận được email nào trong vòng 10 phút, hãy kiểm tra lại hộp thư rác và Spam",
],
"Enter your username or the email address that you used to create your account." => [
0 => "Nhập tên đăng nhập hoặc tài khoản email bạn đã dùng lúc tạo tài khoản.",
"Resend instructions" => [
0 => "Gửi lại hướng dẫn",
],
"Submit" => [
0 => "Gửi",
"Username or Email address" => [
0 => "Tên người dùng hoặc Email",
],
"Your password has been changed. You can now try logging in using your new password." => [
0 => "Mật khẩu của bạn đã đổi thành công. Từ giờ bạn có thể đăng nhập bằng mật khẩu mới.",
@ -1231,24 +1537,18 @@ $translation_table = [
"Login now" => [
0 => "Đăng nhập",
],
"Enter the new password that you want to use." => [
0 => "Nhập mật khẩu mới mà bạn muốn sử dụng.",
],
"New Password" => [
0 => "Mật khẩu mới",
"Enter your new password" => [
0 => "Nhập mật khẩu mới của bạn",
],
"%d characters min" => [
0 => "tối thiểu phải %d ký tự",
],
"Enter your new password" => [
0 => "Nhập mật khẩu mới của bạn",
],
"Confirm password" => [
0 => "Xác nhận lại mật khẩu",
],
"Re-enter your new password" => [
0 => "Nhập lại mật khẩu mới",
],
"An email to %s has been sent with instructions to activate your account. If you don't receive the instructions try checking your junk or spam filters." => [
0 => "Email đã gửi đến %s kèm theo hướng dẫn để kích hoạt tài khoản của bạn. Nếu bạn không nhận được hướng dẫn, hãy thử kiểm tra thư mục spam của bạn.",
],
"This content is private" => [
0 => "Nội dung này được bảo mật",
],
@ -1258,12 +1558,33 @@ $translation_table = [
"Delete album" => [
0 => "Xóa album",
],
"You like this" => [
0 => "Bạn đã like",
],
"Upload to album" => [
0 => "Tải lên album",
],
"Album link" => [
0 => "Album link",
],
"Please read and comply with the following conditions before you continue:" => [
0 => "Vui lòng đọc và chấp nhận với các điều khoản sau trước khi tiếp tục:",
],
"This website contains information, links and images of sexually explicit material. If you are under the age of %s, if such material offends you or if it's illegal to view such material in your community please do not continue.\n\nI am at least %s years of age and I believe that as an adult it is my inalienable right to receive/view sexually explicit material. I desire to receive/view sexually explicit material. \n\nI believe that sexual acts between consenting adults are neither offensive nor obscene. The viewing, reading and downloading of sexually explicit materials does not violate the standards of my community, town, city, state or country.\n\nThe sexually explicit material I am viewing is for my own personal use and I will not expose minors to the material.\n\nI am solely responsible for any false disclosures or legal ramifications of viewing, reading or downloading any material in this site. Furthermore this website nor its affiliates will be held responsible for any legal ramifications arising from fraudulent entry into or use of this website.\n\nThis consent screen constitutes a legal agreement between this website and you and/or any business in which you have any legal or equitable interest. If any portion of this agreement is deemed unenforceable by a court of competent jurisdiction it shall not affect the enforceability of the other portions of the agreement." => [
0 => "Website này bao gồm các thông tin, liên kết và hình ảnh giới hạn độ tuổi. Nếu bạn dưới %s tuổi, hoặc nếu bạn cảm thấy các nội dung này không phù hợp hay là bất hợp pháp tại cộng đồng của mình, vui lòng không tiếp tục truy cập.\n\nTrong trường hợp bạn trên %s tuổi, và với tư cách là một người trưởng thành như một quyền lợi chính đáng và hợp pháp, bạn mong muốn được tiếp cận các nội dung này một cách tự nguyện.\n\nNgoài ra, bạn tin rằng hành vi tình dục giữa người lớn là hành vi không gây phản cảm hay khó chịu. Việc xem, đọc và tải các nội dung tình dục này không vi phạm các tiêu chuẩn của cộng đồng, khu vực, thành phố hay quốc gia sở tại nơi bạn phải chịu trách nhiệm pháp luật.\n\nBạn cũng phải cam kết sử dụng các tài liệu giới hạn độ tuổi trong website này chỉ cho bản thân, không phát tán và đặc biệt là chia sẻ với trẻ vị thành viên.\n\nMột khi bạn truy cập website và sử dụng các tính năng của website, bao gồm cả việc lưu trữ và chia sẻ, bạn đồng ý rằng bạn chịu trách nhiệm về mọi thông tin tiết lộ sai hoặc các quy định pháp lý về đọc, xem hoặc tải xuống bất kì tài liệu nào trong trang web này.\n\nMàn hình xác nhận này được coi như thoả thuận hợp pháp giữa website này và bạn hoặc bất kì tổ chức nào mà bạn có lợi ích hợp pháp liên quan. Nếu bất kì phần nào của thoả thuận này được coi là không thể thi hành bởi Toà án có thẩm quyền thì nó sẽ không ảnh hưởng tới các phần thực thi khác của thoả thuận này.",
],
"By clicking in \"I Agree\" you declare that you have read and understood all the conditions mentioned above." => [
0 => "Bằng việc đánh dấu \"Tôi đồng ý\", bạn xác nhận rằng bạn đã đọc và hiểu tất cả quy định ở trên.",
],
"I Agree" => [
0 => "Tôi đồng ý",
],
"Disk used" => [
0 => "Dung lượng đã sử dụng",
],
"Status" => [
0 => "Tình trạng",
],
"Add user" => [
0 => "Thêm tài khoản",
],
@ -1273,6 +1594,9 @@ $translation_table = [
"Administrator" => [
0 => "Administrator",
],
"Email address" => [
0 => "Địa chỉ email",
],
"Add category" => [
0 => "Thêm danh sách",
],
@ -1309,6 +1633,12 @@ $translation_table = [
"Force private (anyone with the link)" => [
0 => "Bắt buộc bí mất (bất cứ ai có link)",
],
"Contact" => [
0 => "Liên hệ",
],
"pages" => [
0 => "các trang",
],
"Enable uploads" => [
0 => "Bật upload",
],
@ -1597,6 +1927,12 @@ $translation_table = [
"Unsecured" => [
0 => "Unsecured",
],
"Decode ID" => [
0 => "Decode ID",
],
"Encode ID" => [
0 => "Encode ID",
],
"You need a <a href=\"https://developers.facebook.com/\" target=\"_blank\">Facebook app</a> for this." => [
0 => "Bạn cần <a href=\"https://developers.facebook.com/\" target=\"_blank\">Ứng Dụng Facebook</a> cho việc này.",
],
@ -1669,21 +2005,21 @@ $translation_table = [
"Upload and share your images." => [
0 => "Đăng và chia sẻ những bức ảnh của bạn",
],
"Fill this section uploading pictures to %s account.<br>You can edit the target user in your dashboard settings." => [
0 => "Fill this section uploading pictures to %s account.<br>You can edit the target user in your dashboard settings.",
],
"Sign up to unlock all the features" => [
0 => "Đăng ký để sử dụng mọi chức năng của website",
],
"Manage your content, create private albums, customize your profile and more." => [
0 => "Quản lý hình ảnh, tạo album riêng tư, tùy chỉnh trang hồ sơ và hơn thế nữa",
],
"Enter your password" => [
0 => "Nhập mật khẩu của bạn",
"Don't have an account? <a href='%s'>Sign up</a> now." => [
0 => "Chưa có tài khoản? <a href='%s'>Đăng ký </a> ngay!",
],
"You have been logged off %s. Hope to see you soon." => [
0 => "Bạn đã thoát khỏi tài khoản %s. Hẹn gặp lại sau!",
],
"Go to homepage" => [
0 => "Về trang chủ",
],
"You either don't have permission to access this page or the link has expired." => [
0 => "Bạn không có quyền truy cập trang này hoặc trang này đã bị vô hiệu.",
],
@ -1696,9 +2032,6 @@ $translation_table = [
"Register date" => [
0 => "Ngày đăng ký",
],
"Status" => [
0 => "Tình trạng",
],
"Valid" => [
0 => "Hoạt động",
],
@ -1738,6 +2071,12 @@ $translation_table = [
"This user doesn't have a password. Add one using this form." => [
0 => "Người dùng này chưa nhập mật khẩu. Hãy thêm mật khẩu bằng mẫu bên dưới",
],
"Enter your password" => [
0 => "Nhập mật khẩu của bạn",
],
"Confirm password" => [
0 => "Xác nhận lại mật khẩu",
],
"Re-enter your password" => [
0 => "Nhập lại mật khẩu mới",
],
@ -1747,12 +2086,21 @@ $translation_table = [
"Delete existing image" => [
0 => "Xóa ảnh có sẵn",
],
"Enable this if you want to act like an anonymous user" => [
0 => "Bật tính năng này nếu bạn muốn sử dụng ẩn danh",
],
"This is your real name, not your username." => [
0 => "Đây là tên thật của bạn chứ không phải tên Tài khoản đăng nhập đâu nha.",
],
"http://yourwebsite.com" => [
0 => "http://trang-web-của-bạn.com",
],
"Bio" => [
0 => "Tiểu sử",
],
"Tell us a little bit about you" => [
0 => "Cho chúng tôi biết một chút về bạn",
],
"User has no connections." => [
0 => "Người dùng chưa có kết nối đến mạng xã hội",
],
@ -1786,8 +2134,17 @@ $translation_table = [
"resend account activation" => [
0 => "gửi lại email kích hoạt tài khoản",
],
"If you have already signed up maybe you need to request to %s" => [
0 => "Nếu bạn đã đăng ký, có thể bạn cần yêu cầu %s",
"I'm at least %s years old" => [
0 => "Tôi ít nhất %s tuổi",
],
"terms" => [
0 => "quy định",
],
"privacy policy" => [
0 => "chính sách bảo mật",
],
"I agree to the %terms_link and %privacy_link" => [
0 => "Tôi đồng ý với %terms_link và %privacy_link",
],
"Upload profile background" => [
0 => "Tải lên hình nền cho trang cá nhân",
@ -1807,6 +2164,9 @@ $translation_table = [
"Follower" => [
0 => "Người theo dõi",
],
"Follow" => [
0 => "Theo dõi",
],
"General questions/comments" => [
0 => "Hỏi đáp, thắc mắc, kiến nghị",
],
@ -1819,9 +2179,6 @@ $translation_table = [
"Invalid subject" => [
0 => "Tiêu đề không hợp lệ",
],
"Invalid reCAPTCHA" => [
0 => "Sai mã reCAPTCHA",
],
"Mail error" => [
0 => "Lỗi mail",
],
@ -1840,6 +2197,9 @@ $translation_table = [
"Subject" => [
0 => "Chủ đề",
],
"Installed version is v%s" => [
0 => "Phiên bản đã cài là v%s",
],
"Can't connect to %s" => [
0 => "Không thể kết nối tới %s\n",
],
@ -1867,6 +2227,9 @@ $translation_table = [
"Extraction completed" => [
0 => "Giải nén thành công",
],
"Proceding to install the update" => [
0 => "Tiến hành cài đặt bản cập nhật",
],
"Update failed" => [
0 => "Cập nhật thất bại",
],
@ -1879,6 +2242,9 @@ $translation_table = [
"Select existing album" => [
0 => "Chọn album sẵn có",
],
"An error occurred. Please try again later." => [
0 => "Có lỗi xảy ra, hãy quay lại sau.",
],
"Please select a valid image file type." => [
0 => "Hãy chọn loại ảnh phù hợp",
],
@ -1897,12 +2263,30 @@ $translation_table = [
"Error deleting profile background image." => [
0 => "Xóa hình nền bị lỗi.",
],
"Update available v%s" => [
0 => "Cập nhật có sẵn v%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." => [
0 => "Có bản update mới cho hệ thống của bạn. Bạn có thể tự động tải xuống và cài đặt bản update này hoặc truy cập %s để tải file xuống",
],
"Update now" => [
0 => "Cập nhật ngay",
],
"This website is running latest %s version" => [
0 => "Trang web này đang chạy phiên bản %s mới nhất",
],
"Toggle select" => [
0 => "Chọn chuyển đổi",
],
"Previous" => [
0 => "Trước",
],
"Next" => [
0 => "Tiếp",
],
"Clipboard image" => [
0 => "Lưu tạm ảnh",
],
"File too big." => [
0 => "Hình quá lớn",
],

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

Binary file not shown.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,936 @@
msgid ""
msgstr ""
"Project-Id-Version: VERSION\n"
"POT-Creation-Date: 2020-03-31 21:05+0000\n"
"PO-Revision-Date: 2020-03-31 21:05+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE TEAM <EMAIL@ADDRESS>\n"
"Language: et_EE\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../../../app/install/installer.php:1168
#: ../../../app/install/installer.php:1177
#: ../../../app/install/installer.php:1180
#: ../../../app/routes/route.account.php:414
#: ../../../app/routes/route.json.php:579
#: ../../../app/routes/route.json.php:1107
#: ../../../app/routes/route.page.php:80
#: ../../../app/routes/route.settings.php:185
#: ../../../app/routes/route.signup.php:97
#: ../../../content/pages/default/contact.php:28
msgid "Invalid email"
msgstr "Vigane email"
#: ../../../app/install/installer.php:1171
#: ../../../app/routes/route.json.php:574
#: ../../../app/routes/route.settings.php:181
#: ../../../app/routes/route.signup.php:100
msgid "Invalid username"
msgstr "Vigane kasutaja"
#: ../../../app/install/installer.php:1174
#: ../../../app/routes/route.account.php:357
#: ../../../app/routes/route.json.php:584
#: ../../../app/routes/route.settings.php:323
#: ../../../app/routes/route.signup.php:103
msgid "Invalid password"
msgstr "Vigane parool"
#: ../../../app/install/installer.php:1183
#: ../../../app/routes/route.dashboard.php:667
msgid "Invalid website mode"
msgstr "Vigane veebilehe laad"
#: ../../../app/install/template/ready.php:31
#: ../../../app/themes/Peafowl/views/dashboard.php:1760
msgid "From email address"
msgstr "Saatja email"
#: ../../../app/install/template/ready.php:32
#: ../../../app/themes/Peafowl/views/dashboard.php:1763
msgid "Sender email for emails sent to users."
msgstr "Saatja email millega saadetakse kasutajatele."
#: ../../../app/install/template/ready.php:36
#: ../../../app/themes/Peafowl/views/dashboard.php:1766
msgid "Incoming email address"
msgstr "Sissetulev emaili aadres"
#: ../../../app/install/template/ready.php:44
#: ../../../app/themes/Peafowl/views/dashboard.php:327
msgid "Website mode"
msgstr "Veebilehe laad"
#: ../../../app/install/template/ready.php:45
#: ../../../app/themes/Peafowl/views/dashboard.php:334
msgid "You can switch the website mode anytime."
msgstr "Saad vahetada veebilehe laadi igal ajal."
#: ../../../app/install/template/ready.php:47
#: ../../../app/themes/Peafowl/views/dashboard.php:330
msgid "Community"
msgstr "Kommuun"
#: ../../../app/install/template/ready.php:47
#: ../../../app/themes/Peafowl/views/dashboard.php:330
msgid "Personal"
msgstr "Peronaalne"
#: ../../../app/install/update/template/update.php:2
msgid "Update in progress"
msgstr "Käimas on uuendamine"
#: ../../../app/install/update/updater.php:72
#, php-format
msgid "Missing %s file"
msgstr "Puudu %s fail"
#: ../../../app/install/update/updater.php:78
msgid "Invalid license info"
msgstr "Vigane litsentsi info"
#: ../../../app/install/update/updater.php:84
msgid "Invalid license key"
msgstr "Vigane litsentsi kood"
#: ../../../app/install/update/updater.php:87
msgid "Can't save file"
msgstr "Faili ei saa salvestada"
#: ../../../app/install/update/updater.php:100
#, php-format
msgid "Can't download %s"
msgstr "Ei saa alla laadida %s"
#: ../../../app/install/update/updater.php:62
#: ../../../app/themes/Peafowl/views/account/password-forgot.php:22
#: ../../../app/lib/chevereto.js:1237 ../../../app/lib/chevereto.js:1313
#: ../../../app/lib/chevereto.js:1391 ../../../app/lib/chevereto.js:1539
#: ../../../app/lib/chevereto.js:1623 ../../../app/lib/chevereto.js:1668
#: ../../../app/lib/chevereto.min.js:59 ../../../app/lib/chevereto.min.js:63
#: ../../../app/lib/chevereto.min.js:67 ../../../app/lib/chevereto.min.js:70
#: ../../../app/lib/chevereto.min.js:74 ../../../app/lib/chevereto.min.js:77
#: ../../../lib/Peafowl/peafowl.js:2560 ../../../lib/Peafowl/peafowl.js:3096
#: ../../../lib/Peafowl/peafowl.min.js:158
#: ../../../lib/Peafowl/peafowl.min.js:195
msgid "An error occurred. Please try again later."
msgstr "Ilmnes viga. Palun proovi hiljem uuesti."
#: ../../../app/routes/route.account.php:360
#: ../../../app/routes/route.settings.php:327
#: ../../../app/themes/Peafowl/views/account/password-reset.php:36
#: ../../../app/themes/Peafowl/views/settings.php:313
#: ../../../app/themes/Peafowl/views/settings.php:330
#: ../../../app/lib/chevereto.js:1516 ../../../app/lib/chevereto.min.js:69
msgid "Passwords don't match"
msgstr "Parool ei ühti"
#: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:76
#: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:80
#: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:92
#: ../../../app/themes/Peafowl/views/dashboard.php:2044
#: ../../../app/themes/Peafowl/views/settings.php:463
#: ../../../content/pages/default/contact.php:123
#: ../../../app/lib/chevereto.js:1548 ../../../app/lib/chevereto.min.js:71
#: ../../../lib/Peafowl/peafowl.js:2326 ../../../lib/Peafowl/peafowl.min.js:140
msgid "cancel"
msgstr "katkesta"
#: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:146
#: ../../../app/themes/Peafowl/tpl_list_item/item_album_edit_tools.php:6
#: ../../../app/themes/Peafowl/tpl_list_item/item_image_edit_tools.php:12
#: ../../../app/themes/Peafowl/tpl_list_item/item_image_edit_tools.php:13
msgid "Edit"
msgstr "Muuda"
#: ../../../app/themes/Peafowl/snippets/form_move_existing_album.php:3
#: ../../../app/themes/Peafowl/tpl_list_item/item_album_edit_tools.php:8
#: ../../../app/themes/Peafowl/tpl_list_item/item_album_edit_tools.php:9
#: ../../../app/themes/Peafowl/tpl_list_item/item_image_edit_tools.php:16
#: ../../../app/themes/Peafowl/tpl_list_item/item_image_edit_tools.php:17
#: ../../../app/themes/Peafowl/views/dashboard.php:28
msgid "Album"
msgid_plural "Albums"
msgstr[0] "Album"
msgstr[1] "Albumid"
#: ../../../app/themes/Peafowl/header.php:222
msgid "Close"
msgstr "Sulge"
#: ../../../app/lib/classes/class.listing.php:296
#: ../../../app/routes/route.album.php:177
#: ../../../app/themes/Peafowl/snippets/breadcrum_owner_card.php:25
#: ../../../app/themes/Peafowl/views/album.php:34
#: ../../../app/themes/Peafowl/views/user.php:98
#: ../../../app/lib/chevereto.js:2412 ../../../app/lib/chevereto.min.js:126
msgid "image"
msgid_plural "images"
msgstr[0] "pilt"
msgstr[1] "pildid"
#: ../../../app/routes/route.user.php:89
#: ../../../app/themes/Peafowl/header.php:56
#, php-format, javascript-format
msgid "%s's Albums"
msgstr "%s Albumid"
#: ../../../app/lib/classes/class.album.php:100
msgid "Untitled"
msgstr "Tiitlita"
msgid "Note: This content is password protected. Remember to pass the content password to share."
msgstr "Märkus: Sisu on märgitud parooliga kaitstuks. Pea meeles jagada parooli."
#: ../../../app/themes/Peafowl/snippets/modal_share.php:14
#: ../../../app/themes/Peafowl/views/album.php:74
#: ../../../app/themes/Peafowl/views/image.php:272
msgid "Note: This content is private. Change privacy to \"public\" to share."
msgstr "Märkus: Sisu on märgitud privaatseks. Määra privaatsus seadetest \"avalik\" teistega jagamiseks."
#: ../../../app/themes/Peafowl/views/dashboard.php:366
msgid "Private"
msgstr "Privaatne"
#: ../../../app/themes/Peafowl/snippets/form_album.php:20
#: ../../../app/themes/Peafowl/views/dashboard.php:366
msgid "Public"
msgstr "Avalik"
#: ../../../app/lib/classes/class.page.php:137
#: ../../../app/themes/Peafowl/snippets/modal_share.php:10
#: ../../../app/themes/Peafowl/views/dashboard.php:461
msgid "Link"
msgstr "Link"
#: ../../../app/routes/route.settings.php:64
#: ../../../app/themes/Peafowl/header.php:292
#: ../../../app/themes/Peafowl/header.php:340
#: ../../../app/themes/Peafowl/snippets/form_storage_edit.php:92
#: ../../../app/themes/Peafowl/snippets/form_storage_edit.php:93
#: ../../../app/themes/Peafowl/snippets/form_storage_edit.php:126
#: ../../../app/themes/Peafowl/snippets/modal_login.php:21
#: ../../../app/themes/Peafowl/views/dashboard.php:104
#: ../../../app/themes/Peafowl/views/dashboard.php:105
#: ../../../app/themes/Peafowl/views/login.php:39
#: ../../../app/themes/Peafowl/views/settings.php:322
#: ../../../app/themes/Peafowl/views/signup.php:49
#: ../../../app/themes/Peafowl/views/signup.php:50
msgid "Password"
msgstr "Parool"
#: ../../../app/lib/classes/class.image.php:1230
msgid "view"
msgid_plural "views"
msgstr[0] "vaatamine"
msgstr[1] "vaatamist"
#: ../../../app/lib/functions.php:42 ../../../app/lib/functions.php:54
msgid "minute"
msgid_plural "minutes"
msgstr[0] "minut"
msgstr[1] "minutit"
#: ../../../app/lib/functions.php:41 ../../../app/lib/functions.php:53
msgid "hour"
msgid_plural "hours"
msgstr[0] "tund"
msgstr[1] "tundi"
#: ../../../app/lib/functions.php:40 ../../../app/lib/functions.php:52
msgid "day"
msgid_plural "days"
msgstr[0] "päev"
msgstr[1] "päeva"
#: ../../../app/lib/functions.php:39 ../../../app/lib/functions.php:51
msgid "week"
msgid_plural "weeks"
msgstr[0] "nädal"
msgstr[1] "nädalat"
#: ../../../app/lib/functions.php:38 ../../../app/lib/functions.php:50
msgid "month"
msgid_plural "months"
msgstr[0] "kuu"
msgstr[1] "kuud"
#: ../../../app/lib/functions.php:37 ../../../app/lib/functions.php:49
msgid "year"
msgid_plural "years"
msgstr[0] "aasta"
msgstr[1] "aastat"
#: ../../../app/lib/classes/class.image.php:348
msgid "Don't autodelete"
msgstr "Ära kustuta automaatselt"
#: ../../../app/lib/classes/class.image.php:955
#: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:76
msgid "Private upload"
msgstr "Privaatne üleslaadimine"
#: ../../../app/lib/classes/class.image.php:1231
msgid "like"
msgid_plural "likes"
msgstr[0] "meeldimine"
msgstr[1] "meeldimist"
msgid "Recent"
msgstr "Viimati lisatud"
msgid "Trending"
msgstr "Kuum"
#: ../../../app/routes/route.dashboard.php:1163
msgid "Top users"
msgstr "Top kasutajad"
#: ../../../app/routes/route.album.php:80
#: ../../../app/routes/route.category.php:48
#: ../../../app/routes/route.dashboard.php:1105
#: ../../../app/routes/route.dashboard.php:1142
#: ../../../app/routes/route.dashboard.php:1171
#: ../../../app/routes/route.explore.php:34
#: ../../../app/routes/route.following.php:21
#: ../../../app/routes/route.user.php:187
#: ../../../app/routes/route.user.php:232
#: ../../../app/routes/route.user.php:255
#: ../../../app/themes/Peafowl/views/index.php:46
msgid "Most recent"
msgstr "Viimased"
#: ../../../app/routes/route.dashboard.php:1113
#: ../../../app/routes/route.dashboard.php:1150
#: ../../../app/routes/route.dashboard.php:1179
#: ../../../app/routes/route.user.php:238
#: ../../../app/routes/route.user.php:261
msgid "Oldest"
msgstr "Vanimad"
#: ../../../app/routes/route.album.php:96
#: ../../../app/routes/route.category.php:64
#: ../../../app/routes/route.dashboard.php:1121
#: ../../../app/routes/route.explore.php:50
#: ../../../app/routes/route.following.php:29
#: ../../../app/routes/route.user.php:201
msgid "Most viewed"
msgstr "Enim vaadatud"
msgid "Popular"
msgstr "Populaarsed"
#: ../../../app/routes/route.explore.php:89
#: ../../../app/themes/Peafowl/header.php:188
#: ../../../app/themes/Peafowl/header.php:206
#: ../../../app/themes/Peafowl/views/dashboard.php:305
#: ../../../app/themes/Peafowl/views/explore.php:9
msgid "Explore"
msgstr "Sirvi pilte"
msgid "Animated"
msgstr "Animeeritud"
#: ../../../app/routes/route.search.php:130
#: ../../../app/themes/Peafowl/header.php:215
#: ../../../app/themes/Peafowl/header.php:220
#: ../../../app/themes/Peafowl/views/dashboard.php:295
msgid "Search"
msgstr "Otsi"
#: ../../../app/themes/Peafowl/views/dashboard.php:22
msgid "Image"
msgid_plural "Images"
msgstr[0] "pilt"
msgstr[1] "Pildid"
#: ../../../app/themes/Peafowl/views/dashboard.php:34
#: ../../../app/themes/Peafowl/views/dashboard.php:90
#: ../../../app/themes/Peafowl/views/settings.php:126
msgid "User"
msgid_plural "Users"
msgstr[0] "Kasutaja"
msgstr[1] "Kasutajad"
msgid "Can't update storage details."
msgstr "Ei saanud uuendada salvestamise detaile."
#: ../../../app/lib/classes/class.storage.php:720
msgid "Unlimited"
msgstr "Piiramatu"
#: ../../../app/lib/classes/class.storage.php:720
msgid "used"
msgstr "kasutatud"
msgid "Private profile"
msgstr "Privaatne profiil"
#: ../../../app/lib/functions.php:43 ../../../app/lib/functions.php:55
msgid "second"
msgid_plural "seconds"
msgstr[0] "sekund"
msgstr[1] "sekundit"
#: ../../../app/lib/functions.php:67
#, php-format
msgid "%s ago"
msgstr "%s tagasi"
#: ../../../app/lib/functions.php:67
msgid "moments ago"
msgstr "hetk tagasi"
#: ../../../app/loader.php:396 ../../../app/themes/Peafowl/views/404.php:6
msgid "That page doesn't exist"
msgstr "Seda lehte ei eksisteeri"
#: ../../../app/routes/route.account.php:72
#: ../../../app/themes/Peafowl/header.php:295
#: ../../../app/themes/Peafowl/snippets/modal_login.php:24
#: ../../../app/themes/Peafowl/views/account/password-forgot.php:8
#: ../../../app/themes/Peafowl/views/login.php:41
#: ../../../app/themes/Peafowl/views/settings.php:299
msgid "Forgot password?"
msgstr "Unustasid parooli ?"
#: ../../../app/routes/route.account.php:73
#: ../../../app/themes/Peafowl/views/account/password-reset.php:8
msgid "Reset password"
msgstr "Taasta parool"
#: ../../../app/routes/route.account.php:74
#: ../../../app/themes/Peafowl/views/account/resend-activation.php:8
msgid "Resend account activation"
msgstr "Saada uuesti konto kinnitamise e-mail"
#: ../../../app/routes/route.account.php:76
#: ../../../app/themes/Peafowl/views/account/email-needed.php:8
msgid "Add your email address"
msgstr "Lisa oma e-mail"
#: ../../../app/routes/route.account.php:77
#: ../../../app/themes/Peafowl/views/account/email-changed.php:7
msgid "Email changed"
msgstr "E-mail muudetud"
#: ../../../app/routes/route.account.php:119
#: ../../../app/routes/route.account.php:164
#: ../../../app/routes/route.account.php:271
msgid "Invalid Username/Email"
msgstr "Vale Kasutajanimi/Parool"
#: ../../../app/routes/route.account.php:145
msgid "Account needs to be activated to use this feature"
msgstr "Konto peab olema aktiveeritud"
#: ../../../app/routes/route.account.php:151
msgid "Account already activated"
msgstr "Konto on juba aktiveeritud"
#: ../../../app/routes/route.account.php:192
msgid "Allow up to 15 minutes for the email. You can try again later."
msgstr "E-maili saabumine võib võtta aega kuni 15 minutit. Proovi hiljem uuesti."
#: ../../../app/routes/route.account.php:422
#: ../../../app/routes/route.json.php:599
#: ../../../app/routes/route.settings.php:243
#: ../../../app/routes/route.signup.php:141
msgid "Email already being used"
msgstr "E-mail on juba kasutusel"
msgid "Password required"
msgstr "Parool nõutud"
#: ../../../app/routes/route.album.php:115
#: ../../../app/themes/Peafowl/snippets/modal_share.php:4
#: ../../../app/themes/Peafowl/views/album.php:36
#: ../../../app/themes/Peafowl/views/image.php:89
msgid "Share"
msgstr "Jaga"
#: ../../../app/routes/route.image.php:127
#: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:99
#: ../../../app/themes/Peafowl/snippets/embed_tpl.php:110
msgid "Embed codes"
msgstr "HTML ja BBKoodi tag'id"
#: ../../../app/routes/route.dashboard.php:38
msgid "Stats"
msgstr "Statistika"
#: ../../../app/routes/route.dashboard.php:39
#: ../../../app/routes/route.search.php:85
#: ../../../app/routes/route.user.php:85 ../../../app/routes/route.user.php:277
#: ../../../app/themes/Peafowl/views/settings.php:73
msgid "Images"
msgstr "Pildid"
#: ../../../app/routes/route.dashboard.php:40
#: ../../../app/routes/route.search.php:92
#: ../../../app/routes/route.user.php:90 ../../../app/routes/route.user.php:283
#: ../../../app/themes/Peafowl/header.php:403
#: ../../../app/themes/Peafowl/views/settings.php:77
msgid "Albums"
msgstr "Albumid"
#: ../../../app/routes/route.dashboard.php:41
#: ../../../app/routes/route.dashboard.php:233
#: ../../../app/routes/route.search.php:99
msgid "Users"
msgstr "Kasutajad"
#: ../../../app/routes/route.dashboard.php:42
#: ../../../app/routes/route.settings.php:498
#: ../../../app/themes/Peafowl/header.php:363
#: ../../../app/themes/Peafowl/header.php:405
msgid "Settings"
msgstr "Seaded"
#: ../../../app/routes/route.dashboard.php:161
msgid "Chevereto version"
msgstr "Chevereto versioon"
#: ../../../app/routes/route.dashboard.php:162
msgid "install update"
msgstr "installeeri uuendus"
#: ../../../app/routes/route.dashboard.php:162
msgid "check for updates"
msgstr "kontrolli uuendusi"
msgid "Support"
msgstr "Kasutajatugi"
#: ../../../app/routes/route.dashboard.php:190
#: ../../../app/themes/Peafowl/views/dashboard.php:298
#: ../../../app/themes/Peafowl/views/dashboard.php:308
#: ../../../app/themes/Peafowl/views/dashboard.php:318
#: ../../../app/themes/Peafowl/views/dashboard.php:633
#: ../../../app/themes/Peafowl/views/dashboard.php:642
#: ../../../app/themes/Peafowl/views/dashboard.php:652
#: ../../../app/themes/Peafowl/views/dashboard.php:678
#: ../../../app/themes/Peafowl/views/dashboard.php:750
#: ../../../app/themes/Peafowl/views/dashboard.php:962
#: ../../../app/themes/Peafowl/views/dashboard.php:975
#: ../../../app/themes/Peafowl/views/dashboard.php:986
#: ../../../app/themes/Peafowl/views/dashboard.php:995
#: ../../../app/themes/Peafowl/views/dashboard.php:1024
#: ../../../app/themes/Peafowl/views/dashboard.php:1034
#: ../../../app/themes/Peafowl/views/dashboard.php:1073
#: ../../../app/themes/Peafowl/views/dashboard.php:1082
#: ../../../app/themes/Peafowl/views/dashboard.php:1091
#: ../../../app/themes/Peafowl/views/dashboard.php:1101
#: ../../../app/themes/Peafowl/views/dashboard.php:1247
#: ../../../app/themes/Peafowl/views/dashboard.php:1302
#: ../../../app/themes/Peafowl/views/dashboard.php:1312
#: ../../../app/themes/Peafowl/views/dashboard.php:1324
#: ../../../app/themes/Peafowl/views/dashboard.php:1336
#: ../../../app/themes/Peafowl/views/dashboard.php:1346
#: ../../../app/themes/Peafowl/views/dashboard.php:1356
#: ../../../app/themes/Peafowl/views/dashboard.php:1368
#: ../../../app/themes/Peafowl/views/dashboard.php:1475
#: ../../../app/themes/Peafowl/views/dashboard.php:1573
#: ../../../app/themes/Peafowl/views/dashboard.php:1582
#: ../../../app/themes/Peafowl/views/dashboard.php:1592
#: ../../../app/themes/Peafowl/views/dashboard.php:1627
#: ../../../app/themes/Peafowl/views/dashboard.php:1637
#: ../../../app/themes/Peafowl/views/dashboard.php:1835
#: ../../../app/themes/Peafowl/views/dashboard.php:1861
#: ../../../app/themes/Peafowl/views/dashboard.php:1894
#: ../../../app/themes/Peafowl/views/dashboard.php:1920
#: ../../../app/themes/Peafowl/views/dashboard.php:1946
#: ../../../app/themes/Peafowl/views/dashboard.php:1965
#: ../../../app/themes/Peafowl/views/dashboard.php:2010
#: ../../../app/themes/Peafowl/views/dashboard.php:2031
msgid "Enabled"
msgstr "Lubatud"
#: ../../../app/routes/route.dashboard.php:190
#: ../../../app/themes/Peafowl/views/dashboard.php:298
#: ../../../app/themes/Peafowl/views/dashboard.php:308
#: ../../../app/themes/Peafowl/views/dashboard.php:318
#: ../../../app/themes/Peafowl/views/dashboard.php:633
#: ../../../app/themes/Peafowl/views/dashboard.php:642
#: ../../../app/themes/Peafowl/views/dashboard.php:652
#: ../../../app/themes/Peafowl/views/dashboard.php:679
#: ../../../app/themes/Peafowl/views/dashboard.php:750
#: ../../../app/themes/Peafowl/views/dashboard.php:962
#: ../../../app/themes/Peafowl/views/dashboard.php:975
#: ../../../app/themes/Peafowl/views/dashboard.php:986
#: ../../../app/themes/Peafowl/views/dashboard.php:995
#: ../../../app/themes/Peafowl/views/dashboard.php:1024
#: ../../../app/themes/Peafowl/views/dashboard.php:1034
#: ../../../app/themes/Peafowl/views/dashboard.php:1073
#: ../../../app/themes/Peafowl/views/dashboard.php:1082
#: ../../../app/themes/Peafowl/views/dashboard.php:1091
#: ../../../app/themes/Peafowl/views/dashboard.php:1101
#: ../../../app/themes/Peafowl/views/dashboard.php:1247
#: ../../../app/themes/Peafowl/views/dashboard.php:1302
#: ../../../app/themes/Peafowl/views/dashboard.php:1312
#: ../../../app/themes/Peafowl/views/dashboard.php:1324
#: ../../../app/themes/Peafowl/views/dashboard.php:1336
#: ../../../app/themes/Peafowl/views/dashboard.php:1346
#: ../../../app/themes/Peafowl/views/dashboard.php:1356
#: ../../../app/themes/Peafowl/views/dashboard.php:1368
#: ../../../app/themes/Peafowl/views/dashboard.php:1475
#: ../../../app/themes/Peafowl/views/dashboard.php:1573
#: ../../../app/themes/Peafowl/views/dashboard.php:1582
#: ../../../app/themes/Peafowl/views/dashboard.php:1592
#: ../../../app/themes/Peafowl/views/dashboard.php:1627
#: ../../../app/themes/Peafowl/views/dashboard.php:1637
#: ../../../app/themes/Peafowl/views/dashboard.php:1835
#: ../../../app/themes/Peafowl/views/dashboard.php:1861
#: ../../../app/themes/Peafowl/views/dashboard.php:1894
#: ../../../app/themes/Peafowl/views/dashboard.php:1920
#: ../../../app/themes/Peafowl/views/dashboard.php:1946
#: ../../../app/themes/Peafowl/views/dashboard.php:1965
#: ../../../app/themes/Peafowl/views/dashboard.php:2010
#: ../../../app/themes/Peafowl/views/dashboard.php:2031
msgid "Disabled"
msgstr "Keelatud"
msgid "Max. upload file size"
msgstr "Max faili suurus"
#: ../../../app/routes/route.dashboard.php:567
msgid "Invalid timezone"
msgstr "Vale ajatsoon"
#: ../../../app/routes/route.login.php:148
#: ../../../app/themes/Peafowl/header.php:269
#: ../../../app/themes/Peafowl/header.php:275
#: ../../../app/themes/Peafowl/views/login.php:8
#: ../../../app/themes/Peafowl/views/login.php:52
msgid "Sign in"
msgstr "Logi sisse"
msgid "Upload images"
msgstr "Lae pilt ülesse"
#: ../../../app/routes/route.settings.php:62
msgid "Account"
msgstr "Konto"
#: ../../../app/routes/route.settings.php:63
msgid "Profile"
msgstr "Profiil"
#: ../../../app/routes/route.settings.php:313
msgid "Wrong password"
msgstr "Vale parool"
#: ../../../app/routes/route.settings.php:435
msgid "Password has been changed"
msgstr "Parool muudetud edukalt"
#: ../../../app/routes/route.signup.php:251
#: ../../../app/themes/Peafowl/header.php:316
#: ../../../app/themes/Peafowl/header.php:322
#: ../../../app/themes/Peafowl/views/index.php:81
#: ../../../app/themes/Peafowl/views/signup.php:8
#: ../../../app/themes/Peafowl/views/signup.php:63
msgid "Create account"
msgstr "Loo konto"
#: ../../../app/themes/Peafowl/header.php:258
#: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:76
msgid "Upload"
msgstr "Lae pilt..."
msgid "Discovery"
msgstr "Avasta"
#: ../../../app/themes/Peafowl/header.php:222
#: ../../../app/themes/Peafowl/header.php:226
msgid "Advanced search"
msgstr "Täpsem otsing"
#: ../../../app/themes/Peafowl/header.php:233
#: ../../../app/themes/Peafowl/views/dashboard.php:315
#: ../../../app/themes/Peafowl/views/dashboard.php:713
msgid "Random"
msgstr "Suvaline pilt"
#: ../../../app/themes/Peafowl/header.php:402
msgid "My Profile"
msgstr "Minu konto"
#: ../../../app/themes/Peafowl/header.php:409
msgid "Sign out"
msgstr "Logi välja"
#: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:13
msgid "Drag and drop or paste images here to upload"
msgstr "Lohista fail siia või lae ülesse clipboardist"
msgid "browse from your computer"
msgstr "valida faili arvutist"
msgid "add image URLs"
msgstr "lisada läbi lingi"
msgid "You can also %i or %u."
msgstr "Sa saad %i või %u"
msgid "Edit or resize any image by clicking the image preview"
msgstr "Muuda pilti või pildi suurust vajutades pisipildile"
msgid "your computer"
msgstr "arvutist"
msgid "You can add more images from %i or %u."
msgstr "Saad lisada pilte juurde %i või %u"
msgid "sign in"
msgstr "logi sisse"
#: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:91
msgid "close"
msgstr "sulge"
#: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:148
#: ../../../app/themes/Peafowl/views/dashboard.php:666
msgid "Remove"
msgstr "Kustuta"
#: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:154
msgid "Edit image"
msgstr "Muuda pilti"
#: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:158
#: ../../../app/themes/Peafowl/snippets/form_image.php:4
#: ../../../app/themes/Peafowl/views/dashboard.php:441
#: ../../../app/themes/Peafowl/views/dashboard.php:597
#: ../../../app/themes/Peafowl/views/dashboard.php:1440
#: ../../../app/themes/Peafowl/views/settings.php:434
msgid "Title"
msgstr "Pealkiri"
#: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:158
#: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:200
#: ../../../app/themes/Peafowl/snippets/form_album.php:12
#: ../../../app/themes/Peafowl/snippets/form_category_edit.php:12
#: ../../../app/themes/Peafowl/snippets/form_image.php:4
#: ../../../app/themes/Peafowl/snippets/form_image.php:28
#: ../../../app/themes/Peafowl/snippets/form_ip_ban_edit.php:9
#: ../../../app/themes/Peafowl/snippets/form_ip_ban_edit.php:15
#: ../../../app/themes/Peafowl/snippets/form_storage_edit.php:104
#: ../../../app/themes/Peafowl/snippets/form_storage_edit.php:108
#: ../../../app/themes/Peafowl/views/dashboard.php:503
#: ../../../app/themes/Peafowl/views/dashboard.php:509
#: ../../../app/themes/Peafowl/views/dashboard.php:566
#: ../../../app/themes/Peafowl/views/dashboard.php:573
#: ../../../app/themes/Peafowl/views/dashboard.php:580
#: ../../../app/themes/Peafowl/views/dashboard.php:1418
#: ../../../app/themes/Peafowl/views/dashboard.php:1428
msgid "optional"
msgstr "valikuline"
#: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:167
msgid "Resize image"
msgstr "Pildi mõõtmed"
#: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:176
msgid "Note: Animated GIF images won't be resized."
msgstr "Animeeritud (gif) failide pildi suurust ei saa muuta!"
#: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:180
msgid "Auto delete image"
msgstr "Kustuta pilt automaatselt"
#: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:200
#: ../../../app/themes/Peafowl/snippets/form_category_edit.php:12
#: ../../../app/themes/Peafowl/snippets/form_image.php:28
#: ../../../app/themes/Peafowl/views/dashboard.php:877
msgid "Description"
msgstr "Kirjeldus"
#: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:201
#: ../../../app/themes/Peafowl/snippets/form_image.php:29
msgid "Brief description of this image"
msgstr "...."
#: ../../../app/themes/Peafowl/snippets/form_album.php:7
#: ../../../app/themes/Peafowl/snippets/form_album.php:8
msgid "Album name"
msgstr "Albumi nimi"
#: ../../../app/themes/Peafowl/snippets/form_album.php:21
msgid "Private (just me)"
msgstr "Privaatne(ainult minule)"
msgid "Album password"
msgstr "Albumi parool"
#: ../../../app/themes/Peafowl/snippets/form_category_edit.php:4
#: ../../../app/themes/Peafowl/snippets/form_storage_edit.php:3
#: ../../../app/themes/Peafowl/views/dashboard.php:875
#: ../../../app/themes/Peafowl/views/dashboard.php:1693
#: ../../../app/themes/Peafowl/views/settings.php:364
#: ../../../content/pages/default/contact.php:87
msgid "Name"
msgstr "Nimi"
#: ../../../app/themes/Peafowl/snippets/listing_tools_editor.php:10
msgid "Select all"
msgstr "Vali kõik"
#: ../../../app/themes/Peafowl/snippets/listing_tools_editor.php:10
#: ../../../app/themes/Peafowl/snippets/listing_tools_editor.php:56
msgid "Clear selection"
msgstr "Eemalda valik"
#: ../../../app/themes/Peafowl/snippets/listing_tools_editor.php:13
msgid "Selection"
msgstr "Valitud"
#: ../../../app/themes/Peafowl/header.php:281
#: ../../../app/themes/Peafowl/snippets/modal_login.php:11
#: ../../../app/themes/Peafowl/snippets/modal_login.php:40
#: ../../../app/themes/Peafowl/views/login.php:18
#: ../../../app/themes/Peafowl/views/login.php:65
#: ../../../app/themes/Peafowl/views/signup.php:18
#: ../../../app/themes/Peafowl/views/signup.php:76
msgid "Sign in with another account"
msgstr "Logi sisse kasutades..."
#: ../../../app/themes/Peafowl/snippets/template_content_empty.php:5
#: ../../../app/themes/Peafowl/views/dashboard.php:618
#: ../../../app/themes/Peafowl/views/index.php:63
msgid "There's nothing to show here."
msgstr "Tühjus... Pole midagi näidata!"
#: ../../../app/themes/Peafowl/snippets/user_items_editor.php:16
#: ../../../app/themes/Peafowl/views/image.php:69
#: ../../../app/themes/Peafowl/views/image.php:457
msgid "Edit image details"
msgstr "Muuda pilti"
#: ../../../app/themes/Peafowl/views/404.php:7
msgid "The requested page was not found."
msgstr "Soovitud lehekülge ei leitud!"
#: ../../../app/themes/Peafowl/views/404.php:22
msgid "The user has been deleted"
msgstr "Kasutaja kustutatud"
#: ../../../app/themes/Peafowl/views/account/password-forgot.php:52
#: ../../../app/themes/Peafowl/views/account/password-reset.php:47
#: ../../../app/themes/Peafowl/views/account/resend-activation.php:37
#: ../../../lib/Peafowl/peafowl.js:417 ../../../lib/Peafowl/peafowl.js:2324
#: ../../../lib/Peafowl/peafowl.min.js:25
#: ../../../lib/Peafowl/peafowl.min.js:140
msgid "Submit"
msgstr "Edasi"
#: ../../../app/themes/Peafowl/header.php:291
#: ../../../app/themes/Peafowl/snippets/modal_login.php:20
#: ../../../app/themes/Peafowl/views/account/password-forgot.php:38
#: ../../../app/themes/Peafowl/views/account/password-forgot.php:39
#: ../../../app/themes/Peafowl/views/account/resend-activation.php:23
#: ../../../app/themes/Peafowl/views/login.php:34
#: ../../../app/themes/Peafowl/views/login.php:35
msgid "Username or Email address"
msgstr "Kasutajanimi või e-mail"
#: ../../../app/themes/Peafowl/views/account/password-reset.php:29
#: ../../../app/themes/Peafowl/views/settings.php:306
msgid "Enter your new password"
msgstr "Sisesta uus parool"
#: ../../../app/themes/Peafowl/views/account/password-reset.php:35
#: ../../../app/themes/Peafowl/views/settings.php:312
msgid "Re-enter your new password"
msgstr "Sisesta uuesti uus parool"
#: ../../../app/themes/Peafowl/views/album.php:25
msgid "Delete album"
msgstr "Kustuta album"
#: ../../../app/themes/Peafowl/views/album.php:86
msgid "Album link"
msgstr "Albumi link"
#: ../../../app/themes/Peafowl/header.php:338
#: ../../../app/themes/Peafowl/views/account/email-needed.php:15
#: ../../../app/themes/Peafowl/views/dashboard.php:100
#: ../../../app/themes/Peafowl/views/settings.php:155
#: ../../../app/themes/Peafowl/views/signup.php:34
#: ../../../app/themes/Peafowl/views/signup.php:35
#: ../../../content/pages/default/contact.php:92
msgid "Email address"
msgstr "E-mail"
#: ../../../app/themes/Peafowl/views/dashboard.php:2044
#: ../../../app/themes/Peafowl/views/settings.php:463
#: ../../../lib/Peafowl/peafowl.js:417 ../../../lib/Peafowl/peafowl.min.js:25
msgid "Save changes"
msgstr "Salvesta"
#: ../../../app/themes/Peafowl/views/image.php:145
#, php-format
msgid "Uploaded %s"
msgstr "Üles laetud %s"
#: ../../../app/themes/Peafowl/views/image.php:157
msgid "More Exif data"
msgstr "Vaata exif andmeid"
#: ../../../app/themes/Peafowl/views/image.php:182
#: ../../../app/themes/Peafowl/views/image.php:241
msgid "Share image"
msgstr "Jaga pilti"
#: ../../../app/themes/Peafowl/views/index.php:15
msgid "Upload and share your images."
msgstr "Lae pilt ülesse ja jaga seda"
#: ../../../app/themes/Peafowl/views/index.php:17
#, php-format
msgid "Drag and drop anywhere you want and start uploading your images now. %s limit. Direct image links, BBCode and HTML thumbnails."
msgstr "Lohista oma pilt siia ja alusta üleslaadimist. Kuni %s"
#: ../../../app/themes/Peafowl/views/index.php:25
msgid "Start uploading"
msgstr "Lae pilt..."
#: ../../../app/routes/route.logout.php:29
#: ../../../app/themes/Peafowl/views/logout.php:8
msgid "Logged out"
msgstr "Välja logitud"
#: ../../../app/themes/Peafowl/views/account/awaiting-confirmation.php:10
#: ../../../app/themes/Peafowl/views/account/email-changed.php:11
#: ../../../app/themes/Peafowl/views/account/password-forgot.php:16
#: ../../../app/themes/Peafowl/views/account/password-forgot.php:26
#: ../../../app/themes/Peafowl/views/account/password-reset.php:16
#: ../../../app/themes/Peafowl/views/account/resend-activation.php:13
#: ../../../app/themes/Peafowl/views/logout.php:13
#: ../../../app/themes/Peafowl/views/request-denied.php:13
msgid "Go to homepage"
msgstr "Mine esilehele"
#: ../../../app/themes/Peafowl/views/settings.php:245
msgid "Timezone"
msgstr "Ajatsoon"
#: ../../../app/themes/Peafowl/views/settings.php:296
msgid "Current password"
msgstr "Praegune parool"
#: ../../../app/themes/Peafowl/views/settings.php:297
msgid "Enter your current password"
msgstr "Sisesta praegune parool"
#: ../../../app/themes/Peafowl/views/settings.php:352
#: ../../../app/themes/Peafowl/views/user.php:21
msgid "Upload new image"
msgstr "Lae pilt"
msgid "If you want to send a message fill the form below."
msgstr "Kirjuta meile."

File diff suppressed because it is too large Load diff

3583
app/content/languages/he.po Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,9 +1,9 @@
You can quick and easy override any language string by putting lang_code.po files here.
For example, en.po file whit this contents:
#: START EXAMPLE
msgid "Upload and share your images."
msgstr "Upload and share your photos."
#: END EXAMPLE
You can quick and easy override any language string by putting lang_code.po files here.
For example, en.po file whit this contents:
#: START EXAMPLE
msgid "Upload and share your images."
msgstr "Upload and share your photos."
#: END EXAMPLE
Will replace the original msgid with the new msgstr.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

5046
app/content/languages/th.po Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,74 +1,74 @@
html, body {
margin: 0;
padding: 0;
background: #F4F4F4;
}
body {
color: #333;
}
p, h1, h2, h3, ul {
margin: 20px 0;
}
a {
color: #00A7DA;
text-decoration: none;
}
a img { border: 0; }
#header {
position: relative;
height: 60px;
}
#logo {
position: absolute;
left: 30px;
bottom: -20px;
z-index: 100;
display: block;
}
#logo img {
width: 297px;
height: 55px;
display: inherit;
}
#content {
background: #FFF;
border: 1px solid #DDD;
border-radius: 10px;
padding: 20px 30px 30px 30px;
position: relative;
z-index: 1;
}
ul.errors {
margin: 20px;
}
ul.errors li {
margin: 10px;
list-style: disc;
}
#powered {
font-size: 0.93em;
color: #BBB;
text-shadow: 0 1px 0 #FFF;
text-align: center;
padding: 10px;
}
#powered a {
color: #BBB;
}
code {
background: #f5f2f0;
padding: 2px;
font-family: monospace;
border: 1px solid #DDD;
html, body {
margin: 0;
padding: 0;
background: #F4F4F4;
}
body {
color: #333;
}
p, h1, h2, h3, ul {
margin: 20px 0;
}
a {
color: #00A7DA;
text-decoration: none;
}
a img { border: 0; }
#header {
position: relative;
height: 60px;
}
#logo {
position: absolute;
left: 30px;
bottom: -20px;
z-index: 100;
display: block;
}
#logo img {
width: 297px;
height: 55px;
display: inherit;
}
#content {
background: #FFF;
border: 1px solid #DDD;
border-radius: 10px;
padding: 20px 30px 30px 30px;
position: relative;
z-index: 1;
}
ul.errors {
margin: 20px;
}
ul.errors li {
margin: 10px;
list-style: disc;
}
#powered {
font-size: 0.93em;
color: #BBB;
text-shadow: 0 1px 0 #FFF;
text-align: center;
padding: 10px;
}
#powered a {
color: #BBB;
}
code {
background: #f5f2f0;
padding: 2px;
font-family: monospace;
border: 1px solid #DDD;
}

View file

@ -1,58 +1,84 @@
<?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
--------------------------------------------------------------------- */
if (!defined('access') or !access) {
die('This file cannot be directly accessed.');
} ?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title><?php echo $doctitle; ?></title>
<link rel="stylesheet" href="<?php echo G\absolute_to_url(CHV_PATH_PEAFOWL . 'peafowl.css'); ?>">
<link rel="stylesheet" href="<?php echo G\absolute_to_url(CHV_APP_PATH_CONTENT_SYSTEM . 'style.css'); ?>">
<link rel="shortcut icon" href="<?php echo G\absolute_to_url(CHV_APP_PATH_CONTENT_SYSTEM . 'favicon.png'); ?>">
<script>(function(w,d,u){w.readyQ=[];w.bindReadyQ=[];function p(x,y){if(x=="ready"){w.bindReadyQ.push(y);}else{w.readyQ.push(x);}};var a={ready:p,bind:p};w.$=w.jQuery=function(f){if(f===d||f===u){return a}else{p(f)}}})(window,document);</script>
</head>
<body>
<div class="c20 center-box">
<header id="header">
<div id="logo"><img src="<?php echo G\absolute_to_url(CHV_APP_PATH_CONTENT_SYSTEM . 'chevereto.png'); ?>" alt=""></div>
</header>
<div id="content">
<?php echo $html; ?>
</div>
<div id="powered">&copy; <a href="http://chevereto.com">Chevereto image hosting script</a></div>
</div>
</body>
<script src="<?php echo G\absolute_to_url(CHV_PATH_PEAFOWL . 'js/jquery.min.js'); ?>"></script>
<script src="<?php echo G\absolute_to_url(CHV_PATH_PEAFOWL . 'js/scripts.js'); ?>"></script>
<script>(function($,d){$.each(readyQ,function(i,f){$(f)});$.each(bindReadyQ,function(i,f){$(d).bind("ready",f)})})(jQuery,document)</script>
<script src="<?php echo G\absolute_to_url(CHV_PATH_PEAFOWL . 'peafowl.js'); ?>"></script>
<script>
PF.obj.config.base_url = "<?php echo G\get_base_url(); ?>";
PF.obj.l10n = <?php echo json_encode(CHV\get_translation_table()) ;?>;
</script>
<?php
if (method_exists('CHV\Settings', 'getChevereto')) {
echo '<script>var CHEVERETO = ' . json_encode(CHV\Settings::getChevereto()) . '</script>';
}
?>
<script src="<?php echo CHV\Render\versionize_src(G\Render\get_app_lib_file_url('chevereto.js')); ?>"></script>
<?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
--------------------------------------------------------------------- */
if (!defined('access') or !access) {
die('This file cannot be directly accessed.');
} ?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title><?php echo $doctitle; ?></title>
<link rel="stylesheet" href="<?php echo G\absolute_to_url(CHV_PATH_PEAFOWL . 'peafowl.css'); ?>">
<link rel="stylesheet" href="<?php echo G\absolute_to_url(CHV_APP_PATH_CONTENT_SYSTEM . 'style.css'); ?>">
<link rel="shortcut icon" href="<?php echo G\absolute_to_url(CHV_APP_PATH_CONTENT_SYSTEM . 'favicon.png'); ?>">
<script data-cfasync="false">
function jQueryLoaded() {
! function(n, d) {
n.each(readyQ, function(d, e) {
n(e)
}), n.each(bindReadyQ, function(e, i) {
n(d).bind("ready", i)
})
}(jQuery, document)
}! function(n, d, e) {
function i(d, e) {
"ready" == d ? n.bindReadyQ.push(e) : n.readyQ.push(d)
}
n.readyQ = [], n.bindReadyQ = [];
var u = {
ready: i,
bind: i
};
n.$ = n.jQuery = function(n) {
return n === d || void 0 === n ? u : void i(n)
}
}(window, document);
</script>
</head>
<body>
<div class="c20 center-box">
<header id="header">
<div id="logo"><img src="<?php echo G\absolute_to_url(CHV_APP_PATH_CONTENT_SYSTEM . 'chevereto.png'); ?>" alt=""></div>
</header>
<div id="content">
<?php echo $html; ?>
</div>
<div id="powered">&copy; <a href="http://chevereto.com">Chevereto image hosting script</a></div>
</div>
</body>
<script defer data-cfasync="false" src="<?php echo G\absolute_to_url(CHV_PATH_PEAFOWL . 'js/scripts.js'); ?>" id="jquery-js" onload="jQueryLoaded(this, event)"></script>
<script defer data-cfasync="false" src="<?php echo G\absolute_to_url(CHV_PATH_PEAFOWL . 'peafowl.js'); ?>" id="peafowl-js"></script>
<?php
if (method_exists('CHV\Settings', 'getChevereto')) {
echo '<script>var CHEVERETO = ' . json_encode(CHV\Settings::getChevereto()) . '</script>';
}
?>
<script defer data-cfasync="false" src="<?php echo CHV\Render\versionize_src(G\Render\get_app_lib_file_url('chevereto.js')); ?>" id="chevereto-js"></script>
<script data-cfasync="false">
document.getElementById("chevereto-js").addEventListener("load", function() {
PF.obj.devices = window.devices;
PF.obj.config.base_url = "<?php echo G\get_base_url(); ?>";
PF.obj.config.json_api = "<?php echo G\get_base_url('update'); ?>/";
PF.obj.l10n = <?php echo json_encode(CHV\get_translation_table()); ?>;
PF.obj.config.auth_token = "<?php echo G\Handler::getAuthToken(); ?>";
});
</script>
</html>

File diff suppressed because it is too large Load diff

View file

@ -1,24 +1,24 @@
DROP TABLE IF EXISTS `%table_prefix%albums`;
CREATE TABLE `%table_prefix%albums` (
`album_id` bigint(32) NOT NULL AUTO_INCREMENT,
`album_name` varchar(100) NOT NULL,
`album_user_id` bigint(32) NOT NULL,
`album_date` datetime NOT NULL,
`album_date_gmt` datetime NOT NULL,
`album_creation_ip` varchar(255) NOT NULL,
`album_privacy` enum('public','password','private','private_but_link','custom') DEFAULT 'public',
`album_privacy_extra` text,
`album_password` text,
`album_image_count` bigint(32) NOT NULL DEFAULT '0',
`album_description` text,
`album_likes` bigint(32) NOT NULL DEFAULT '0',
`album_views` bigint(32) NOT NULL DEFAULT '0',
PRIMARY KEY (`album_id`),
KEY `album_name` (`album_name`),
KEY `album_user_id` (`album_user_id`),
KEY `album_date_gmt` (`album_date_gmt`),
KEY `album_privacy` (`album_privacy`),
KEY `album_image_count` (`album_image_count`),
KEY `album_creation_ip` (`album_creation_ip`),
FULLTEXT KEY `searchindex` (`album_name`,`album_description`)
) ENGINE=%table_engine% DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `%table_prefix%albums`;
CREATE TABLE `%table_prefix%albums` (
`album_id` bigint(32) NOT NULL AUTO_INCREMENT,
`album_name` varchar(100) NOT NULL,
`album_user_id` bigint(32) DEFAULT NULL,
`album_date` datetime NOT NULL,
`album_date_gmt` datetime NOT NULL,
`album_creation_ip` varchar(255) NOT NULL,
`album_privacy` enum('public','password','private','private_but_link','custom') DEFAULT 'public',
`album_privacy_extra` mediumtext,
`album_password` mediumtext,
`album_image_count` bigint(32) NOT NULL DEFAULT '0',
`album_description` mediumtext,
`album_likes` bigint(32) NOT NULL DEFAULT '0',
`album_views` bigint(32) NOT NULL DEFAULT '0',
PRIMARY KEY (`album_id`),
KEY `album_name` (`album_name`),
KEY `album_user_id` (`album_user_id`),
KEY `album_date_gmt` (`album_date_gmt`),
KEY `album_privacy` (`album_privacy`),
KEY `album_image_count` (`album_image_count`),
KEY `album_creation_ip` (`album_creation_ip`(191)),
FULLTEXT KEY `searchindex` (`album_name`,`album_description`)
) ENGINE=%table_engine% DEFAULT CHARSET=utf8mb4;

View file

@ -1,9 +1,9 @@
DROP TABLE IF EXISTS `%table_prefix%categories`;
CREATE TABLE `%table_prefix%categories` (
`category_id` bigint(32) NOT NULL AUTO_INCREMENT,
`category_name` varchar(32) NOT NULL,
`category_url_key` varchar(32) NOT NULL,
`category_description` text,
PRIMARY KEY (`category_id`),
UNIQUE KEY `url_key` (`category_url_key`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `%table_prefix%categories`;
CREATE TABLE `%table_prefix%categories` (
`category_id` bigint(32) NOT NULL AUTO_INCREMENT,
`category_name` varchar(32) NOT NULL,
`category_url_key` varchar(32) NOT NULL,
`category_description` mediumtext,
PRIMARY KEY (`category_id`),
UNIQUE KEY `url_key` (`category_url_key`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

View file

@ -1,12 +1,12 @@
DROP TABLE IF EXISTS `%table_prefix%confirmations`;
CREATE TABLE `%table_prefix%confirmations` (
`confirmation_id` bigint(32) NOT NULL AUTO_INCREMENT,
`confirmation_user_id` bigint(32) NOT NULL,
`confirmation_type` enum('account-activate','account-change-email','account-password-forgot') NOT NULL,
`confirmation_date` datetime NOT NULL,
`confirmation_date_gmt` datetime NOT NULL,
`confirmation_token_hash` varchar(255) NOT NULL,
`confirmation_status` enum('active','valid','invalid') NOT NULL,
`confirmation_extra` text,
PRIMARY KEY (`confirmation_id`)
DROP TABLE IF EXISTS `%table_prefix%confirmations`;
CREATE TABLE `%table_prefix%confirmations` (
`confirmation_id` bigint(32) NOT NULL AUTO_INCREMENT,
`confirmation_user_id` bigint(32) NOT NULL,
`confirmation_type` enum('account-activate','account-change-email','account-password-forgot') NOT NULL,
`confirmation_date` datetime NOT NULL,
`confirmation_date_gmt` datetime NOT NULL,
`confirmation_token_hash` varchar(255) NOT NULL,
`confirmation_status` enum('active','valid','invalid') NOT NULL,
`confirmation_extra` mediumtext,
PRIMARY KEY (`confirmation_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View file

@ -1,20 +1,20 @@
DROP TABLE IF EXISTS `%table_prefix%deletions`;
CREATE TABLE `%table_prefix%deletions` (
`deleted_id` bigint(32) NOT NULL AUTO_INCREMENT,
`deleted_date_gmt` datetime NOT NULL,
`deleted_content_id` bigint(32) NOT NULL,
`deleted_content_date_gmt` datetime NOT NULL,
`deleted_content_user_id` bigint(32) DEFAULT NULL,
`deleted_content_ip` varchar(255) NOT NULL,
`deleted_content_md5` varchar(32) DEFAULT NULL,
`deleted_content_original_filename` varchar(255) DEFAULT NULL,
`deleted_content_views` bigint(32) NOT NULL DEFAULT '0',
`deleted_content_likes` bigint(32) NOT NULL DEFAULT '0',
PRIMARY KEY (`deleted_id`),
KEY `deleted_content_id` (`deleted_content_id`),
KEY `deleted_content_user_id` (`deleted_content_user_id`),
KEY `deleted_content_ip` (`deleted_content_ip`),
KEY `deleted_content_md5` (`deleted_content_md5`),
KEY `deleted_content_views` (`deleted_content_views`),
KEY `deleted_content_likes` (`deleted_content_likes`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `%table_prefix%deletions`;
CREATE TABLE `%table_prefix%deletions` (
`deleted_id` bigint(32) NOT NULL AUTO_INCREMENT,
`deleted_date_gmt` datetime NOT NULL,
`deleted_content_id` bigint(32) NOT NULL,
`deleted_content_date_gmt` datetime NOT NULL,
`deleted_content_user_id` bigint(32) DEFAULT NULL,
`deleted_content_ip` varchar(191) NOT NULL,
`deleted_content_md5` varchar(32) DEFAULT NULL,
`deleted_content_original_filename` varchar(255) DEFAULT NULL,
`deleted_content_views` bigint(32) NOT NULL DEFAULT '0',
`deleted_content_likes` bigint(32) NOT NULL DEFAULT '0',
PRIMARY KEY (`deleted_id`),
KEY `deleted_content_id` (`deleted_content_id`),
KEY `deleted_content_user_id` (`deleted_content_user_id`),
KEY `deleted_content_ip` (`deleted_content_ip`(191)),
KEY `deleted_content_md5` (`deleted_content_md5`),
KEY `deleted_content_views` (`deleted_content_views`),
KEY `deleted_content_likes` (`deleted_content_likes`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

View file

@ -1,12 +1,12 @@
DROP TABLE IF EXISTS `%table_prefix%follows`;
CREATE TABLE `%table_prefix%follows` (
`follow_id` bigint(32) NOT NULL AUTO_INCREMENT,
`follow_date` datetime NOT NULL,
`follow_date_gmt` datetime NOT NULL,
`follow_user_id` bigint(32) NOT NULL,
`follow_followed_user_id` bigint(32) NOT NULL,
`follow_ip` varchar(255) NOT NULL,
PRIMARY KEY (`follow_id`),
KEY `follow_user_id` (`follow_user_id`),
KEY `follow_followed_user_id` (`follow_followed_user_id`)
DROP TABLE IF EXISTS `%table_prefix%follows`;
CREATE TABLE `%table_prefix%follows` (
`follow_id` bigint(32) NOT NULL AUTO_INCREMENT,
`follow_date` datetime NOT NULL,
`follow_date_gmt` datetime NOT NULL,
`follow_user_id` bigint(32) NOT NULL,
`follow_followed_user_id` bigint(32) NOT NULL,
`follow_ip` varchar(255) NOT NULL,
PRIMARY KEY (`follow_id`),
KEY `follow_user_id` (`follow_user_id`),
KEY `follow_followed_user_id` (`follow_followed_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View file

@ -1,49 +1,56 @@
DROP TABLE IF EXISTS `%table_prefix%images`;
CREATE TABLE `%table_prefix%images` (
`image_id` bigint(32) NOT NULL AUTO_INCREMENT,
`image_name` varchar(255) NOT NULL,
`image_extension` varchar(255) NOT NULL,
`image_size` int(11) NOT NULL,
`image_width` int(11) NOT NULL,
`image_height` int(11) NOT NULL,
`image_date` datetime NOT NULL,
`image_date_gmt` datetime NOT NULL,
`image_title` varchar(100) DEFAULT NULL,
`image_description` text,
`image_nsfw` tinyint(1) NOT NULL DEFAULT '0',
`image_user_id` bigint(32) DEFAULT NULL,
`image_album_id` bigint(32) DEFAULT NULL,
`image_uploader_ip` varchar(255) NOT NULL,
`image_storage_mode` enum('datefolder','direct','old') NOT NULL DEFAULT 'datefolder',
`image_storage_id` bigint(32) DEFAULT NULL,
`image_md5` varchar(32) NOT NULL,
`image_source_md5` varchar(32) DEFAULT NULL,
`image_original_filename` varchar(255) NOT NULL,
`image_original_exifdata` longtext,
`image_views` bigint(32) NOT NULL DEFAULT '0',
`image_category_id` bigint(32) DEFAULT NULL,
`image_chain` tinyint(128) NOT NULL,
`image_thumb_size` int(11) NOT NULL,
`image_medium_size` int(11) NOT NULL DEFAULT '0',
`image_expiration_date_gmt` datetime DEFAULT NULL,
`image_likes` bigint(32) NOT NULL DEFAULT '0',
`image_is_animated` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`image_id`),
KEY `image_name` (`image_name`),
KEY `image_size` (`image_size`),
KEY `image_width` (`image_width`),
KEY `image_height` (`image_height`),
KEY `image_date_gmt` (`image_date_gmt`),
KEY `image_nsfw` (`image_nsfw`),
KEY `image_user_id` (`image_user_id`),
KEY `image_album_id` (`image_album_id`),
KEY `image_storage_id` (`image_storage_id`),
KEY `image_md5` (`image_md5`),
KEY `image_source_md5` (`image_source_md5`),
KEY `image_views` (`image_views`),
KEY `image_category_id` (`image_category_id`),
KEY `image_expiration_date_gmt` (`image_expiration_date_gmt`),
KEY `image_likes` (`image_likes`),
KEY `image_is_animated` (`image_is_animated`),
FULLTEXT KEY `searchindex` (`image_name`,`image_title`,`image_description`,`image_original_filename`)
) ENGINE=%table_engine% DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `%table_prefix%images`;
CREATE TABLE `%table_prefix%images` (
`image_id` bigint(32) NOT NULL AUTO_INCREMENT,
`image_name` varchar(255) NOT NULL,
`image_extension` varchar(255) NOT NULL,
`image_size` int(11) NOT NULL,
`image_width` int(11) NOT NULL,
`image_height` int(11) NOT NULL,
`image_date` datetime NOT NULL,
`image_date_gmt` datetime NOT NULL,
`image_title` varchar(100) DEFAULT NULL,
`image_description` mediumtext,
`image_nsfw` tinyint(1) NOT NULL DEFAULT '0',
`image_user_id` bigint(32) DEFAULT NULL,
`image_album_id` bigint(32) DEFAULT NULL,
`image_uploader_ip` varchar(255) NOT NULL,
`image_storage_mode` enum('datefolder','direct','old','path') NOT NULL DEFAULT 'datefolder',
`image_path` varchar(4096) DEFAULT NULL,
`image_storage_id` bigint(32) DEFAULT NULL,
`image_md5` varchar(32) NOT NULL,
`image_source_md5` varchar(32) DEFAULT NULL,
`image_original_filename` varchar(255) NOT NULL,
`image_original_exifdata` longtext,
`image_views` bigint(32) NOT NULL DEFAULT '0',
`image_category_id` bigint(32) DEFAULT NULL,
`image_chain` tinyint(128) NOT NULL,
`image_thumb_size` int(11) NOT NULL,
`image_medium_size` int(11) NOT NULL DEFAULT '0',
`image_expiration_date_gmt` datetime DEFAULT NULL,
`image_likes` bigint(32) NOT NULL DEFAULT '0',
`image_is_animated` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`image_id`),
KEY `image_name` (`image_name`(191)),
KEY `image_extension` (`image_extension`(191)),
KEY `image_size` (`image_size`),
KEY `image_width` (`image_width`),
KEY `image_height` (`image_height`),
KEY `image_date_gmt` (`image_date_gmt`),
KEY `image_nsfw` (`image_nsfw`),
KEY `image_user_id` (`image_user_id`),
KEY `image_album_id` (`image_album_id`),
KEY `image_uploader_ip` (`image_uploader_ip`(191)),
KEY `image_storage_mode` (`image_storage_mode`),
KEY `image_path` (`image_path`(191)),
KEY `image_storage_id` (`image_storage_id`),
KEY `image_md5` (`image_md5`),
KEY `image_source_md5` (`image_source_md5`),
KEY `image_views` (`image_views`),
KEY `image_category_id` (`image_category_id`),
KEY `image_chain` (`image_chain`),
KEY `image_expiration_date_gmt` (`image_expiration_date_gmt`),
KEY `image_likes` (`image_likes`),
KEY `image_is_animated` (`image_is_animated`),
KEY `image_album_id_image_id` (`image_album_id`, `image_id`),
FULLTEXT KEY `searchindex` (`image_name`,`image_title`,`image_description`,`image_original_filename`)
) ENGINE=%table_engine% DEFAULT CHARSET=utf8mb4;

View file

@ -0,0 +1,10 @@
DROP TABLE IF EXISTS `%table_prefix%importing`;
CREATE TABLE `%table_prefix%importing` (
`importing_id` bigint(32) NOT NULL AUTO_INCREMENT,
`importing_import_id` bigint(32) NOT NULL,
`importing_path` varchar(4096) NOT NULL,
`importing_content_type` enum('user','album','image') NOT NULL,
`importing_content_id` bigint(32) NOT NULL DEFAULT '0',
PRIMARY KEY (`importing_id`),
UNIQUE KEY `importing_path` (`importing_path`(255))
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View file

@ -0,0 +1,21 @@
DROP TABLE IF EXISTS `%table_prefix%imports`;
CREATE TABLE `%table_prefix%imports` (
`import_id` bigint(32) NOT NULL AUTO_INCREMENT,
`import_path` varchar(4096) NOT NULL,
`import_options` varchar(255) DEFAULT NULL,
`import_status` enum('queued','working','paused','canceled','completed') NOT NULL,
`import_users` bigint(32) NOT NULL DEFAULT '0',
`import_images` bigint(32) NOT NULL DEFAULT '0',
`import_albums` bigint(32) NOT NULL DEFAULT '0',
`import_time_created` datetime DEFAULT NULL,
`import_time_updated` datetime DEFAULT NULL,
`import_errors` tinyint(1) NOT NULL DEFAULT '0',
`import_started` tinyint(1) NOT NULL DEFAULT '0',
`import_continuous` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`import_id`),
KEY `import_path` (`import_path`(255)) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `%table_prefix%imports` VALUES ('1', '%rootPath%importing/no-parse', 'a:1:{s:4:"root";s:5:"plain";}', 'working', '0', '0', '0', NOW(), NOW(), '0', '1', '1');
INSERT INTO `%table_prefix%imports` VALUES ('2', '%rootPath%importing/parse-users', 'a:1:{s:4:"root";s:5:"users";}', 'working', '0', '0', '0', NOW(), NOW(), '0', '1', '1');
INSERT INTO `%table_prefix%imports` VALUES ('3', '%rootPath%importing/parse-albums', 'a:1:{s:4:"root";s:6:"albums";}', 'working', '0', '0', '0', NOW(), NOW(), '0', '1', '1');

View file

@ -1,13 +1,13 @@
DROP TABLE IF EXISTS `%table_prefix%ip_bans`;
CREATE TABLE `%table_prefix%ip_bans` (
`ip_ban_id` bigint(20) NOT NULL AUTO_INCREMENT,
`ip_ban_date` datetime NOT NULL,
`ip_ban_date_gmt` datetime NOT NULL,
`ip_ban_expires` datetime DEFAULT NULL,
`ip_ban_expires_gmt` datetime DEFAULT NULL,
`ip_ban_ip` varchar(255) NOT NULL,
`ip_ban_message` longtext,
PRIMARY KEY (`ip_ban_id`),
KEY `ip_ban_date_gmt` (`ip_ban_date_gmt`),
UNIQUE KEY `ip_ban_ip` (`ip_ban_ip`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `%table_prefix%ip_bans`;
CREATE TABLE `%table_prefix%ip_bans` (
`ip_ban_id` bigint(20) NOT NULL AUTO_INCREMENT,
`ip_ban_date` datetime NOT NULL,
`ip_ban_date_gmt` datetime NOT NULL,
`ip_ban_expires` datetime DEFAULT NULL,
`ip_ban_expires_gmt` datetime DEFAULT NULL,
`ip_ban_ip` varchar(191) NOT NULL,
`ip_ban_message` text,
PRIMARY KEY (`ip_ban_id`),
KEY `ip_ban_date_gmt` (`ip_ban_date_gmt`),
UNIQUE KEY `ip_ban_ip` (`ip_ban_ip`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

View file

@ -1,18 +1,18 @@
DROP TABLE IF EXISTS `%table_prefix%likes`;
CREATE TABLE `%table_prefix%likes` (
`like_id` bigint(32) NOT NULL AUTO_INCREMENT,
`like_date` datetime NOT NULL,
`like_date_gmt` datetime NOT NULL,
`like_user_id` bigint(32) DEFAULT NULL,
`like_content_type` enum('image','album') DEFAULT NULL,
`like_content_id` bigint(32) NOT NULL,
`like_content_user_id` bigint(32) DEFAULT NULL,
`like_ip` varchar(255) NOT NULL,
PRIMARY KEY (`like_id`),
KEY `like_date_gmt` (`like_date_gmt`),
KEY `like_user_id` (`like_user_id`),
KEY `like_content_type` (`like_content_type`),
KEY `like_content_id` (`like_content_id`),
KEY `like_content_user_id` (`like_content_user_id`),
KEY `like_ip` (`like_ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `%table_prefix%likes`;
CREATE TABLE `%table_prefix%likes` (
`like_id` bigint(32) NOT NULL AUTO_INCREMENT,
`like_date` datetime NOT NULL,
`like_date_gmt` datetime NOT NULL,
`like_user_id` bigint(32) DEFAULT NULL,
`like_content_type` enum('image','album') DEFAULT NULL,
`like_content_id` bigint(32) NOT NULL,
`like_content_user_id` bigint(32) DEFAULT NULL,
`like_ip` varchar(255) NOT NULL,
PRIMARY KEY (`like_id`),
KEY `like_date_gmt` (`like_date_gmt`),
KEY `like_user_id` (`like_user_id`),
KEY `like_content_type` (`like_content_type`),
KEY `like_content_id` (`like_content_id`),
KEY `like_content_user_id` (`like_content_user_id`),
KEY `like_ip` (`like_ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View file

@ -1,18 +1,18 @@
DROP TABLE IF EXISTS `%table_prefix%logins`;
CREATE TABLE `%table_prefix%logins` (
`login_id` bigint(32) NOT NULL AUTO_INCREMENT,
`login_user_id` bigint(32) NOT NULL,
`login_type` enum('password','session','cookie','facebook','twitter','google','vk') NOT NULL,
`login_ip` varchar(255) DEFAULT NULL,
`login_hostname` text,
`login_date` datetime NOT NULL,
`login_date_gmt` datetime NOT NULL,
`login_resource_id` varchar(255) DEFAULT NULL,
`login_resource_name` text,
`login_resource_avatar` text,
`login_resource_url` text,
`login_secret` text DEFAULT NULL COMMENT 'The secret part',
`login_token_hash` text COMMENT 'Hashed complement to secret if needed',
PRIMARY KEY (`login_id`),
KEY `login_user_id` (`login_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `%table_prefix%logins`;
CREATE TABLE `%table_prefix%logins` (
`login_id` bigint(32) NOT NULL AUTO_INCREMENT,
`login_user_id` bigint(32) NOT NULL,
`login_type` enum('password','session','cookie','facebook','twitter','google','vk','cookie_facebook','cookie_twitter','cookie_google','cookie_vk') NOT NULL,
`login_ip` varchar(255) DEFAULT NULL,
`login_hostname` mediumtext,
`login_date` datetime NOT NULL,
`login_date_gmt` datetime NOT NULL,
`login_resource_id` varchar(255) DEFAULT NULL,
`login_resource_name` mediumtext,
`login_resource_avatar` mediumtext,
`login_resource_url` mediumtext,
`login_secret` mediumtext DEFAULT NULL COMMENT 'The secret part',
`login_token_hash` mediumtext COMMENT 'Hashed complement to secret if needed',
PRIMARY KEY (`login_id`),
KEY `login_user_id` (`login_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

View file

@ -1,19 +1,19 @@
DROP TABLE IF EXISTS `%table_prefix%notifications`;
CREATE TABLE `%table_prefix%notifications` (
`notification_id` bigint(32) NOT NULL AUTO_INCREMENT,
`notification_date_gmt` datetime NOT NULL,
`notification_user_id` bigint(32) NOT NULL,
`notification_trigger_user_id` bigint(32) DEFAULT NULL,
`notification_type` enum('follow','like') NOT NULL,
`notification_content_type` enum('user','image','album') NOT NULL,
`notification_type_id` bigint(32) NOT NULL COMMENT 'type_id based on action (type) table',
`notification_is_read` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`notification_id`),
KEY `notification_date_gmt` (`notification_date_gmt`),
KEY `notification_user_id` (`notification_user_id`),
KEY `notification_trigger_user_id` (`notification_trigger_user_id`),
KEY `notification_type` (`notification_type`),
KEY `notification_content_type` (`notification_content_type`),
KEY `notification_type_id` (`notification_type_id`),
KEY `notification_is_read` (`notification_is_read`)
DROP TABLE IF EXISTS `%table_prefix%notifications`;
CREATE TABLE `%table_prefix%notifications` (
`notification_id` bigint(32) NOT NULL AUTO_INCREMENT,
`notification_date_gmt` datetime NOT NULL,
`notification_user_id` bigint(32) NOT NULL,
`notification_trigger_user_id` bigint(32) DEFAULT NULL,
`notification_type` enum('follow','like') NOT NULL,
`notification_content_type` enum('user','image','album') NOT NULL,
`notification_type_id` bigint(32) NOT NULL COMMENT 'type_id based on action (type) table',
`notification_is_read` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`notification_id`),
KEY `notification_date_gmt` (`notification_date_gmt`),
KEY `notification_user_id` (`notification_user_id`),
KEY `notification_trigger_user_id` (`notification_trigger_user_id`),
KEY `notification_type` (`notification_type`),
KEY `notification_content_type` (`notification_content_type`),
KEY `notification_type_id` (`notification_type_id`),
KEY `notification_is_read` (`notification_is_read`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View file

@ -1,26 +1,28 @@
DROP TABLE IF EXISTS `%table_prefix%pages`;
CREATE TABLE `%table_prefix%pages` (
`page_id` bigint(32) NOT NULL AUTO_INCREMENT,
`page_url_key` varchar(32) DEFAULT NULL,
`page_type` enum('internal','link') NOT NULL DEFAULT 'internal',
`page_file_path` varchar(255) DEFAULT NULL,
`page_link_url` text,
`page_icon` varchar(255) DEFAULT NULL,
`page_title` varchar(255) NOT NULL,
`page_description` text,
`page_keywords` text,
`page_is_active` tinyint(1) NOT NULL DEFAULT '1',
`page_is_link_visible` tinyint(1) NOT NULL DEFAULT '1',
`page_attr_target` enum('_self','_blank') DEFAULT '_self',
`page_attr_rel` varchar(255) DEFAULT NULL,
`page_sort_display` int(11) DEFAULT NULL,
PRIMARY KEY (`page_id`),
KEY `page_url_key` (`page_url_key`),
KEY `page_type` (`page_type`),
KEY `page_is_active` (`page_is_active`),
KEY `page_is_link_visible` (`page_is_link_visible`),
KEY `page_sort_display` (`page_sort_display`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
INSERT INTO `%table_prefix%pages` VALUES ('1', 'tos', 'internal', null, null, null, 'Terms of service', null, null, '1', '1', '_blank', null, '1');
INSERT INTO `%table_prefix%pages` VALUES ('2', 'privacy', 'internal', null, null, null, 'Privacy', null, null, '1', '1', '_self', null, '2');
INSERT INTO `%table_prefix%pages` VALUES ('3', 'contact', 'internal', null, null, null, 'Contact', null, null, '1', '1', '_self', null, '3');
DROP TABLE IF EXISTS `%table_prefix%pages`;
CREATE TABLE `%table_prefix%pages` (
`page_id` bigint(32) NOT NULL AUTO_INCREMENT,
`page_url_key` varchar(32) DEFAULT NULL,
`page_type` enum('internal','link') NOT NULL DEFAULT 'internal',
`page_file_path` varchar(255) DEFAULT NULL,
`page_link_url` mediumtext,
`page_icon` varchar(255) DEFAULT NULL,
`page_title` varchar(255) NOT NULL,
`page_description` mediumtext,
`page_keywords` mediumtext,
`page_is_active` tinyint(1) NOT NULL DEFAULT '1',
`page_is_link_visible` tinyint(1) NOT NULL DEFAULT '1',
`page_attr_target` enum('_self','_blank') DEFAULT '_self',
`page_attr_rel` varchar(255) DEFAULT NULL,
`page_sort_display` int(11) DEFAULT NULL,
`page_internal` varchar(191) DEFAULT NULL,
PRIMARY KEY (`page_id`),
UNIQUE KEY `page_internal` (`page_internal`(191)),
KEY `page_url_key` (`page_url_key`),
KEY `page_type` (`page_type`),
KEY `page_is_active` (`page_is_active`),
KEY `page_is_link_visible` (`page_is_link_visible`),
KEY `page_sort_display` (`page_sort_display`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
INSERT INTO `%table_prefix%pages` VALUES ('1', 'tos', 'internal', null, null, 'icon-text', 'Terms of service', null, null, '1', '1', '_self', null, '1', 'tos');
INSERT INTO `%table_prefix%pages` VALUES ('2', 'privacy', 'internal', null, null, 'icon-lock', 'Privacy', null, null, '1', '1', '_self', null, '2', 'privacy');
INSERT INTO `%table_prefix%pages` VALUES ('3', 'contact', 'internal', null, null, 'icon-mail', 'Contact', null, null, '1', '1', '_self', null, '3', 'contact');

View file

@ -1,11 +1,11 @@
DROP TABLE IF EXISTS `%table_prefix%queues`;
CREATE TABLE `%table_prefix%queues` (
`queue_id` bigint(32) NOT NULL AUTO_INCREMENT,
`queue_type` enum('storage-delete') NOT NULL,
`queue_date_gmt` datetime NOT NULL,
`queue_args` longtext NOT NULL,
`queue_join` bigint(32) NOT NULL,
`queue_attempts` varchar(255) DEFAULT '0',
`queue_status` enum('pending','failed') NOT NULL DEFAULT 'pending',
PRIMARY KEY (`queue_id`)
DROP TABLE IF EXISTS `%table_prefix%queues`;
CREATE TABLE `%table_prefix%queues` (
`queue_id` bigint(32) NOT NULL AUTO_INCREMENT,
`queue_type` enum('storage-delete') NOT NULL,
`queue_date_gmt` datetime NOT NULL,
`queue_args` longtext NOT NULL,
`queue_join` bigint(32) NOT NULL,
`queue_attempts` varchar(255) DEFAULT '0',
`queue_status` enum('pending','failed') NOT NULL DEFAULT 'pending',
PRIMARY KEY (`queue_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View file

@ -0,0 +1,10 @@
DROP TABLE IF EXISTS `%table_prefix%redirects`;
CREATE TABLE `%table_prefix%redirects` (
`redirect_id` bigint(32) NOT NULL AUTO_INCREMENT,
`redirect_from` varchar(2083) NOT NULL,
`redirect_content_id` bigint(32) NOT NULL,
`redirect_content_type` enum('image','user','album') NOT NULL,
PRIMARY KEY (`redirect_id`),
UNIQUE KEY `redirect_from` (`redirect_from`(255)),
KEY `redirect_content_id` (`redirect_content_id`)
) ENGINE=%table_engine% DEFAULT CHARSET=utf8;

View file

@ -1,18 +1,18 @@
DROP TABLE IF EXISTS `%table_prefix%requests`;
CREATE TABLE `%table_prefix%requests` (
`request_id` bigint(32) NOT NULL AUTO_INCREMENT,
`request_type` enum('upload','signup','account-edit','account-password-forgot','account-password-reset','account-resend-activation','account-email-needed','account-change-email','account-activate','login', 'content-password') NOT NULL,
`request_user_id` bigint(32) DEFAULT NULL,
`request_content_id` bigint(32) DEFAULT NULL,
`request_ip` varchar(255) NOT NULL,
`request_date` datetime NOT NULL,
`request_date_gmt` datetime NOT NULL,
`request_result` enum('success','fail') NOT NULL,
PRIMARY KEY (`request_id`),
KEY `request_type` (`request_type`),
KEY `request_user_id` (`request_user_id`),
KEY `request_content_id` (`request_content_id`),
KEY `request_ip` (`request_ip`),
KEY `request_date_gmt` (`request_date_gmt`),
KEY `request_result` (`request_result`)
DROP TABLE IF EXISTS `%table_prefix%requests`;
CREATE TABLE `%table_prefix%requests` (
`request_id` bigint(32) NOT NULL AUTO_INCREMENT,
`request_type` enum('upload','signup','account-edit','account-password-forgot','account-password-reset','account-resend-activation','account-email-needed','account-change-email','account-activate','login', 'content-password') NOT NULL,
`request_user_id` bigint(32) DEFAULT NULL,
`request_content_id` bigint(32) DEFAULT NULL,
`request_ip` varchar(255) NOT NULL,
`request_date` datetime NOT NULL,
`request_date_gmt` datetime NOT NULL,
`request_result` enum('success','fail') NOT NULL,
PRIMARY KEY (`request_id`),
KEY `request_type` (`request_type`),
KEY `request_user_id` (`request_user_id`),
KEY `request_content_id` (`request_content_id`),
KEY `request_ip` (`request_ip`),
KEY `request_date_gmt` (`request_date_gmt`),
KEY `request_result` (`request_result`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View file

@ -1,10 +1,10 @@
DROP TABLE IF EXISTS `%table_prefix%settings`;
CREATE TABLE `%table_prefix%settings` (
`setting_id` int(11) NOT NULL AUTO_INCREMENT,
`setting_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`setting_value` text,
`setting_default` text,
`setting_typeset` enum('string','bool') DEFAULT 'string',
PRIMARY KEY (`setting_id`),
KEY `setting_name` (`setting_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `%table_prefix%settings`;
CREATE TABLE `%table_prefix%settings` (
`setting_id` int(11) NOT NULL AUTO_INCREMENT,
`setting_name` varchar(191) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`setting_value` mediumtext,
`setting_default` mediumtext,
`setting_typeset` enum('string','bool') DEFAULT 'string',
PRIMARY KEY (`setting_id`),
KEY `setting_name` (`setting_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

View file

@ -1,18 +1,18 @@
DROP TABLE IF EXISTS `%table_prefix%stats`;
CREATE TABLE `%table_prefix%stats` (
`stat_id` bigint(32) NOT NULL AUTO_INCREMENT,
`stat_type` enum('total','date') NOT NULL,
`stat_date_gmt` date DEFAULT NULL,
`stat_users` bigint(32) NOT NULL DEFAULT '0',
`stat_images` bigint(32) NOT NULL DEFAULT '0',
`stat_albums` bigint(32) NOT NULL DEFAULT '0',
`stat_image_views` bigint(32) NOT NULL DEFAULT '0',
`stat_album_views` bigint(32) NOT NULL DEFAULT '0',
`stat_image_likes` bigint(32) NOT NULL DEFAULT '0',
`stat_album_likes` bigint(32) NOT NULL DEFAULT '0',
`stat_disk_used` bigint(32) NOT NULL DEFAULT '0',
PRIMARY KEY (`stat_id`),
UNIQUE KEY `stat_date_gmt` (`stat_date_gmt`) USING BTREE,
KEY `stat_type` (`stat_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `%table_prefix%stats`;
CREATE TABLE `%table_prefix%stats` (
`stat_id` bigint(32) NOT NULL AUTO_INCREMENT,
`stat_type` enum('total','date') NOT NULL,
`stat_date_gmt` date DEFAULT NULL,
`stat_users` bigint(32) NOT NULL DEFAULT '0',
`stat_images` bigint(32) NOT NULL DEFAULT '0',
`stat_albums` bigint(32) NOT NULL DEFAULT '0',
`stat_image_views` bigint(32) NOT NULL DEFAULT '0',
`stat_album_views` bigint(32) NOT NULL DEFAULT '0',
`stat_image_likes` bigint(32) NOT NULL DEFAULT '0',
`stat_album_likes` bigint(32) NOT NULL DEFAULT '0',
`stat_disk_used` bigint(32) NOT NULL DEFAULT '0',
PRIMARY KEY (`stat_id`),
UNIQUE KEY `stat_date_gmt` (`stat_date_gmt`) USING BTREE,
KEY `stat_type` (`stat_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `%table_prefix%stats` VALUES ('1', 'total', NULL, '0', '0', '0', '0', '0', '0', '0', '0');

View file

@ -1,14 +1,18 @@
DROP TABLE IF EXISTS `%table_prefix%storage_apis`;
CREATE TABLE `%table_prefix%storage_apis` (
`storage_api_id` bigint(32) NOT NULL AUTO_INCREMENT,
`storage_api_name` varchar(255) NOT NULL,
`storage_api_type` varchar(255) NOT NULL,
PRIMARY KEY (`storage_api_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `%table_prefix%storage_apis` VALUES ('1', 'Amazon S3', 's3');
INSERT INTO `%table_prefix%storage_apis` VALUES ('2', 'Google Cloud', 'gcloud');
INSERT INTO `%table_prefix%storage_apis` VALUES ('3', 'Windows Azure', 'azure');
INSERT INTO `%table_prefix%storage_apis` VALUES ('4', 'Chevereto Grid', 'chvgrid');
INSERT INTO `%table_prefix%storage_apis` VALUES ('5', 'FTP', 'ftp');
INSERT INTO `%table_prefix%storage_apis` VALUES ('6', 'SFTP', 'sftp');
INSERT INTO `%table_prefix%storage_apis` VALUES ('7', 'OpenStack', 'openstack');
DROP TABLE IF EXISTS `%table_prefix%storage_apis`;
CREATE TABLE `%table_prefix%storage_apis` (
`storage_api_id` bigint(32) NOT NULL AUTO_INCREMENT,
`storage_api_name` varchar(255) NOT NULL,
`storage_api_type` varchar(255) NOT NULL,
PRIMARY KEY (`storage_api_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `%table_prefix%storage_apis` VALUES ('1', 'Amazon S3', 's3');
INSERT INTO `%table_prefix%storage_apis` VALUES ('2', 'Google Cloud', 'gcloud');
INSERT INTO `%table_prefix%storage_apis` VALUES ('3', 'Microsoft Azure', 'azure');
INSERT INTO `%table_prefix%storage_apis` VALUES ('4', 'Chevereto Grid', 'chvgrid');
INSERT INTO `%table_prefix%storage_apis` VALUES ('5', 'FTP', 'ftp');
INSERT INTO `%table_prefix%storage_apis` VALUES ('6', 'SFTP', 'sftp');
INSERT INTO `%table_prefix%storage_apis` VALUES ('7', 'OpenStack', 'openstack');
INSERT INTO `%table_prefix%storage_apis` VALUES ('8', 'Local', 'local');
INSERT INTO `%table_prefix%storage_apis` VALUES ('9', 'S3 compatible', 's3compatible');
INSERT INTO `%table_prefix%storage_apis` VALUES ('10', 'Alibaba Cloud OSS', 'oss');
INSERT INTO `%table_prefix%storage_apis` VALUES ('11', 'Backblaze B2', 'b2');

View file

@ -1,22 +1,22 @@
DROP TABLE IF EXISTS `%table_prefix%storages`;
CREATE TABLE `%table_prefix%storages` (
`storage_id` bigint(32) NOT NULL AUTO_INCREMENT,
`storage_api_id` bigint(32) NOT NULL,
`storage_name` varchar(255) NOT NULL,
`storage_service` varchar(255) DEFAULT NULL,
`storage_url` varchar(255) NOT NULL,
`storage_bucket` varchar(255) DEFAULT NULL,
`storage_region` varchar(255) DEFAULT NULL,
`storage_server` varchar(255) DEFAULT NULL,
`storage_account_id` varchar(255) DEFAULT NULL,
`storage_account_name` varchar(255) DEFAULT NULL,
`storage_key` text,
`storage_secret` text,
`storage_is_https` tinyint(1) NOT NULL DEFAULT '0',
`storage_is_active` tinyint(1) NOT NULL DEFAULT '0',
`storage_capacity` bigint(32) DEFAULT NULL,
`storage_space_used` bigint(32) DEFAULT '0',
PRIMARY KEY (`storage_id`),
KEY `storage_api_id` (`storage_api_id`),
KEY `storage_is_active` (`storage_is_active`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `%table_prefix%storages`;
CREATE TABLE `%table_prefix%storages` (
`storage_id` bigint(32) NOT NULL AUTO_INCREMENT,
`storage_api_id` bigint(32) NOT NULL,
`storage_name` varchar(255) NOT NULL,
`storage_service` varchar(255) DEFAULT NULL,
`storage_url` varchar(255) NOT NULL,
`storage_bucket` varchar(255) DEFAULT NULL,
`storage_region` varchar(255) DEFAULT NULL,
`storage_server` varchar(255) DEFAULT NULL,
`storage_account_id` varchar(255) DEFAULT NULL,
`storage_account_name` varchar(255) DEFAULT NULL,
`storage_key` mediumtext,
`storage_secret` mediumtext,
`storage_is_https` tinyint(1) NOT NULL DEFAULT '0',
`storage_is_active` tinyint(1) NOT NULL DEFAULT '0',
`storage_capacity` bigint(32) DEFAULT NULL,
`storage_space_used` bigint(32) DEFAULT '0',
PRIMARY KEY (`storage_id`),
KEY `storage_api_id` (`storage_api_id`),
KEY `storage_is_active` (`storage_is_active`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

View file

@ -1,52 +1,57 @@
DROP TABLE IF EXISTS `%table_prefix%users`;
CREATE TABLE `%table_prefix%users` (
`user_id` bigint(32) NOT NULL AUTO_INCREMENT,
`user_name` varchar(255) DEFAULT NULL,
`user_username` varchar(255) NOT NULL,
`user_date` datetime NOT NULL,
`user_date_gmt` datetime NOT NULL,
`user_email` varchar(255) DEFAULT NULL,
`user_avatar_filename` varchar(255) DEFAULT NULL,
`user_facebook_username` varchar(255) DEFAULT NULL,
`user_twitter_username` varchar(255) DEFAULT NULL,
`user_website` varchar(255) DEFAULT NULL,
`user_background_filename` varchar(255) DEFAULT NULL,
`user_bio` varchar(255) DEFAULT NULL,
`user_timezone` varchar(255) NOT NULL,
`user_language` varchar(255) DEFAULT NULL,
`user_status` enum('valid','awaiting-confirmation','awaiting-email','banned') NOT NULL,
`user_is_admin` tinyint(1) NOT NULL DEFAULT '0',
`user_is_private` tinyint(1) NOT NULL DEFAULT '0',
`user_newsletter_subscribe` tinyint(1) NOT NULL DEFAULT '1',
`user_show_nsfw_listings` tinyint(1) NOT NULL DEFAULT '0',
`user_image_count` bigint(32) NOT NULL DEFAULT '0',
`user_album_count` bigint(32) NOT NULL DEFAULT '0',
`user_image_keep_exif` tinyint(1) NOT NULL DEFAULT '1',
`user_image_expiration` varchar(255) DEFAULT NULL,
`user_registration_ip` varchar(255) NOT NULL,
`user_likes` bigint(32) NOT NULL DEFAULT '0' COMMENT 'Likes made to content owned by this user',
`user_liked` bigint(32) NOT NULL DEFAULT '0' COMMENT 'Likes made by this user',
`user_following` bigint(32) NOT NULL DEFAULT '0',
`user_followers` bigint(32) NOT NULL DEFAULT '0',
`user_content_views` bigint(32) NOT NULL DEFAULT '0',
`user_notifications_unread` bigint(32) NOT NULL DEFAULT '0',
PRIMARY KEY (`user_id`),
UNIQUE KEY `username` (`user_username`) USING BTREE,
UNIQUE KEY `email` (`user_email`) USING BTREE,
KEY `user_date_gmt` (`user_date_gmt`),
KEY `user_status` (`user_status`),
KEY `user_is_admin` (`user_is_admin`),
KEY `user_image_count` (`user_image_count`),
KEY `user_album_count` (`user_album_count`),
KEY `user_image_keep_exif` (`user_image_keep_exif`),
KEY `user_newsletter_subscribe` (`user_newsletter_subscribe`),
KEY `user_show_nsfw_listings` (`user_show_nsfw_listings`),
KEY `user_image_expiration` (`user_image_expiration`),
KEY `user_likes` (`user_likes`),
KEY `user_following` (`user_following`),
KEY `user_followers` (`user_followers`),
KEY `user_liked` (`user_liked`),
KEY `user_content_views` (`user_content_views`),
KEY `user_registration_ip` (`user_registration_ip`),
FULLTEXT KEY `searchindex` (`user_name`,`user_username`)
) ENGINE=%table_engine% DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `%table_prefix%users`;
CREATE TABLE `%table_prefix%users` (
`user_id` bigint(32) NOT NULL AUTO_INCREMENT,
`user_name` varchar(255) DEFAULT NULL,
`user_username` varchar(191) NOT NULL,
`user_date` datetime NOT NULL,
`user_date_gmt` datetime NOT NULL,
`user_email` varchar(191) DEFAULT NULL,
`user_avatar_filename` varchar(255) DEFAULT NULL,
`user_facebook_username` varchar(255) DEFAULT NULL,
`user_twitter_username` varchar(255) DEFAULT NULL,
`user_website` varchar(255) DEFAULT NULL,
`user_background_filename` varchar(255) DEFAULT NULL,
`user_bio` varchar(255) DEFAULT NULL,
`user_timezone` varchar(255) NOT NULL,
`user_language` varchar(255) DEFAULT NULL,
`user_status` enum('valid','awaiting-confirmation','awaiting-email','banned') NOT NULL,
`user_is_admin` tinyint(1) NOT NULL DEFAULT '0',
`user_is_manager` tinyint(1) NOT NULL DEFAULT '0',
`user_is_private` tinyint(1) NOT NULL DEFAULT '0',
`user_is_dark_mode` tinyint(1) NOT NULL DEFAULT '0',
`user_newsletter_subscribe` tinyint(1) NOT NULL DEFAULT '1',
`user_show_nsfw_listings` tinyint(1) NOT NULL DEFAULT '0',
`user_image_count` bigint(32) NOT NULL DEFAULT '0',
`user_album_count` bigint(32) NOT NULL DEFAULT '0',
`user_image_keep_exif` tinyint(1) NOT NULL DEFAULT '1',
`user_image_expiration` varchar(191) DEFAULT NULL,
`user_registration_ip` varchar(191) NOT NULL,
`user_likes` bigint(32) NOT NULL DEFAULT '0' COMMENT 'Likes made to content owned by this user',
`user_liked` bigint(32) NOT NULL DEFAULT '0' COMMENT 'Likes made by this user',
`user_following` bigint(32) NOT NULL DEFAULT '0',
`user_followers` bigint(32) NOT NULL DEFAULT '0',
`user_content_views` bigint(32) NOT NULL DEFAULT '0',
`user_notifications_unread` bigint(32) NOT NULL DEFAULT '0',
PRIMARY KEY (`user_id`),
UNIQUE KEY `username` (`user_username`) USING BTREE,
UNIQUE KEY `email` (`user_email`) USING BTREE,
KEY `user_date_gmt` (`user_date_gmt`),
KEY `user_status` (`user_status`),
KEY `user_is_admin` (`user_is_admin`),
KEY `user_is_manager` (`user_is_manager`),
KEY `user_is_private` (`user_is_private`),
KEY `user_is_dark_mode` (`user_is_dark_mode`),
KEY `user_newsletter_subscribe` (`user_newsletter_subscribe`),
KEY `user_show_nsfw_listings` (`user_show_nsfw_listings`),
KEY `user_image_count` (`user_image_count`),
KEY `user_album_count` (`user_album_count`),
KEY `user_image_keep_exif` (`user_image_keep_exif`),
KEY `user_image_expiration` (`user_image_expiration`),
KEY `user_registration_ip` (`user_registration_ip`),
KEY `user_likes` (`user_likes`),
KEY `user_following` (`user_following`),
KEY `user_followers` (`user_followers`),
KEY `user_liked` (`user_liked`),
KEY `user_content_views` (`user_content_views`),
FULLTEXT KEY `searchindex` (`user_name`,`user_username`)
) ENGINE=%table_engine% DEFAULT CHARSET=utf8mb4;

View file

@ -1,4 +1,4 @@
<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
<h1>Already installed</h1>
<p>Chevereto is already installed and updated.</p>
<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
<h1>Already installed</h1>
<p>Chevereto is already installed and updated.</p>
<div class="btn-container margin-bottom-0"><a href="<?php echo G\get_base_url('dashboard'); ?>" class="btn btn-input default">Go to dashboard</a> <span class="btn-alt">or <a href="<?php echo G\get_base_url(); ?>">go to homepage</a></span></div>

View file

@ -1,38 +1,38 @@
<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
<h1>Connect to the database</h1>
<p>At this point you already have all the needed files uploaded and now you need to indicate where Chevereto will store the data (MySQL database).</p>
<p>To continue please provide your MySQL database details. <a data-modal="simple" data-target="modal-db-info">Learn more</a>.</p>
<div data-modal="modal-db-info" class="hidden">
<span class="modal-box-title">Database info needed</span>
<p>You must go to your hosting provider website panel (usually cPanel or Plesk) and get the required info. If you are running a server without panel you should be able to get this using SSH.</p>
<p>Basically you need to create a database (this will be database name) and assign permissions to this database to a database user.</p>
<p>Chevereto will connect to your database host using the database user credentials so this user must have access to the target database name.</p>
</div>
<?php if($error) { ?>
<p class="highlight padding-10"><?php echo $error_message; ?></p>
<?php } ?>
<form method="post" class="c9">
<div class="input-label">
<label for="db_host">Database host</label>
<input type="text" name="db_host" id="db_host" class="text-input" value="<?php echo isset($_POST['db_host']) ? $_POST['db_host'] : 'localhost'; ?>" placeholder="Usually localhost" title="Database server host (default: localhost)" rel="tooltip" data-tipTip="right" required>
</div>
<div class="input-label">
<label for="db_name">Database name</label>
<input type="text" name="db_name" id="db_name" class="text-input" value="<?php echo isset($_POST['db_name']) ? $_POST['db_name'] : ''; ?>" placeholder="Database name" title="Name of the database where you want to install Chevereto" rel="tooltip" data-tipTip="right" required>
</div>
<div class="input-label">
<label for="db_user">Database user</label>
<input type="text" name="db_user" id="db_user" class="text-input" value="<?php echo isset($_POST['db_user']) ? $_POST['db_user'] : ''; ?>" placeholder="Database user" title="User with access to the above database" rel="tooltip" data-tipTip="right" required>
</div>
<div class="input-label">
<label for="db_pass">Database user password</label>
<input type="text" name="db_pass" id="db_pass" class="text-input" value="<?php echo isset($_POST['db_pass']) ? $_POST['db_pass'] : ''; ?>" placeholder="Database user password" title="Password of the above user" rel="tooltip" data-tipTip="right">
</div>
<div class="input-label">
<label for="db_table_prefix">Database table prefix</label>
<input type="text" name="db_table_prefix" id="db_table_prefix" class="text-input" value="<?php echo isset($_POST['db_table_prefix']) ? $_POST['db_table_prefix'] : 'chv_'; ?>" placeholder="Usually chv_" title="Database table prefix. Use chv_ if you don't need this" rel="tooltip" data-tipTip="right">
</div>
<div class="btn-container margin-bottom-0">
<button class="btn btn-input default" type="submit">Continue</button>
</div>
<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
<h1>Connect to the database</h1>
<p>At this point you already have all the needed files uploaded and now you need to indicate where Chevereto will store the data (MySQL database).</p>
<p>To continue please provide your MySQL database details. <a data-modal="simple" data-target="modal-db-info">Learn more</a>.</p>
<div data-modal="modal-db-info" class="hidden">
<span class="modal-box-title">Database info needed</span>
<p>You must go to your hosting provider website panel (usually cPanel or Plesk) and get the required info. If you are running a server without panel you should be able to get this using SSH.</p>
<p>Basically you need to create a database (this will be database name) and assign permissions to this database to a database user.</p>
<p>Chevereto will connect to your database host using the database user credentials so this user must have access to the target database name.</p>
</div>
<?php if($error) { ?>
<p class="highlight padding-10"><?php echo $error_message; ?></p>
<?php } ?>
<form method="post" class="c9">
<div class="input-label">
<label for="db_host">Database host</label>
<input type="text" name="db_host" id="db_host" class="text-input" value="<?php echo isset($_POST['db_host']) ? $_POST['db_host'] : 'localhost'; ?>" placeholder="Usually localhost" title="Database server host (default: localhost)" rel="tooltip" data-tipTip="right" required>
</div>
<div class="input-label">
<label for="db_name">Database name</label>
<input type="text" name="db_name" id="db_name" class="text-input" value="<?php echo isset($_POST['db_name']) ? $_POST['db_name'] : ''; ?>" placeholder="Database name" title="Name of the database where you want to install Chevereto" rel="tooltip" data-tipTip="right" required>
</div>
<div class="input-label">
<label for="db_user">Database user</label>
<input type="text" name="db_user" id="db_user" class="text-input" value="<?php echo isset($_POST['db_user']) ? $_POST['db_user'] : ''; ?>" placeholder="Database user" title="User with access to the above database" rel="tooltip" data-tipTip="right" required>
</div>
<div class="input-label">
<label for="db_pass">Database user password</label>
<input type="text" name="db_pass" id="db_pass" class="text-input" value="<?php echo isset($_POST['db_pass']) ? $_POST['db_pass'] : ''; ?>" placeholder="Database user password" title="Password of the above user" rel="tooltip" data-tipTip="right">
</div>
<div class="input-label">
<label for="db_table_prefix">Database table prefix</label>
<input type="text" name="db_table_prefix" id="db_table_prefix" class="text-input" value="<?php echo isset($_POST['db_table_prefix']) ? $_POST['db_table_prefix'] : 'chv_'; ?>" placeholder="Usually chv_" title="Database table prefix. Use chv_ if you don't need this" rel="tooltip" data-tipTip="right">
</div>
<div class="btn-container margin-bottom-0">
<button class="btn btn-input default" type="submit">Continue</button>
</div>
</form>

View file

@ -1,4 +1,4 @@
<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
<h1>Installation complete</h1>
<p><?php echo strtr('Chevereto has been successfully installed. You can now continue to the <a href="%u">admin dashboard</a> and configure your website.', ['%s' => CHV\get_chevereto_version(true), '%u' => G\get_base_url('dashboard')]); ?></p>
<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
<h1>Installation complete</h1>
<p><?php echo strtr('Chevereto has been successfully installed. You can now continue to the <a href="%u">admin dashboard</a> and configure your website.', ['%s' => CHV\get_chevereto_version(true), '%u' => G\get_base_url('dashboard')]); ?></p>
<script>$(document).ready(function() { CHV.fn.system.checkUpdates(); });</script>

View file

@ -1,72 +1,75 @@
<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
<h1>Ready to install</h1>
<p>The system is connected to your database and the <code>app/settings.php</code> file contains this connection info. Don't change the contents of this file unless you also change your database connection info.</p>
<p>On submit this process will install the Chevereto database tables and it will set some default settings that you can change later.</p>
<p>To proceed with the installation fill this form with the details of the initial admin account and the default email settings that you want to use, don't worry this account and settings can be edited later.</p>
<?php if($error) { ?>
<p class="highlight padding-10"><?php echo $error_message; ?></p>
<?php } ?>
<form method="post">
<div class="c9">
<div class="input-label">
<label for="username">Admin username</label>
<input type="text" name="username" id="username" class="text-input" value="<?php echo isset($_POST['username']) ? $_POST['username'] : NULL; ?>" placeholder="Admin username" rel="tooltip" data-tipTip="right" pattern="<?php echo CHV\getSetting('username_pattern'); ?>" rel="tooltip" title='<?php echo strtr('%i to %f characters<br>Letters, numbers and "_"', ['%i' => CHV\getSetting('username_min_length'), '%f' => CHV\getSetting('username_max_length')]); ?>' maxlength="<?php echo CHV\getSetting('username_max_length'); ?>" required>
<span class="input-warning red-warning"><?php echo $input_errors['username']; ?></span>
</div>
<div class="input-label">
<label for="email">Admin email</label>
<input type="email" name="email" id="email" class="text-input" value="<?php echo isset($_POST['email']) ? $_POST['email'] : ''; ?>" placeholder="Admin email" title="Valid email address for your admin account" rel="tooltip" data-tipTip="right" required>
<span class="input-warning red-warning"><?php echo $input_errors['email']; ?></span>
</div>
<div class="input-label input-password">
<label for="password">Admin password</label>
<input type="password" name="password" id="password" class="text-input" value="<?php echo isset($_POST['password']) ? $_POST['password'] : ''; ?>" placeholder="Admin password" title="Password to login" pattern="<?php echo CHV\getSetting('user_password_pattern'); ?>" rel="tooltip" data-tipTip="right" required>
<div class="input-password-strength"><span style="width: 0%" data-content="password-meter-bar"></span></div>
<span class="input-warning red-warning" data-text="password-meter-message"><?php echo $input_errors['password']; ?></span>
</div>
</div>
<hr class="line-separator"></hr>
<div class="c9">
<div class="input-label">
<label for="email_from_email"><?php _se('From email address'); ?></label>
<input type="email" name="email_from_email" id="email_from_email" class="text-input" value="<?php echo isset($_POST['email_from_email']) ? $_POST['email_from_email'] : ''; ?>" placeholder="no-reply@example.com" title="<?php _se('Sender email for emails sent to users.'); ?>" rel="tooltip" data-tipTip="right" required>
<span class="input-warning red-warning"><?php echo $input_errors['email_from_email']; ?></span>
</div>
<div class="input-label">
<label for="email_incoming_email"><?php _se('Incoming email address'); ?></label>
<input type="email" name="email_incoming_email" id="email_incoming_email" class="text-input" value="<?php echo isset($_POST['email_incoming_email']) ? $_POST['email_incoming_email'] : NULL; ?>" placeholder="inbox@example.com" title="<?php _se('Recipient for contact form and system alerts.'); ?>" rel="tooltip" data-tipTip="right" required>
<span class="input-warning red-warning"><?php echo $input_errors['email_incoming_email']; ?></span>
</div>
</div>
<hr class="line-separator"></hr>
<div class="c9">
<div class="input-label">
<label for="website_mode"><?php _se('Website mode'); ?></label>
<div class="c5 phablet-c1"><select type="text" name="website_mode" id="website_mode" class="text-input" data-combo="website-mode-combo" title="<?php _se('You can switch the website mode anytime.'); ?>" rel="tooltip" data-tipTip="right">
<?php
echo CHV\Render\get_select_options_html(['community' => _s('Community'), 'personal' => _s('Personal')], isset($_POST['website_mode']) ? $_POST['website_mode'] : NULL);
?>
</select></div>
<div class="input-below input-warning red-warning"><?php echo $input_errors['website_mode']; ?></div>
</div>
</div>
<?php
if($is_2X) {
?>
<hr class="line-separator"></hr>
<div class="c9">
<div class="input-label">
<label for="crypt_salt">__CHV_CRYPT_SALT__</label>
<input type="crypt_salt" name="crypt_salt" id="crypt_salt" class="text-input" value="<?php echo isset($_POST['crypt_salt']) ? $_POST['crypt_salt'] : ''; ?>" placeholder="Example: changeme" title="As defined in includes/definitions.php" rel="tooltip" data-tipTip="right" required>
<span class="input-below highlight">Value from define("__CHV_CRYPT_SALT__", "changeme");</span>
<span class="input-warning red-warning"><?php echo $input_errors['crypt_salt']; ?></span>
</div>
</div>
<?php
}
?>
<span class="line-separator"></span>
<div class="btn-container margin-bottom-0">
<button class="btn btn-input default" type="submit">Install Chevereto</button>
</div>
<?php if (!defined('access') or !access) {
die('This file cannot be directly accessed.');
} ?>
<h1>Ready to install</h1>
<p>The system is connected to your database and the <code>app/settings.php</code> file contains this connection info. Don't change the contents of this file unless you also change your database connection info.</p>
<p>On submit this process will install the Chevereto database tables and it will set some default settings that you can change later.</p>
<p>To proceed with the installation fill this form with the details of the initial admin account and the default email settings that you want to use, don't worry this account and settings can be edited later.</p>
<?php if ($error) { ?>
<p class="highlight padding-10"><?php echo $error_message; ?></p>
<?php } ?>
<form method="post">
<!-- <input type="hidden" name="dump" value="1"> -->
<div class="c9">
<div class="input-label">
<label for="username">Admin username</label>
<input type="text" name="username" id="username" class="text-input" value="<?php echo isset($_POST['username']) ? $_POST['username'] : null; ?>" placeholder="Admin username" rel="tooltip" data-tipTip="right" pattern="<?php echo CHV\getSetting('username_pattern'); ?>" rel="tooltip" title='<?php echo strtr('%i to %f characters<br>Letters, numbers and "_"', ['%i' => CHV\getSetting('username_min_length'), '%f' => CHV\getSetting('username_max_length')]); ?>' maxlength="<?php echo CHV\getSetting('username_max_length'); ?>" required>
<span class="input-warning red-warning"><?php echo $input_errors['username']; ?></span>
</div>
<div class="input-label">
<label for="email">Admin email</label>
<input type="email" name="email" id="email" class="text-input" value="<?php echo isset($_POST['email']) ? $_POST['email'] : ''; ?>" placeholder="Admin email" title="Valid email address for your admin account" rel="tooltip" data-tipTip="right" required>
<span class="input-warning red-warning"><?php echo $input_errors['email']; ?></span>
</div>
<div class="input-label input-password">
<label for="password">Admin password</label>
<input type="password" name="password" id="password" class="text-input" value="<?php echo isset($_POST['password']) ? $_POST['password'] : ''; ?>" placeholder="Admin password" title="Password to login" pattern="<?php echo CHV\getSetting('user_password_pattern'); ?>" rel="tooltip" data-tipTip="right" required>
<div class="input-password-strength"><span style="width: 0%" data-content="password-meter-bar"></span></div>
<span class="input-warning red-warning" data-text="password-meter-message"><?php echo $input_errors['password']; ?></span>
</div>
</div>
<hr class="line-separator"></hr>
<div class="c9">
<div class="input-label">
<label for="email_from_email"><?php _se('From email address'); ?></label>
<input type="email" name="email_from_email" id="email_from_email" class="text-input" value="<?php echo isset($_POST['email_from_email']) ? $_POST['email_from_email'] : ''; ?>" placeholder="no-reply@example.com" title="<?php _se('Sender email for emails sent to users.'); ?>" rel="tooltip" data-tipTip="right" required>
<span class="input-warning red-warning"><?php echo $input_errors['email_from_email']; ?></span>
</div>
<div class="input-label">
<label for="email_incoming_email"><?php _se('Incoming email address'); ?></label>
<input type="email" name="email_incoming_email" id="email_incoming_email" class="text-input" value="<?php echo isset($_POST['email_incoming_email']) ? $_POST['email_incoming_email'] : null; ?>" placeholder="inbox@example.com" title="<?php _se('Recipient for contact form and system alerts.'); ?>" rel="tooltip" data-tipTip="right" required>
<span class="input-warning red-warning"><?php echo $input_errors['email_incoming_email']; ?></span>
</div>
</div>
<hr class="line-separator"></hr>
<div class="c9">
<div class="input-label">
<label for="website_mode"><?php _se('Website mode'); ?></label>
<div class="c5 phablet-c1"><select type="text" name="website_mode" id="website_mode" class="text-input" data-combo="website-mode-combo" title="<?php _se('You can switch the website mode anytime.'); ?>" rel="tooltip" data-tipTip="right">
<?php
echo CHV\Render\get_select_options_html(['community' => _s('Community'), 'personal' => _s('Personal')], isset($_POST['website_mode']) ? $_POST['website_mode'] : null);
?>
</select></div>
<div class="input-below input-warning red-warning"><?php echo $input_errors['website_mode']; ?></div>
</div>
</div>
<?php
if ($is_2X) {
?>
<hr class="line-separator"></hr>
<div class="c9">
<div class="input-label">
<label for="crypt_salt">__CHV_CRYPT_SALT__</label>
<input type="crypt_salt" name="crypt_salt" id="crypt_salt" class="text-input" value="<?php echo isset($_POST['crypt_salt']) ? $_POST['crypt_salt'] : ''; ?>" placeholder="Example: changeme" title="As defined in includes/definitions.php" rel="tooltip" data-tipTip="right" required>
<span class="input-below highlight">Value from define("__CHV_CRYPT_SALT__", "changeme");</span>
<span class="input-warning red-warning"><?php echo $input_errors['crypt_salt']; ?></span>
</div>
</div>
<?php
}
?>
<span class="line-separator"></span>
<div class="btn-container margin-bottom-0">
<button class="btn btn-input default" type="submit">Install Chevereto</button>
</div>
</form>

View file

@ -1,6 +1,6 @@
<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
<h1>Edit app/settings.php</h1>
<p>The database details are correct but Chevereto wasn't able to edit the <code>app/settings.php</code> file for you. This file is the one that stores this data.</p>
<p>Edit the <code><?php echo G_APP_PATH . 'settings.php'; ?></code> file with this content:</p>
<code class="display-block"><pre><?php echo htmlspecialchars($settings_php); ?></pre></code>
<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
<h1>Edit app/settings.php</h1>
<p>The database details are correct but Chevereto wasn't able to edit the <code>app/settings.php</code> file for you. This file is the one that stores this data.</p>
<p>Edit the <code><?php echo G_APP_PATH . 'settings.php'; ?></code> file with this content:</p>
<code class="display-block"><pre><?php echo htmlspecialchars($settings_php); ?></pre></code>
<p>Once done <a href="<?php echo G\get_current_url(); ?>">click here</a>.</p>

View file

@ -1,5 +1,5 @@
<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
<h1>Update failed</h1>
<p>The update process failed. Here is the error returned:</p>
<p class="highlight padding-10"><?php echo $error_message; ?></p>
<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
<h1>Update failed</h1>
<p>The update process failed. Here is the error returned:</p>
<p class="highlight padding-10"><?php echo $error_message; ?></p>
<p>If you have altered your database you will need to manually perform this update. If you need help don't hesitate to ask for <a href="http://chevereto.com/support">Tech support</a>.</p>

View file

@ -1,4 +1,4 @@
<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
<h1>Update complete</h1>
<p><?php echo strtr('Chevereto has been successfully updated to %s. You can now continue to the <a href="%u">admin dashboard</a> and configure your website.', ['%s' => CHV\get_chevereto_version(true), '%u' => G\get_base_url('dashboard')]); ?></p>
<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
<h1>Update complete</h1>
<p><?php echo strtr('Chevereto has been successfully updated to %s. You can now continue to the <a href="%u">admin dashboard</a> and configure your website.', ['%s' => CHV\get_chevereto_version(true), '%u' => G\get_base_url('dashboard')]); ?></p>
<script>$(document).ready(function() { CHV.fn.system.checkUpdates(); });</script>

View file

@ -1,116 +1,116 @@
$(document).ready(function(){
setInterval(function() {
var $el = $(".animated-ellipsis");
var ellipsis = $el.html();
ellipsis = ellipsis + ".";
if(ellipsis.length > 3) {
ellipsis = "";
}
$el.html(ellipsis);
}, 400);
// The auto-upgrade procedure
update.process();
});
var update = {
vars: {},
process: function(callback) { // S0: Check if update is needed
var _this = this;
_this.addLog(PF.fn._s("Installed version is v%s", vars.current_version));
$.ajax({
url: vars.url,
data: {action: "ask"}
})
.always(function(data, status, XHR) {
if(!XHR) {
_this.abort(PF.fn._s("Can't connect to %s", vars.url), 400);
return;
}
if(data.status_code == 200) {
_this.addLog(PF.fn._s("Last available release is v%s", data.software.current_version));
if(PF.fn.versionCompare(vars.current_version, data.software.current_version) == -1) { // Can update
_this.vars.target_version = data.software.current_version;
_this.addLog(PF.fn._s("Update needed, proceeding to download"));
_this.download(function() {
_this.extract(function() {
_this.install(); // yo dawg
});
});
} else {
$("h1").html(PF.fn._s("No update needed"));
_this.addLog(PF.fn._s("System files already up to date", vars.current_version));
_this.install();
}
}
});
},
download: function(callback) {
var _this = this;
_this.addLog(PF.fn._s("Starting v%s download", this.vars.target_version));
$.ajax({
url: vars.url,
data: {action: "download", version: _this.vars.target_version},
}).always(function(data, status, XHR) {
if(!XHR) {
_this.abort(PF.fn._s("Can't connect to %s", vars.url), 400);
return;
}
if(data.status_code == 200) {
_this.vars.target_filename = data.download.filename;
_this.addLog(PF.fn._s("Downloaded v%s, proceeding to extraction", _this.vars.target_version));
if(typeof callback == "function") {
callback();
}
} else {
_this.abort(data.responseJSON.error.message, 400);
}
});
},
extract: function(callback) {
var _this = this;
_this.addLog(PF.fn._s("Attempting to extract v%s", this.vars.target_version));
$.ajax({
url: vars.url,
data: {action: "extract", file: _this.vars.target_filename},
}).always(function(data, status, XHR) {
if(!XHR) {
_this.abort(PF.fn._s("Can't connect to %s", vars.url), 400);
return;
}
if(data.status_code == 200) {
_this.addLog(PF.fn._s("Extraction completed", _this.vars.target_version));
setTimeout(function() {
_this.addLog(PF.fn._s("Proceding to install the update", _this.vars.target_version));
if(typeof callback == "function") {
callback();
}
}, 500);
} else {
_this.abort(data.responseJSON.error.message, 400);
}
});
},
install: function() {
var _this = this;
setTimeout(function() {
window.location = PF.obj.config.base_url + "/install";
}, 2000);
},
addLog: function(message, code) {
if(!code) code = 200;
var $el = $("ul");
var d = PF.fn.getDateTime().substring(11);
var $event = $("<li/>", {
class: code != 200 ? 'color-red' : null,
text: d + ' ' + message
});
$el.prepend($event);
},
abort: function(message) {
$("h1").html(PF.fn._s("Update failed"));
if(message) {
this.addLog(message, 400);
}
}
$(function () {
setInterval(function () {
var $el = $(".animated-ellipsis");
var ellipsis = $el.html();
ellipsis = ellipsis + ".";
if (ellipsis.length > 3) {
ellipsis = "";
}
$el.html(ellipsis);
}, 400);
// The auto-upgrade procedure
update.process();
});
var update = {
vars: {},
process: function (callback) { // S0: Check if update is needed
var _this = this;
_this.addLog(PF.fn._s("Installed version is v%s", vars.current_version));
$.ajax({
url: vars.url,
data: { action: "ask" }
})
.always(function (data, status, XHR) {
if (!XHR) {
_this.abort(PF.fn._s("Can't connect to %s", vars.url), 400);
return;
}
if (data.status_code == 200) {
_this.addLog(PF.fn._s("Last available release is v%s", data.software.current_version));
if (PF.fn.versionCompare(vars.current_version, data.software.current_version) == -1) { // Can update
_this.vars.target_version = data.software.current_version;
_this.addLog(PF.fn._s("Update needed, proceeding to download"));
_this.download(function () {
_this.extract(function () {
_this.install(); // yo dawg
});
});
} else {
$("h1").html(PF.fn._s("No update needed"));
_this.addLog(PF.fn._s("System files already up to date", vars.current_version));
_this.install();
}
}
});
},
download: function (callback) {
var _this = this;
_this.addLog(PF.fn._s("Starting v%s download", this.vars.target_version));
$.ajax({
url: vars.url,
data: { action: "download", version: _this.vars.target_version },
}).always(function (data, status, XHR) {
if (!XHR) {
_this.abort(PF.fn._s("Can't connect to %s", vars.url), 400);
return;
}
if (data.status_code == 200) {
_this.vars.target_filename = data.download.filename;
_this.addLog(PF.fn._s("Downloaded v%s, proceeding to extraction", _this.vars.target_version));
if (typeof callback == "function") {
callback();
}
} else {
_this.abort(data.responseJSON.error.message, 400);
}
});
},
extract: function (callback) {
var _this = this;
_this.addLog(PF.fn._s("Attempting to extract v%s", this.vars.target_version));
$.ajax({
url: vars.url,
data: { action: "extract", file: _this.vars.target_filename },
}).always(function (data, status, XHR) {
if (!XHR) {
_this.abort(PF.fn._s("Can't connect to %s", vars.url), 400);
return;
}
if (data.status_code == 200) {
_this.addLog(PF.fn._s("Extraction completed", _this.vars.target_version));
setTimeout(function () {
_this.addLog(PF.fn._s("Proceding to install the update", _this.vars.target_version));
if (typeof callback == "function") {
callback();
}
}, 500);
} else {
_this.abort(data.responseJSON.error.message, 400);
}
});
},
install: function () {
var _this = this;
setTimeout(function () {
window.location = PF.obj.config.base_url + "/install";
}, 2000);
},
addLog: function (message, code) {
if (!code) code = 200;
var $el = $("ul");
var d = PF.fn.getDateTime().substring(11);
var $event = $("<li/>", {
class: code != 200 ? 'color-red' : null,
text: d + ' ' + message
});
$el.prepend($event);
},
abort: function (message) {
$("h1").html(PF.fn._s("Update failed"));
if (message) {
this.addLog(message, 400);
}
}
};

View file

@ -1,10 +1,11 @@
<?php if(!defined('access') or !access) die('This file cannot be directly accessed.'); ?>
<h1><?php _se('Update in progress'); ?><span class="animated-ellipsis"></span></h1>
<ul class="log margin-bottom-0"></ul>
<script>
var vars = {
url: "<?php echo G\get_base_url('update'); ?>",
current_version: "<?php echo G\get_app_version(); ?>",
}
</script>
<?php if (!defined('access') or !access) {
die('This file cannot be directly accessed.');
} ?>
<h1><?php _se('Update in progress'); ?><span class="animated-ellipsis"></span></h1>
<ul class="log margin-bottom-0"></ul>
<script>
var vars = {
current_version: "<?php echo G\get_app_version(); ?>",
}
</script>
<script src="<?php echo G\absolute_to_url(__DIR__ . '/update.js'); ?>"></script>

View file

@ -5,7 +5,7 @@
http://chevereto.com/
@author Rodolfo Berrios A. <http://rodolfoberrios.com/>
<inbox@rodolfoberrios.com>
<inbox@rodolfoberrios.com>
Copyright (C) Rodolfo Berrios A. All rights reserved.
@ -15,30 +15,34 @@
--------------------------------------------------------------------- */
namespace CHV;
use G, Exception;
if(!defined('access') or !access) die('This file cannot be directly accessed.');
use G;
use Exception;
if (!defined('access') or !access) {
die('This file cannot be directly accessed.');
}
try {
if(!is_null(getSetting('chevereto_version_installed')) and !Login::getUser()['is_admin']) {
G\set_status_header(403);
if (!is_null(getSetting('chevereto_version_installed')) and !Login::getUser()['is_admin']) {
G\set_status_header(403);
die('Request denied. You must be an admin to be here.');
}
if(!class_exists('ZipArchive')) {
}
if (!class_exists('ZipArchive')) {
throw new Exception("PHP ZipArchive class is not enabled in this server");
}
if(!is_writable(G_ROOT_PATH)) {
if (!is_writable(G_ROOT_PATH)) {
throw new Exception(sprintf("Can't write into root %s path", G\absolute_to_relative(G_ROOT_PATH)));
}
$update_temp_dir = CHV_APP_PATH_INSTALL . 'update/temp/';
if(!is_writable($update_temp_dir)) {
if (!is_writable($update_temp_dir)) {
throw new Exception(sprintf("Can't write into %s path", G\absolute_to_relative($update_temp_dir)));
}
if(!isset($_REQUEST['action'])) {
if (!isset($_REQUEST['action'])) {
$doctitle = _s('Update in progress');
$system_template = CHV_APP_PATH_CONTENT_SYSTEM . 'template.php';
$update_template = dirname($update_temp_dir) . '/template/update.php';
if(file_exists($update_template)) {
if (file_exists($update_template)) {
ob_start();
require_once($update_template);
$html = ob_get_contents();
@ -46,54 +50,53 @@ try {
} else {
throw new Exception("Can't find " . G\absolute_to_relative($update_template));
}
if(!@require_once($system_template)) {
if (!@require_once($system_template)) {
throw new Exception("Can't find " . G\absolute_to_relative($system_template));
}
} else {
$CHEVERETO = Settings::getChevereto();
$CHEVERETO = Settings::getChevereto();
set_time_limit(300); // Allow up to five minutes...
switch($_REQUEST['action']) {
switch ($_REQUEST['action']) {
case 'ask':
try {
$json_array = json_decode(G\fetch_url($CHEVERETO['api']['get']['info'], FALSE, [
CURLOPT_REFERER => G\get_base_url()
]), TRUE);
$json_array = json_decode(G\fetch_url($CHEVERETO['api']['get']['info'], false, [
CURLOPT_REFERER => G\get_base_url()
]), true);
$json_array['success'] = ['message' => 'OK']; // "success" is a Chevereto internal thing
} catch(Exception $e) {
throw new Exception(sprintf('Fatal error: %s', $e->getMessage()) , 400);
} catch (Exception $e) {
throw new Exception(sprintf('Fatal error: %s', $e->getMessage()), 400);
}
break;
break;
case 'download':
try {
$version = $_REQUEST['version'];
$context = stream_context_create([
'http'=> [
'method' => 'GET',
'header' => "User-agent: " . G_APP_GITHUB_REPO . "\r\n"
]
]);
$download = @file_get_contents('https://api.github.com/repos/' . G_APP_GITHUB_OWNER . '/' . G_APP_GITHUB_REPO . '/zipball/'.$version, FALSE, $context);
if($download === FALSE) {
throw new Exception(sprintf("Can't fetch " . G_APP_NAME . " v%s from GitHub", $version), 400);
}
$github_json = json_decode($download, TRUE);
if(json_last_error() == JSON_ERROR_NONE) {
$version = $_REQUEST['version'];
$context = stream_context_create([
'http'=> [
'method' => 'GET',
'header' => "User-agent: " . G_APP_GITHUB_REPO . "\r\n"
]
]);
$download = @file_get_contents('https://api.github.com/repos/' . G_APP_GITHUB_OWNER . '/' . G_APP_GITHUB_REPO . '/zipball/'.$version, false, $context);
if ($download === false) {
throw new Exception(sprintf("Can't fetch " . G_APP_NAME . " v%s from GitHub", $version), 400);
}
$github_json = json_decode($download, true);
if (json_last_error() == JSON_ERROR_NONE) {
throw new Exception("Can't proceed with update procedure");
} else {
// Get Content-Disposition header from GitHub
foreach($http_response_header as $header) {
if(preg_match('/^Content-Disposition:.*filename=(.*)$/i', $header, $matches)) {
$zip_local_filename = G\str_replace_last('.zip', '_' . G\random_string(24) . '.zip', $matches[1]);
break;
}
}
if(!isset($zip_local_filename)) {
throw new Exception("Can't grab content-disposition header from GitHub");
}
if(file_put_contents($update_temp_dir . $zip_local_filename, $download) === FALSE) {
// Get Content-Disposition header from GitHub
foreach ($http_response_header as $header) {
if (preg_match('/^Content-Disposition:.*filename=(.*)$/i', $header, $matches)) {
$zip_local_filename = G\str_replace_last('.zip', '_' . G\random_string(24) . '.zip', $matches[1]);
break;
}
}
if (!isset($zip_local_filename)) {
throw new Exception("Can't grab content-disposition header from GitHub");
}
if (file_put_contents($update_temp_dir . $zip_local_filename, $download) === false) {
throw new Exception(_s("Can't save file"));
}
$json_array = [
@ -113,29 +116,30 @@ try {
break;
case 'extract':
$zip_file = $update_temp_dir . $_REQUEST['file'];
if(FALSE === preg_match('/^Chevereto-Chevereto-Free-([\d.]+)-\d+-g(.*)_.*$/', $_REQUEST['file'], $matches)) {
throw new Exception("Can't detect target zip file version");
}
$version = $matches[1];
$etag_short = $matches[2];
if (false === preg_match('/^Chevereto-Chevereto-Free-([\d.]+)-\d+-g(.*)_.*$/i', $_REQUEST['file'], $matches)) {
throw new Exception("Can't detect target zip file version");
}
$version = $matches[1];
$etag_short = $matches[2];
// Test .zip
if(!is_readable($zip_file)) {
if (!is_readable($zip_file)) {
throw new Exception('Missing '.$zip_file.' file', 400);
}
// Unzip .zip
$zip = new \ZipArchive;
if ($zip->open($zip_file) === TRUE) {
if ($zip->open($zip_file) === true) {
// At this point we will enter the website in maintenance mode (if needed)
try {
$toggle_maintenance = !getSetting('maintenance');
if($toggle_maintenance) {
if ($toggle_maintenance) {
DB::update('settings', ['value' => $toggle_maintenance], ['name' => 'maintenance']);
}
} catch (Exception $e) {}
} catch (Exception $e) {
}
$zip->extractTo($update_temp_dir);
$zip->close();
@ -148,64 +152,64 @@ try {
$source = $update_temp_dir . G_APP_GITHUB_OWNER . '-' . G_APP_GITHUB_REPO . '-' . $etag_short . '/';
$dest = G_ROOT_PATH;
foreach ($iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($source, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST) as $item) {
$target = $dest . $iterator->getSubPathName();
$target_visible = G\absolute_to_relative($target);
if ($item->isDir()) {
if(!file_exists($target) and !@mkdir($target)) {
$error = error_get_last();
throw new Exception(_s("Can't create %s directory - %e", [
'%s' => $target_visible,
'%e' => $error['message']
]), 402);
}
} else {
// Touch anything but .htaccess files
if(!preg_match('/\.htaccess$/', $item)) {
if(!@copy($item, $target)) {
$error = error_get_last();
throw new Exception(_s("Can't update %s file - %e", [
'%s' => $target_visible,
'%e' => $error['message']
]), 403);
}
}
unlink($item); // Save some valuable seconds...
}
$target = $dest . $iterator->getSubPathName();
$target_visible = G\absolute_to_relative($target);
if ($item->isDir()) {
if (!file_exists($target) and !@mkdir($target)) {
$error = error_get_last();
throw new Exception(_s("Can't create %s directory - %e", [
'%s' => $target_visible,
'%e' => $error['message']
]), 402);
}
} else {
// Touch anything but .htaccess files
if (!preg_match('/\.htaccess$/', $item)) {
if (!@copy($item, $target)) {
$error = error_get_last();
throw new Exception(_s("Can't update %s file - %e", [
'%s' => $target_visible,
'%e' => $error['message']
]), 403);
}
}
unlink($item); // Save some valuable seconds...
}
}
// Remove working copy (UPDATE)
$tmp = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($update_temp_dir, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::CHILD_FIRST);
foreach ($tmp as $fileinfo) {
$todo = ($fileinfo->isDir() ? 'rmdir' : 'unlink');
$todo($fileinfo->getRealPath());
}
// Turn off maintenance mode (if needed)
try {
if($toggle_maintenance) {
if ($toggle_maintenance) {
DB::update('settings', ['value' => 0], ['name' => 'maintenance']);
}
} catch (Exception $e) {}
} catch (Exception $e) {
}
$json_array['success'] = ['message' => 'OK', 'code' => 200];
break;
break;
}
// Inject any missing status_code
if(isset($json_array['success']) and !isset($json_array['status_code'])) {
if (isset($json_array['success']) and !isset($json_array['status_code'])) {
$json_array['status_code'] = 200;
}
$json_array['request'] = $_REQUEST;
G\Render\json_output($json_array);
$json_array['request'] = $_REQUEST;
G\Render\json_output($json_array);
}
die(); // Terminate any remaining execution (if any)
die(); // Terminate any remaining execution (if any)
} catch (Exception $e) {
if(!isset($_REQUEST['action'])) {
if (!isset($_REQUEST['action'])) {
Render\chevereto_die($e->getMessage(), "This installation can't use the automatic update functionality because this server is missing some crucial elements to allow Chevereto to perform the automatic update:", "Can't perform automatic update");
} else {
$json_array = G\json_error($e);
$json_array['request'] = $_REQUEST;
G\Render\json_output($json_array);
}
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,87 @@
<?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
--------------------------------------------------------------------- */
namespace CHV;
use Exception;
use G;
use TijsVerkoyen\Akismet\Akismet as BaseAkismet;
class Akismet extends BaseAkismet
{
final public function __construct()
{
parent::__construct(getSetting('akismet_api_key'), G\get_base_url());
}
/**
* @param array $source_db
*/
final public static function checkImage($title = null, $description = null, $source_db = null)
{
$akismet = new static();
$userName = $source_db['user_name'] ?: $source_db['user_username'];
if (isset($description)) {
$isDescriptionSpam = $akismet->isSpam(
$description,
$userName,
$source_db['user_email']
);
if ($isDescriptionSpam) {
throw new Exception(_s('Spam detected'), 910);
}
}
if (isset($title)) {
$isTitleSpam = $akismet->isSpam(
$title,
$userName,
$source_db['user_email']
);
if ($isTitleSpam) {
throw new Exception(_s('Spam detected'), 900);
}
}
}
/**
* @param array $source_db
*/
final public static function checkAlbum($name, $description = null, $source_db = null)
{
$akismet = new static();
$userName = $source_db['user_name'] ?: $source_db['user_username'];
$isNameSpam = $akismet->isSpam(
$name,
$userName,
$source_db['user_email']
);
if ($isNameSpam) {
throw new Exception(_s('Spam detected'), 900);
}
if (isset($description)) {
$isDescriptionSpam = $akismet->isSpam(
$description,
$userName,
$source_db['user_email']
);
if ($isDescriptionSpam) {
throw new Exception(_s('Spam detected'), 910);
}
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -6,64 +6,70 @@
http://chevereto.com/
@author Rodolfo Berrios A. <http://rodolfoberrios.com/>
<inbox@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
--------------------------------------------------------------------- */
namespace CHV;
use G, Exception;
class Confirmation {
public static function get($values, $sort=array(), $limit=1) {
try {
return DB::get('confirmations', $values, 'AND', $sort, $limit);
} catch(Exception $e) {
throw new ConfirmationException($e->getMessage(), 400);
}
}
public static function insert($values) {
if(!is_array($values)) {
throw new ConfirmationException('Expecting array values, '.gettype($values).' given in ' . __METHOD__, 100);
}
if(!$values['status']) {
$values['status'] = 'active';
}
$values['date'] = G\datetime();
$values['date_gmt'] = G\datetimegmt();
try {
return DB::insert('confirmations', $values);
} catch(Exception $e) {
throw new ConfirmationException($e->getMessage(), 400);
}
use G;
use Exception;
}
public static function update($id, $values) {
try {
return DB::update('confirmations', $values, ['id' => $id]);
} catch(Exception $e) {
throw new ConfirmationException($e->getMessage(), 400);
}
}
public static function delete($values, $clause='AND') {
try {
return DB::delete('confirmations', $values, $clause);
} catch(Exception $e) {
throw new ConfirmationException($e->getMessage(), 400);
}
}
class Confirmation
{
public static function get($values, $sort=array(), $limit=1)
{
try {
return DB::get('confirmations', $values, 'AND', $sort, $limit);
} catch (Exception $e) {
throw new ConfirmationException($e->getMessage(), 400);
}
}
public static function insert($values)
{
if (!is_array($values)) {
throw new ConfirmationException('Expecting array values, '.gettype($values).' given in ' . __METHOD__, 100);
}
if (!$values['status']) {
$values['status'] = 'active';
}
$values['date'] = G\datetime();
$values['date_gmt'] = G\datetimegmt();
try {
return DB::insert('confirmations', $values);
} catch (Exception $e) {
throw new ConfirmationException($e->getMessage(), 400);
}
}
public static function update($id, $values)
{
try {
return DB::update('confirmations', $values, ['id' => $id]);
} catch (Exception $e) {
throw new ConfirmationException($e->getMessage(), 400);
}
}
public static function delete($values, $clause='AND')
{
try {
return DB::delete('confirmations', $values, $clause);
} catch (Exception $e) {
throw new ConfirmationException($e->getMessage(), 400);
}
}
}
class ConfirmationException extends Exception {}
class ConfirmationException extends Exception
{
}

View file

@ -1,170 +1,190 @@
<?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
--------------------------------------------------------------------- */
namespace CHV;
use G, Exception;
class DB extends G\DB {
public static function getTable($table) {
return G\get_app_setting('db_table_prefix') . $table;
}
public static function getTables() {
$tables = ['images', 'users', 'albums', 'logins', 'queue', 'requests', 'confirmations', 'settings', 'storages', 'storage_apis', 'categories', 'ip_bans', 'pages', 'likes', 'stats', 'deletions', 'follows', 'notifications'];
$return = [];
foreach($tables as $table) {
$return[$table] = G\get_app_setting('db_table_prefix') . $table;
}
return $return;
}
// G\DB::get wrapper
public static function get($table, $values, $clause='AND', $sort=[], $limit=NULL, $fetch_style=NULL) {
$prefix = self::getFieldPrefix($table);
$values = self::getPrefixedValues($prefix, $values);
$sort = self::getPrefixedSort($prefix, $sort);
return G\DB::get($table, $values, $clause, $sort, $limit, $fetch_style);
}
// G\DB::update wrapper
public static function update($table, $values, $wheres, $clause='AND') {
$prefix = self::getFieldPrefix($table);
$values = self::getPrefixedValues($prefix, $values);
$wheres = self::getPrefixedValues($prefix, $wheres);
return G\DB::update($table, $values, $wheres, $clause);
}
// G\DB::insert wrapper
public static function insert($table, $values) {
$prefix = self::getFieldPrefix($table);
$values = self::getPrefixedValues($prefix, $values);
return G\DB::insert($table, $values);
}
// G\DB::increment wrapper
public static function increment($table, $values, $wheres, $clause='AND') {
$prefix = self::getFieldPrefix($table);
$values = self::getPrefixedValues($prefix, $values);
$wheres = self::getPrefixedValues($prefix, $wheres);
return G\DB::increment($table, $values, $wheres, $clause);
}
// G\DB::delete wrapper
public static function delete($table, $values, $clause='AND') {
$prefix = self::getFieldPrefix($table);
$values = self::getPrefixedValues($prefix, $values);
return G\DB::delete($table, $values, $clause);
}
// Format a single row. Converts prefix_something to [prefix] = something
public static function formatRow($dbrow, $field_prefix='') {
if(!is_array($dbrow)) return $dbrow;
if($field_prefix == '') {
$array = $dbrow;
reset($array);
$first_key = preg_match('/^([a-z0-9]+)_{1}/', key($array), $match);
$field_prefix = $match[1];
}
$output = [];
foreach($dbrow as $k => $v) {
if(!G\starts_with($field_prefix, $k)) {
$new_key = preg_match('/^([a-z0-9]+)_/i', $k, $new_key_match);
$new_key = $new_key_match[1];
$output[$new_key][str_replace($new_key . '_', '', $k)] = $v;
unset($output[$k]);
} else {
$output[str_replace($field_prefix.'_', '', $k)] = $v;
}
}
return $output;
}
// Format universal row resulset
public static function formatRows($get) {
if($get[0]) {
foreach($get as $k => $v) {
self::formatRowValues($get[$k], $v);
}
} else {
if($get) {
self::formatRowValues($get);
}
}
return $get;
}
// Format row handle
public static function formatRowValues(&$values, $row=[]) {
$values = self::formatRow(count($row) > 0 ? $row : $values);
}
public static function getTableFromFieldPrefix($prefix, $db_table_prefix=TRUE) {
$prefix_to_table = [
'category' => 'categories',
'deleted' => 'deletions',
];
if(array_key_exists($prefix, $prefix_to_table)) {
$table = $prefix_to_table[$prefix];
} else {
$table = $prefix . 's';
}
return $db_table_prefix ? self::getTable($table) : $table;
}
public static function getFieldPrefix($table) {
$tables_to_prefix = [
'categories' => 'category',
'deletions' => 'deleted', /* fix this duplicate */
];
if(is_array($table)) {
$array = $table;
$table = $array['table'];
}
if(array_key_exists($table, $tables_to_prefix)) {
return $tables_to_prefix[$table];
} else {
return rtrim($table, 's');
}
}
protected static function getPrefixedValues($prefix, $values) {
if(!is_array($values)) return $values;
$values_prefix = [];
if(is_array($values)) {
foreach($values as $k => $v) {
$values_prefix[$prefix . '_' . $k] = $v;
}
}
return $values_prefix;
}
protected static function getPrefixedSort($prefix, $sort) {
if(is_array($sort) and !empty($sort['field'])) {
$sort['field'] = $prefix.'_'.$sort['field'];
}
return $sort;
}
}
class DBException extends Exception {}
<?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
--------------------------------------------------------------------- */
namespace CHV;
use G;
use Exception;
class DB extends G\DB
{
public static function getTable($table)
{
return G\get_app_setting('db_table_prefix') . $table;
}
public static function getTables()
{
$tables = ['images', 'users', 'albums', 'logins', 'queue', 'requests', 'confirmations', 'settings', 'storages', 'storage_apis', 'categories', 'ip_bans', 'pages', 'likes', 'stats', 'deletions', 'follows', 'notifications', 'redirects', 'import', 'importing'];
$return = [];
foreach ($tables as $table) {
$return[$table] = G\get_app_setting('db_table_prefix') . $table;
}
return $return;
}
// G\DB::get wrapper
public static function get($table, $values, $clause='AND', $sort=[], $limit=null, $fetch_style=null)
{
$prefix = self::getFieldPrefix($table);
$values = self::getPrefixedValues($prefix, $values);
$sort = self::getPrefixedSort($prefix, $sort);
return G\DB::get($table, $values, $clause, $sort, $limit, $fetch_style);
}
// G\DB::update wrapper
public static function update($table, $values, $wheres, $clause='AND')
{
$prefix = self::getFieldPrefix($table);
$values = self::getPrefixedValues($prefix, $values);
$wheres = self::getPrefixedValues($prefix, $wheres);
return G\DB::update($table, $values, $wheres, $clause);
}
// G\DB::insert wrapper
public static function insert($table, $values)
{
$prefix = self::getFieldPrefix($table);
$values = self::getPrefixedValues($prefix, $values);
return G\DB::insert($table, $values);
}
// G\DB::increment wrapper
public static function increment($table, $values, $wheres, $clause='AND')
{
$prefix = self::getFieldPrefix($table);
$values = self::getPrefixedValues($prefix, $values);
$wheres = self::getPrefixedValues($prefix, $wheres);
return G\DB::increment($table, $values, $wheres, $clause);
}
// G\DB::delete wrapper
public static function delete($table, $values, $clause='AND')
{
$prefix = self::getFieldPrefix($table);
$values = self::getPrefixedValues($prefix, $values);
return G\DB::delete($table, $values, $clause);
}
// Format a single row. Converts prefix_something to [prefix] = something
public static function formatRow($dbrow, $field_prefix='')
{
if (!is_array($dbrow)) {
return $dbrow;
}
if ($field_prefix == '') {
$array = $dbrow;
reset($array);
$first_key = preg_match('/^([a-z0-9]+)_{1}/', key($array), $match);
$field_prefix = $match[1];
}
$output = [];
foreach ($dbrow as $k => $v) {
if (!G\starts_with($field_prefix, $k)) {
$new_key = preg_match('/^([a-z0-9]+)_/i', $k, $new_key_match);
$new_key = $new_key_match[1];
$output[$new_key][str_replace($new_key . '_', '', $k)] = $v;
unset($output[$k]);
} else {
$output[str_replace($field_prefix.'_', '', $k)] = $v;
}
}
return $output;
}
// Format universal row resulset
public static function formatRows($get)
{
if ($get[0]) {
foreach ($get as $k => $v) {
self::formatRowValues($get[$k], $v);
}
} else {
if ($get) {
self::formatRowValues($get);
}
}
return $get;
}
// Format row handle
public static function formatRowValues(&$values, $row=[])
{
$values = self::formatRow(count($row) > 0 ? $row : $values);
}
public static function getTableFromFieldPrefix($prefix, $db_table_prefix=true)
{
$prefix_to_table = [
'category' => 'categories',
'deleted' => 'deletions',
];
if (array_key_exists($prefix, $prefix_to_table)) {
$table = $prefix_to_table[$prefix];
} else {
$table = $prefix . 's';
}
return $db_table_prefix ? self::getTable($table) : $table;
}
public static function getFieldPrefix($table)
{
$tables_to_prefix = [
'categories' => 'category',
'deletions' => 'deleted', /* fix this duplicate */
];
if (is_array($table)) {
$array = $table;
$table = $array['table'];
}
if (array_key_exists($table, $tables_to_prefix)) {
return $tables_to_prefix[$table];
} else {
return rtrim($table, 's');
}
}
protected static function getPrefixedValues($prefix, $values)
{
if (!is_array($values)) {
return $values;
}
$values_prefix = [];
if (is_array($values)) {
foreach ($values as $k => $v) {
$values_prefix[$prefix . '_' . $k] = $v;
}
}
return $values_prefix;
}
protected static function getPrefixedSort($prefix, $sort)
{
if (is_array($sort) and !empty($sort['field'])) {
$sort['field'] = $prefix.'_'.$sort['field'];
}
return $sort;
}
}
class DBException extends Exception
{
}

File diff suppressed because it is too large Load diff

View file

@ -1,72 +1,72 @@
<?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
--------------------------------------------------------------------- */
namespace CHV;
use G;
use Exception;
/**
* This could be used to extend the image types allowed... Maybe .tiff support and so on.
*/
class ImageConvert
{
public function __construct($source, $to, $destination, $quality=90)
{
$source_info = G\get_image_fileinfo($source);
switch ($source_info['extension']) {
case 'bmp':
$temp_image = function_exists('imagecreatefrombmp') ? imagecreatefrombmp($source) : G\imagecreatefrombmp($source);
break;
case 'jpg':
$temp_image = imagecreatefromjpeg($source);
break;
case 'gif':
$temp_image = imagecreatefromgif($source);
break;
case 'png':
$temp_image = imagecreatefrompng($source);
break;
default:
return $source;
break;
}
if (!$temp_image) {
return $source;
}
unlink($source);
switch ($to) {
case 'jpg':
imagejpeg($temp_image, $destination, $quality);
break;
case 'gif':
imagegif($temp_image, $destination);
break;
case 'png':
imagepng($temp_image, $destination);
break;
default:
return $source;
break;
}
$this->out = $destination;
}
}
<?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
--------------------------------------------------------------------- */
namespace CHV;
use G;
use Exception;
/**
* This could be used to extend the image types allowed... Maybe .tiff support and so on.
*/
class ImageConvert
{
public function __construct($source, $to, $destination, $quality=90)
{
$source_info = G\get_image_fileinfo($source);
switch ($source_info['extension']) {
case 'bmp':
$temp_image = G\imagecreatefrombmp($source);
break;
case 'jpg':
$temp_image = imagecreatefromjpeg($source);
break;
case 'gif':
$temp_image = imagecreatefromgif($source);
break;
case 'png':
$temp_image = imagecreatefrompng($source);
break;
default:
return $source;
break;
}
if (!$temp_image) {
return $source;
}
unlink($source);
switch ($to) {
case 'jpg':
imagejpeg($temp_image, $destination, $quality);
break;
case 'gif':
imagegif($temp_image, $destination);
break;
case 'png':
imagepng($temp_image, $destination);
break;
default:
return $source;
break;
}
$this->out = $destination;
}
}

View file

@ -1,332 +1,329 @@
<?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
--------------------------------------------------------------------- */
namespace CHV;
use G, Exception;
class Imageresize {
// filename => name.ext
// file => /full/path/to/name.ext
// name => name
public $resized;
public function setSource($source) {
clearstatcache(TRUE, $source);
$this->source = $source;
}
public function setDestination($destination) {
$this->destination = $destination;
}
public function setFilename($name) {
$this->filename = $name;
}
// Set options
public function setOptions($options) {
$this->options = $options;
}
// Set individual option
public function setOption($key, $value) {
$this->options[$key] = $value;
}
public function set_width($width) {
$this->width = intval($width);
}
public function set_height($height) {
$this->height = intval($height);
}
public function set_fixed() {
$this->fixed = true;
}
/**
* Do the thing
* @Exception 4xx
*/
public function exec() {
$this->validateInput(); // Exception 1xx
// Save the source filename
$source_filename = G\get_filename_without_extension($this->source);
// Set file extension
$this->file_extension = $this->source_image_fileinfo['extension'];
// Workaround the $filename
if(!$this->filename) {
$this->filename = $source_filename;
}
// Fix file extension
if(G\get_file_extension($this->filename) == $this->resized_file_extension) {
$this->filename = G\get_filename_without_extension($this->filename);
}
// Fix the destination path
$this->destination = G\add_ending_slash($this->destination);
// Set $resized_file
$this->resized_file = $this->destination . $this->filename . '.' . $this->file_extension;
// Do the resize process
$this->resize_image();
$this->resized = [
'file' => $this->resized_file,
'filename' => G\get_filename($this->resized_file),
'name' => G\get_filename_without_extension($this->resized_file),
'fileinfo' => G\get_image_fileinfo($this->resized_file)
];
}
// @Exception 1xx
protected function validateInput() {
$check_missing = ['source'];
missing_values_to_exception($this, 'CHV\ImageresizeException', $check_missing, 100);
if(!$this->width and !$this->height) {
throw new ImageresizeException('Missing ' . '$width and/or ' . '$height', 102);
}
if(!$this->destination) {
$this->destination = G\add_ending_slash(dirname($this->source));
}
// Validate $source file
if(!file_exists($this->source)) {
throw new ImageresizeException("Source file doesn't exists", 110);
}
// $source file looks like an image?
$this->source_image_fileinfo = G\get_image_fileinfo($this->source);
if(!$this->source_image_fileinfo) {
throw new ImageresizeException("Can't get source image info", 111);
}
// Validate $destination
if(!is_dir($this->destination)) {
// Try to create the missing directory
$old_umask = umask(0);
$make_destination = @mkdir($this->destination, 0755, true);
umask($old_umask);
if(!$make_destination) {
throw new ImageresizeException('$destination ' . $this->destination . ' is not a dir', 120);
}
}
// Can read $destination dir? -> note: We only need to write and read the target file, no this dir.
/*
if(!is_readable($this->destination)) {
throw new ImageresizeException("Can't read target destination dir " . $this->destination, 121);
}
*/
// Can write $destination dir?
if(!is_writable ($this->destination)) {
throw new ImageresizeException("Can't write target destination dir " . $this->destination, 122);
}
// Validate width and height
if($this->width and !is_int($this->width)) {
throw new ImageresizeException('Expecting integer value in $width, ' . gettype($this->width) . ' given', 130);
}
if($this->height and !is_int($this->height)) {
throw new ImageresizeException('Expecting integer value in $height, ' . gettype($this->width) . ' given', 131);
}
}
// @Exception 2xx
protected function resize_image() {
// Fix the $width and $height vars
if($this->width and $this->height) {
$this->set_fixed();
} else {
if($this->fixed) {
if($this->width) {
$this->height = $this->width;
} else {
$this->width = $this->height;
}
} else {
if($this->width) {
$this->height = intval(round($this->width / $this->source_image_fileinfo['ratio']));
} else {
$this->width = intval(round($this->height * $this->source_image_fileinfo['ratio']));
}
}
}
$imageSX = $this->source_image_fileinfo['width'];
$imageSY = $this->source_image_fileinfo['height'];
// Do we actually need to resize?
if($this->width == $imageSX and $this->height == $imageSY and !$this->options['forced']) {
@copy($this->source, $this->resized_file);
return;
}
@ini_set('gd.jpeg_ignore_warning', 1);
switch($this->file_extension) {
case 'gif':
$src = imagecreatefromgif($this->source);
break;
case 'png':
$src = imagecreatefrompng($this->source);
break;
case 'jpg':
$src = imagecreatefromjpeg($this->source);
break;
}
// Invalid SRC
if(!$src) {
throw new ImageresizeException("Can't create image from source", 210);
}
if($this->fixed) {
$source_ratio = $this->source_image_fileinfo['ratio'];
$destination_ratio = $this->width / $this->height;
// Ratio thing
if ($destination_ratio > $source_ratio) {
$ratio_height = round($this->width / $source_ratio);
$ratio_width = $this->width;
} else {
$ratio_width = round($this->height * $source_ratio);
$ratio_height = $this->height;
}
$target = imagecreatetruecolor($ratio_width, $ratio_height);
$x_center = $ratio_width / 2;
$y_center = $ratio_height / 2;
} else {
$target = imagecreatetruecolor($this->width, $this->height);
}
// Copies SRC to TARGET
// Allocate SRC transparency
if(preg_match('/^(png|gif)$/', $this->file_extension)) {
G\image_allocate_transparency($src, $this->file_extension);
G\image_copy_transparency($src, $target);
}
if($this->fixed) {
self::imagecopyresampled($target, $src, 0, 0, 0, 0, $ratio_width, $ratio_height, $imageSX, $imageSY);
$process = imagecreatetruecolor($this->width, $this->height);
// Re-allocate the transparency
if($this->file_extension == 'gif') {
G\image_copy_transparency($process, $target);
G\image_copy_transparency($target, $process);
}
if($this->file_extension == 'png') {
G\image_allocate_transparency($process, $this->file_extension);
G\image_allocate_transparency($target, $this->file_extension);
}
self::imagecopyresampled($process, $target, 0, 0, ($x_center - ($this->width / 2)), ($y_center - ($this->height / 2)), $this->width, $this->height, $this->width, $this->height);
imagedestroy($target);
} else {
//if($this->file_extension == "gif") G\image_copy_transparency($target, $process);
if($this->file_extension == 'png') G\image_allocate_transparency($target, $this->file_extension);
self::imagecopyresampled($target, $src, 0, 0, 0, 0, $this->width, $this->height, $imageSX, $imageSY);
$process = $target;
}
// Sharpen the image just for JPG
// This needs a little more debug since GD 2.1.1 (dev)
/*
if($this->file_extension == 'jpg') {
$matrix = array(array(-1, -1, -1), array(-1, 32, -1), array(-1, -1, -1));
$divisor = array_sum(array_map('array_sum', $matrix));
imageconvolution($process, $matrix, $divisor, 0);
}
*/
// Creates the image
switch($this->file_extension) {
case 'gif':
$output_image = imagegif($process, $this->resized_file);
break;
case 'png':
$output_image = imagepng($process, $this->resized_file);
break;
case 'jpg':
$output_image = imagejpeg($process, $this->resized_file, 90);
break;
}
if(!$output_image) {
throw new ImageresizeException("Can't create final output image", 220);
}
// Remove the temp files
imagedestroy($process);
imagedestroy($src);
}
// http://stackoverflow.com/questions/12661/efficient-jpeg-image-resizing-in-php
public static function imagecopyresampled(&$dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h, $quality = 4) {
//return imagecopyresampled($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);
// Plug-and-Play fastimagecopyresampled function replaces much slower imagecopyresampled.
// Just include this function and change all "imagecopyresampled" references to "fastimagecopyresampled".
// Typically from 30 to 60 times faster when reducing high resolution images down to thumbnail size using the default quality setting.
// Author: Tim Eckel - Date: 09/07/07 - Version: 1.1 - Project: FreeRingers.net - Freely distributable - These comments must remain.
//
// Optional "quality" parameter (defaults is 3). Fractional values are allowed, for example 1.5. Must be greater than zero.
// Between 0 and 1 = Fast, but mosaic results, closer to 0 increases the mosaic effect.
// 1 = Up to 350 times faster. Poor results, looks very similar to imagecopyresized.
// 2 = Up to 95 times faster. Images appear a little sharp, some prefer this over a quality of 3.
// 3 = Up to 60 times faster. Will give high quality smooth results very close to imagecopyresampled, just faster.
// 4 = Up to 25 times faster. Almost identical to imagecopyresampled for most images.
// 5 = No speedup. Just uses imagecopyresampled, no advantage over imagecopyresampled.
if(empty($src_image) || empty($dst_image) || $quality <= 0) {
return false;
}
if($quality < 5 && (($dst_w * $quality) < $src_w || ($dst_h * $quality) < $src_h)) {
$temp = imagecreatetruecolor($dst_w * $quality + 1, $dst_h * $quality + 1);
imagecopyresized($temp, $src_image, 0, 0, $src_x, $src_y, $dst_w * $quality + 1, $dst_h * $quality + 1, $src_w, $src_h);
imagecopyresampled($dst_image, $temp, $dst_x, $dst_y, 0, 0, $dst_w, $dst_h, $dst_w * $quality, $dst_h * $quality);
imagedestroy($temp);
} else {
imagecopyresampled($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);
}
return true;
}
}
class ImageresizeException extends Exception {}
<?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
--------------------------------------------------------------------- */
namespace CHV;
use G;
use Exception;
class Imageresize
{
// filename => name.ext
// file => /full/path/to/name.ext
// name => name
public $resized;
public function setSource($source)
{
clearstatcache(true, $source);
$this->source = $source;
}
public function setDestination($destination)
{
$this->destination = $destination;
}
public function setFilename($name)
{
$this->filename = $name;
}
// Set options
public function setOptions($options)
{
$this->options = $options;
}
// Set individual option
public function setOption($key, $value)
{
$this->options[$key] = $value;
}
public function set_width($width)
{
$this->width = intval($width);
}
public function set_height($height)
{
$this->height = intval($height);
}
public function set_fixed()
{
$this->fixed = true;
}
/**
* Do the thing.
*
* @Exception 4xx
*/
public function exec()
{
$this->validateInput(); // Exception 1xx
// Save the source filename
$source_filename = G\get_basename_without_extension($this->source);
// Set file extension
$this->file_extension = $this->source_image_fileinfo['extension'];
// Workaround the $filename
if (!$this->filename) {
$this->filename = $source_filename;
}
// Fix file extension
if (G\get_file_extension($this->filename) == $this->resized_file_extension) {
$this->filename = G\get_basename_without_extension($this->filename);
}
// Fix the destination path
$this->destination = G\add_ending_slash($this->destination);
// Set $resized_file
$this->resized_file = $this->destination . $this->filename . '.' . $this->file_extension;
// Do the resize process
$this->resize_image();
$this->resized = [
'file' => $this->resized_file,
'filename' => G\get_filename($this->resized_file),
'name' => G\get_basename_without_extension($this->resized_file),
'fileinfo' => G\get_image_fileinfo($this->resized_file),
];
}
// @Exception 1xx
protected function validateInput()
{
$check_missing = ['source'];
missing_values_to_exception($this, 'CHV\ImageresizeException', $check_missing, 100);
if (!$this->width and !$this->height) {
throw new ImageresizeException('Missing ' . '$width and/or ' . '$height', 102);
}
if (!$this->destination) {
$this->destination = G\add_ending_slash(dirname($this->source));
}
// Validate $source file
if (!file_exists($this->source)) {
throw new ImageresizeException("Source file doesn't exists", 110);
}
// $source file looks like an image?
$this->source_image_fileinfo = G\get_image_fileinfo($this->source);
if (!$this->source_image_fileinfo) {
throw new ImageresizeException("Can't get source image info", 111);
}
// Validate $destination
if (!is_dir($this->destination)) {
// Try to create the missing directory
$old_umask = umask(0);
$make_destination = @mkdir($this->destination, 0755, true);
umask($old_umask);
if (!$make_destination) {
throw new ImageresizeException('$destination ' . $this->destination . ' is not a dir', 120);
}
}
// Can read $destination dir? -> note: We only need to write and read the target file, no this dir.
/*
if(!is_readable($this->destination)) {
throw new ImageresizeException("Can't read target destination dir " . $this->destination, 121);
}
*/
// Can write $destination dir?
if (!is_writable($this->destination)) {
throw new ImageresizeException("Can't write target destination dir " . $this->destination, 122);
}
// Validate width and height
if ($this->width and !is_int($this->width)) {
throw new ImageresizeException('Expecting integer value in $width, ' . gettype($this->width) . ' given', 130);
}
if ($this->height and !is_int($this->height)) {
throw new ImageresizeException('Expecting integer value in $height, ' . gettype($this->width) . ' given', 131);
}
}
// @Exception 2xx
protected function resize_image()
{
// Fix the $width and $height vars
if ($this->width and $this->height) {
$this->set_fixed();
} else {
if ($this->fixed) {
if ($this->width) {
$this->height = $this->width;
} else {
$this->width = $this->height;
}
} else {
if ($this->width) {
$this->height = intval(round($this->width / $this->source_image_fileinfo['ratio']));
} else {
$this->width = intval(round($this->height * $this->source_image_fileinfo['ratio']));
}
}
}
$imageSX = $this->source_image_fileinfo['width'];
$imageSY = $this->source_image_fileinfo['height'];
// Do we actually need to resize?
if ($this->width == $imageSX and $this->height == $imageSY and !$this->options['forced']) {
@copy($this->source, $this->resized_file);
return;
}
@ini_set('gd.jpeg_ignore_warning', 1);
$ext = $this->file_extension == 'jpg' ? 'jpeg' : $this->file_extension;
$imagecreatefrom = 'imagecreatefrom' . $ext;
$src = $imagecreatefrom($this->source);
// Invalid SRC
if (!$src) {
throw new ImageresizeException("Can't create image from source", 210);
}
if ($this->fixed) {
$source_ratio = $this->source_image_fileinfo['ratio'];
$destination_ratio = $this->width / $this->height;
// Ratio thing
if ($destination_ratio > $source_ratio) {
$ratio_height = round($this->width / $source_ratio);
$ratio_width = $this->width;
} else {
$ratio_width = round($this->height * $source_ratio);
$ratio_height = $this->height;
}
$target = imagecreatetruecolor($ratio_width, $ratio_height);
$x_center = $ratio_width / 2;
$y_center = $ratio_height / 2;
} else {
$target = imagecreatetruecolor($this->width, $this->height);
}
// Copies SRC to TARGET
// Allocate SRC transparency
if (preg_match('/^(png|gif)$/', $this->file_extension)) {
G\image_allocate_transparency($src, $this->file_extension);
G\image_copy_transparency($src, $target);
}
if ($this->fixed) {
self::imagecopyresampled($target, $src, 0, 0, 0, 0, $ratio_width, $ratio_height, $imageSX, $imageSY);
$process = imagecreatetruecolor($this->width, $this->height);
// Re-allocate the transparency
if ($this->file_extension == 'gif') {
G\image_copy_transparency($process, $target);
G\image_copy_transparency($target, $process);
}
if ($this->file_extension == 'png') {
G\image_allocate_transparency($process, $this->file_extension);
G\image_allocate_transparency($target, $this->file_extension);
}
self::imagecopyresampled($process, $target, 0, 0, ($x_center - ($this->width / 2)), ($y_center - ($this->height / 2)), $this->width, $this->height, $this->width, $this->height);
imagedestroy($target);
} else {
//if($this->file_extension == "gif") G\image_copy_transparency($target, $process);
if ($this->file_extension == 'png') {
G\image_allocate_transparency($target, $this->file_extension);
}
self::imagecopyresampled($target, $src, 0, 0, 0, 0, $this->width, $this->height, $imageSX, $imageSY);
$process = $target;
}
// Sharpen the image just for JPG
// This needs a little more debug since GD 2.1.1 (dev)
/*
if($this->file_extension == 'jpg') {
$matrix = array(array(-1, -1, -1), array(-1, 32, -1), array(-1, -1, -1));
$divisor = array_sum(array_map('array_sum', $matrix));
imageconvolution($process, $matrix, $divisor, 0);
}
*/
// Creates the image
switch ($this->file_extension) {
case 'gif':
$output_image = imagegif($process, $this->resized_file);
break;
case 'png':
$output_image = imagepng($process, $this->resized_file);
break;
case 'jpg':
$output_image = imagejpeg($process, $this->resized_file, 90);
break;
case 'webp':
$output_image = imagewebp($process, $this->resized_file, 90);
break;
}
if (!$output_image) {
throw new ImageresizeException("Can't create final output image", 220);
}
if (!file_exists($this->resized_file)) {
throw new ImageresizeException("Can't create final output image", 230);
}
// Remove the temp files
imagedestroy($process);
imagedestroy($src);
}
// http://stackoverflow.com/questions/12661/efficient-jpeg-image-resizing-in-php
public static function imagecopyresampled(&$dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h, $quality = 4)
{
if (empty($src_image) || empty($dst_image) || $quality <= 0) {
return false;
}
if ($quality < 5 && (($dst_w * $quality) < $src_w || ($dst_h * $quality) < $src_h)) {
$temp = imagecreatetruecolor($dst_w * $quality + 1, $dst_h * $quality + 1);
imagecopyresized($temp, $src_image, 0, 0, $src_x, $src_y, $dst_w * $quality + 1, $dst_h * $quality + 1, $src_w, $src_h);
imagecopyresampled($dst_image, $temp, $dst_x, $dst_y, 0, 0, $dst_w, $dst_h, $dst_w * $quality, $dst_h * $quality);
imagedestroy($temp);
} else {
imagecopyresampled($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);
}
return true;
}
}
class ImageresizeException extends Exception
{
}

View file

@ -6,7 +6,7 @@
http://chevereto.com/
@author Rodolfo Berrios A. <http://rodolfoberrios.com/>
<inbox@rodolfoberrios.com>
<inbox@rodolfoberrios.com>
Copyright (C) Rodolfo Berrios A. All rights reserved.
@ -16,114 +16,125 @@
--------------------------------------------------------------------- */
namespace CHV;
use G, Exception;
class Ip_ban {
public static function getSingle($args=[]) {
try {
$args = array_merge([
'ip' => G\get_client_ip()
], $args);
use G;
use Exception;
$db = DB::getInstance();
class Ip_ban
{
public static function getSingle($args=[])
{
try {
$args = array_merge([
'ip' => G\get_client_ip()
], $args);
$query = 'SELECT * FROM ' . DB::getTable('ip_bans') . ' WHERE ';
$db = DB::getInstance();
if($args['id']) {
$query .= 'ip_ban_id = :id;';
} else {
$query .= ':ip LIKE ip_ban_ip AND (ip_ban_expires_gmt > :now OR ip_ban_expires_gmt IS NULL) ORDER BY ip_ban_id DESC;'; // wilcard are stored as % but displayed as *
}
$query = 'SELECT * FROM ' . DB::getTable('ip_bans') . ' WHERE ';
$db->query($query);
if ($args['id']) {
$query .= 'ip_ban_id = :id;';
} else {
$query .= ':ip LIKE ip_ban_ip AND (ip_ban_expires_gmt > :now OR ip_ban_expires_gmt IS NULL) ORDER BY ip_ban_id DESC;'; // wilcard are stored as % but displayed as *
}
if($args['id']) {
$db->bind(':id', $args['id']);
} else {
$db->bind(':ip', $args['ip']);
$db->bind(':now', G\datetimegmt());
}
$db->query($query);
$ip_ban = $db->fetchSingle();
if($ip_ban) {
$ip_ban = DB::formatRow($ip_ban, 'ip_ban');
self::fill($ip_ban);
return $ip_ban;
} else {
return false;
}
} catch(Exception $e) {
throw new Ip_banException($e->getMessage(), 400);
}
}
if ($args['id']) {
$db->bind(':id', $args['id']);
} else {
$db->bind(':ip', $args['ip']);
$db->bind(':now', G\datetimegmt());
}
public static function getAll() {
try {
$ip_bans_raw = DB::get('ip_bans', 'all');
$ip_bans = [];
if($ip_bans_raw) {
foreach($ip_bans_raw as $ip_ban) {
$idx = $ip_ban['ip_ban_id'];
$ip_bans[$idx] = DB::formatRow($ip_ban, 'ip_ban');
self::fill($ip_bans[$idx]);
}
}
return $ip_bans;
} catch(Exception $e) {
throw new Ip_banException($e->getMessage(), 400);
}
}
$ip_ban = $db->fetchSingle();
if ($ip_ban) {
$ip_ban = DB::formatRow($ip_ban, 'ip_ban');
self::fill($ip_ban);
return $ip_ban;
} else {
return false;
}
} catch (Exception $e) {
throw new Ip_banException($e->getMessage(), 400);
}
}
public static function delete($args=[]) {
try {
return DB::delete('ip_bans', $args);
} catch(Exception $e) {
throw new Ip_banException($e->getMessage(), 400);
}
}
public static function getAll()
{
try {
$ip_bans_raw = DB::get('ip_bans', 'all');
$ip_bans = [];
if ($ip_bans_raw) {
foreach ($ip_bans_raw as $ip_ban) {
$idx = $ip_ban['ip_ban_id'];
$ip_bans[$idx] = DB::formatRow($ip_ban, 'ip_ban');
self::fill($ip_bans[$idx]);
}
}
return $ip_bans;
} catch (Exception $e) {
throw new Ip_banException($e->getMessage(), 400);
}
}
public static function update($where=[], $values=[]) {
try {
if($values['ip']) {
$values['ip'] = str_replace('*', '%', $values['ip']);
}
return DB::update('ip_bans', $values, $where);
} catch(Exception $e) {
throw new Ip_banException($e->getMessage(), 400);
}
}
public static function delete($args=[])
{
try {
return DB::delete('ip_bans', $args);
} catch (Exception $e) {
throw new Ip_banException($e->getMessage(), 400);
}
}
public static function insert($args=[]) {
try {
$args['ip'] = str_replace('*', '%', $args['ip']);
return DB::insert('ip_bans', $args);
} catch(Exception $e) {
throw new Ip_banException($e->getMessage(), 400);
}
}
public static function update($where=[], $values=[])
{
try {
if ($values['ip']) {
$values['ip'] = str_replace('*', '%', $values['ip']);
}
return DB::update('ip_bans', $values, $where);
} catch (Exception $e) {
throw new Ip_banException($e->getMessage(), 400);
}
}
public static function fill(&$ip_ban) {
$ip_ban['ip'] = str_replace('%', '*', $ip_ban['ip']);
}
public static function insert($args=[])
{
try {
$args['ip'] = str_replace('*', '%', $args['ip']);
return DB::insert('ip_bans', $args);
} catch (Exception $e) {
throw new Ip_banException($e->getMessage(), 400);
}
}
public static function validateIP($ip, $wilcards=TRUE) {
$validate = TRUE;
if($wilcards) {
$base_ip = str_replace('*', '0', $ip);
if(!G\is_valid_ip($ip) && !G\is_valid_ip($base_ip)) {
$validate = FALSE;
}
} else {
if(!G\is_valid_ip($ip)) {
$validate = FALSE;
}
}
if(!$validate) {
throw new Ip_banException('Invalid IP address');
}
return TRUE;
}
public static function fill(&$ip_ban)
{
$ip_ban['ip'] = str_replace('%', '*', $ip_ban['ip']);
}
public static function validateIP($ip, $wilcards=true)
{
$validate = true;
if ($wilcards) {
$base_ip = str_replace('*', '0', $ip);
if (!G\is_valid_ip($ip) && !G\is_valid_ip($base_ip)) {
$validate = false;
}
} else {
if (!G\is_valid_ip($ip)) {
$validate = false;
}
}
if (!$validate) {
throw new Ip_banException('Invalid IP address');
}
return true;
}
}
class Ip_banException extends Exception {}
class Ip_banException extends Exception
{
}

File diff suppressed because it is too large Load diff

View file

@ -23,7 +23,7 @@ use Exception;
class Listing
{
protected static $valid_types = ['images', 'albums', 'users'];
protected static $valid_sort_types = ['date', 'size', 'views', 'id', 'image_count', 'name'];
protected static $valid_sort_types = ['date', 'size', 'views', 'id', 'image_count', 'name', 'title', 'username'];
// Set the type of list
public function setListing($listing)
@ -42,6 +42,25 @@ class Listing
{
$this->offset = intval($offset);
}
public function setSeek($seek)
{
if (strpos($seek, '.') !== false) {
$explode = explode('.', $seek);
$explode[1] = decodeID($explode[1]);
$this->seek = $explode;
return;
}
$decodeID = decodeID($seek);
if (ctype_digit($decodeID)) {
$this->seek = $decodeID;
return;
}
$this->seek = $seek;
}
public function setReverse($bool)
{
$this->reverse = $bool;
}
public function setParamsHidden($params)
{
@ -92,7 +111,7 @@ class Listing
// Sets the category
public function setCategory($category)
{
$this->category = (int)$category;
$this->category = (int) $category;
}
// Sets the privacy layer of this listing
@ -102,7 +121,7 @@ class Listing
}
// Sets the tools available for this listing (only if applies)
public function setTools($tools=[])
public function setTools($tools = [])
{
$this->tools = $tools;
}
@ -125,7 +144,7 @@ class Listing
* Do the thing
* @Exeption 4xx
*/
public function exec($get_total_count=false)
public function exec($get_total_count = false)
{
$this->validateInput();
@ -140,14 +159,14 @@ class Listing
$joins = [
// Get image + storage + parent album + user uploader
'images' => [
'storages' => 'LEFT JOIN '.$tables['storages'].' ON '.$tables['images'].'.image_storage_id = '.$tables['storages'].'.storage_id',
'users' => 'LEFT JOIN '.$tables['users'].' ON '.$tables['images'].'.image_user_id = '.$tables['users'].'.user_id',
'albums' => 'LEFT JOIN '.$tables['albums'].' ON '.$tables['images'].'.image_album_id = '.$tables['albums'].'.album_id',
'categories'=> 'LEFT JOIN '.$tables['categories'].' ON '.$tables['images'].'.image_category_id = '.$tables['categories'].'.category_id',
'storages' => 'LEFT JOIN ' . $tables['storages'] . ' ON ' . $tables['images'] . '.image_storage_id = ' . $tables['storages'] . '.storage_id',
'users' => 'LEFT JOIN ' . $tables['users'] . ' ON ' . $tables['images'] . '.image_user_id = ' . $tables['users'] . '.user_id',
'albums' => 'LEFT JOIN ' . $tables['albums'] . ' ON ' . $tables['images'] . '.image_album_id = ' . $tables['albums'] . '.album_id',
'categories' => 'LEFT JOIN ' . $tables['categories'] . ' ON ' . $tables['images'] . '.image_category_id = ' . $tables['categories'] . '.category_id',
],
'users' => [],
'albums' => [
'users' => 'LEFT JOIN '.$tables['users'].' ON '.$tables['albums'].'.album_user_id = '.$tables['users'].'.user_id'
'users' => 'LEFT JOIN ' . $tables['users'] . ' ON ' . $tables['albums'] . '.album_user_id = ' . $tables['users'] . '.user_id'
]
];
@ -160,19 +179,22 @@ class Listing
if (!is_null($this->params_hidden)) {
// hide_empty
$emptyTypeClauses = [
'users' => 'user_image_count > 0 OR user_avatar_filename IS NOT NULL OR user_background_filename IS NOT NULL'
];
$emptyTypeClauses['users'][] = 'user_image_count > 0 OR user_avatar_filename IS NOT NULL OR user_background_filename IS NOT NULL';
if ($this->sort_type == 'views') {
$emptyTypeClauses['albums'][] = 'album_views > 0';
$emptyTypeClauses['images'][] = 'image_views > 0';
$emptyTypeClauses['users'][] = 'user_content_views > 0';
}
// Conditional album image count
if ($this->type == 'albums') {
if ($this->params_hidden['album_min_image_count'] > 0) {
$whereClauses[] = sprintf('album_image_count >= %d', $this->params_hidden['album_min_image_count']);
} else {
$emptyTypeClauses['albums'] = 'album_image_count > 0';
$emptyTypeClauses['albums'][] = 'album_image_count > 0';
}
}
if (array_key_exists($this->type, $emptyTypeClauses) && $this->params_hidden['hide_empty'] == 1) {
$whereClauses[] = $emptyTypeClauses[$this->type];
$whereClauses[] = '(' . implode(') AND (', $emptyTypeClauses[$this->type]) . ')';
}
// hide_banned
if ($this->params_hidden['hide_banned'] == 1) {
@ -245,44 +267,90 @@ class Listing
switch ($this->type) {
case 'images':
if ($nsfw_off) {
$nsfw_off_clause = $tables['images'].'.image_nsfw = 0';
$nsfw_off_clause = $tables['images'] . '.image_nsfw = 0';
if ($this->requester) {
$this->where .= '(' . $nsfw_off_clause . ' OR (' . $tables['images'] . '.image_nsfw = 1 AND ' . $tables['images'] . '.image_user_id = ' . $this->requester['id'] . ')) AND ';
} else {
$this->where .= $nsfw_off_clause . ' AND ';
}
}
break;
break;
case 'users':
$this->where .= $tables['users'].'.user_is_private = 0';
break;
$this->where .= $tables['users'] . '.user_is_private = 0';
break;
}
if ($this->type !== 'users') {
if (getSetting('website_privacy_mode') == 'public' || $this->privacy == 'private_but_link' || getSetting('website_content_privacy_mode') == 'default') {
$this->where .= '(' . $tables['albums'].'.album_privacy NOT IN';
$privacy_modes = ['private', 'private_but_link', 'password', 'custom'];
$this->where .= '(' . $tables['albums'] . '.album_privacy NOT IN';
$privacy_modes = ['private', 'private_but_link', 'custom'];
if ($this->type != 'albums') {
$privacy_modes[] = 'password';
}
if (in_array($this->privacy, $privacy_modes)) {
unset($privacy_modes[array_search($this->privacy, $privacy_modes)]);
}
$this->where .= " (" . "'" . implode("','", $privacy_modes) . "'" . ") ";
$this->where .= "OR ".$tables['albums'].'.album_privacy IS NULL OR '.$tables['albums'].'.album_user_id';
$this->where .= (!$this->requester ? ' IS NULL' : '='.$this->requester['id']) . ')';
$this->where .= "OR " . $tables['albums'] . '.album_privacy IS NULL';
if ($this->requester) {
$this->where .= ' OR ' . $tables['albums'] . '.album_user_id =' . $this->requester['id'];
}
$this->where .= ')';
} else {
$injected_requester = !$this->requester['id'] ? 0 : $this->requester['id'];
$this->where .= '(' . $tables['albums'].'.album_user_id = '.$injected_requester;
$this->where .= $this->type == 'albums' ? ')' : (' OR ' . $tables['images'].'.image_user_id = '.$injected_requester . ')');
$this->where .= '(' . $tables['albums'] . '.album_user_id = ' . $injected_requester;
$this->where .= $this->type == 'albums' ? ')' : (' OR ' . $tables['images'] . '.image_user_id = ' . $injected_requester . ')');
}
}
}
$sort_field = $type_singular . '_' . $this->sort_type;
$key_field = $type_singular . '_id';
if ($this->seek) {
if (empty($this->where)) {
$this->where = 'WHERE ';
} else {
$this->where .= ' AND ';
}
if ($this->reverse) {
$this->sort_order = $this->sort_order == 'asc' ? 'desc' : 'asc';
}
$signo = $this->sort_order == 'desc' ? '<=' : '>=';
if ($this->sort_type == 'id') {
$this->where .= $sort_field . ' ' . $signo . ' :seek';
$this->binds[] = [
'param' => 'seek',
'value' => $this->seek
];
} else {
$signo = $this->sort_order == 'desc' ? '<' : '>';
$this->where .= '((' . $sort_field . ' ' . $signo . ' :seekSort) OR (' . $sort_field . ' = :seekSort AND ' . $key_field . ' ' . $signo . '= :seekKey))';
$this->binds[] = [
'param' => 'seekSort',
'value' => $this->seek[0],
];
$this->binds[] = [
'param' => 'seekKey',
'value' => $this->seek[1],
];
}
}
if (!empty($this->where)) {
$this->where = "\n" . $this->where;
}
$order_by = "\n" . 'ORDER BY ' . DB::getTableFromFieldPrefix($type_singular) . '.' . $type_singular . '_' . $this->sort_type . ' ' . strtoupper($this->sort_order);
$sort_order = strtoupper($this->sort_order);
$table_order = DB::getTableFromFieldPrefix($type_singular);
$order_by = "\n" . 'ORDER BY ' . $table_order . '.' . $sort_field . ' ' . $sort_order;
$limit = "\n" . 'LIMIT ' . $this->offset . ',' . ($this->limit + 1);
if ($this->sort_type != 'id') {
$order_by .= ', ' . $table_order . '.' . $key_field . ' ' . $sort_order;
}
// $limit = "\n" . 'LIMIT ' . $this->offset . ',' . ($this->limit + 1);
$limit = "\n" . 'LIMIT ' . ($this->limit + 1); // +1 allows to fetch "one extra" to detect prev/next pages
$base_table = $tables[$this->type];
@ -325,6 +393,7 @@ class Listing
try {
$db = DB::getInstance();
// G\debug($query);
$db->query($query);
if (is_array($this->binds)) {
foreach ($this->binds as $bind) {
@ -334,10 +403,28 @@ class Listing
$this->output = $db->fetchAll();
$this->output_count = $db->rowCount();
$this->has_page_next = $db->rowCount() > $this->limit;
if ($this->reverse) {
$this->output = array_reverse($this->output);
}
$start = current($this->output);
$end = end($this->output);
$seekEnd = $end[$sort_field];
$seekStart = $start[$sort_field];
if ($this->sort_type == 'id') {
$seekEnd = encodeID($seekEnd);
$seekStart = encodeID($seekStart);
} else {
$seekEnd .= '.' . encodeID($end[$key_field]);
$seekStart .= '.' . encodeID($start[$key_field]);
}
$this->seekEnd = $seekEnd;
$this->seekStart = $seekStart;
if ($db->rowCount() > $this->limit) {
$array_fn = 'array_' . ($this->reverse ? 'shift' : 'pop');
array_pop($this->output);
}
$this->output = G\safe_html($this->output);
$this->count = count($this->output);
$this->nsfw = false;
$this->output_assoc = [];
$formatfn = 'CHV\\' . ucfirst(substr($this->type, 0, -1));
@ -392,85 +479,85 @@ class Listing
}
}
public static function getTabs($args=[], $expanded=false)
public static function getTabs($args = [], $expanded = false)
{
$default = [
'list' => true,
'REQUEST' => $_REQUEST,
'listing' => 'explore',
'basename' => G\get_route_name(),
'tools' => true,
'list' => true,
'REQUEST' => $_REQUEST,
'listing' => 'explore',
'basename' => G\get_route_name(),
'tools' => true,
'tools_available' => [],
];
$args = array_merge($default, $args);
// Fix lazy basenames
if (strpos($args['basename'], G\get_base_url()) !== false) {
$args['basename'] = G\get_base_url() == $args['basename'] ? null : G\str_replace_first(G\get_base_url() .'/', null, $args['basename']);
$args['basename'] = G\get_base_url() == $args['basename'] ? null : G\str_replace_first(G\get_base_url() . '/', null, $args['basename']);
}
// Semantics -> trending | popular | recent
$semantics = [
'recent' => [
'label' => _s('Recent'),
'content' => 'all',
'sort' => 'date_desc',
'recent' => [
'label' => _s('Recent'),
'content' => 'all',
'sort' => 'date_desc',
],
'trending' => [
'label' => _s('Trending'),
'content' => 'all',
'sort' => 'views_desc',
'trending' => [
'label' => _s('Trending'),
'content' => 'all',
'sort' => 'views_desc',
],
];
// Criteria -> images | albums | users
// Criteria -> [CONTENT TABS]
$criterias = [
'top-users' => [
'label' => _s('Top users'),
'sort' => 'image_count_desc',
'content' => 'users',
'top-users' => [
'label' => _s('Top users'),
'sort' => 'image_count_desc',
'content' => 'users',
],
'most-recent' => [
'label' => _s('Most recent'),
'sort' => 'date_desc',
'content' => 'all',
'most-recent' => [
'label' => _s('Most recent'),
'sort' => 'date_desc',
'content' => 'all',
],
'most-oldest' => [
'label' => _s('Oldest'),
'sort' => 'date_asc',
'content' => 'all',
'most-oldest' => [
'label' => _s('Oldest'),
'sort' => 'date_asc',
'content' => 'all',
],
'most-viewed' => [
'label' => _s('Most viewed'),
'sort' => 'views_desc',
'content' => 'all',
'most-viewed' => [
'label' => _s('Most viewed'),
'sort' => 'views_desc',
'content' => 'all',
],
];
$listings = [
'explore' => [
'label' => _s('Explore'),
'content' => 'images',
'explore' => [
'label' => _s('Explore'),
'content' => 'images',
],
'animated' => [
'label' => _s('Animated'),
'content' => 'images',
'where' => 'image_is_animated = 1',
'semantic' => true,
'animated' => [
'label' => _s('Animated'),
'content' => 'images',
'where' => 'image_is_animated = 1',
'semantic' => true,
],
'search' => [
'label' => _s('Search'),
'content' => 'all',
'search' => [
'label' => _s('Search'),
'content' => 'all',
],
'users' => [
'label' => _s('People'),
'content' => 'users',
'users' => [
'label' => _s('People'),
'content' => 'users',
],
'images' => [
'label' => _n('Image', 'Images', 2),
'content' => 'images',
'images' => [
'label' => _n('Image', 'Images', 2),
'content' => 'images',
],
'albums' => [
'label' => _n('Album', 'Albums', 2),
'content' => 'albums',
'albums' => [
'label' => _n('Album', 'Albums', 2),
'content' => 'albums',
],
];
$listings = array_merge($listings, $semantics);
@ -524,23 +611,23 @@ class Listing
'page' => '1',
];
$params = $args['params'] ?: $default_params;
foreach ((array)$args['params_remove_keys'] as $key) {
foreach ((array) $args['params_remove_keys'] as $key) {
unset($params[$key]);
}
if (is_array($args['params']) && array_key_exists('q', $args['params']) && $args['listing'] == 'search') {
$args['params_hidden']['list'] = $content;
$basename .= '/' . $content;
}
foreach ((array)$args['params_hidden'] as $kk => $vv) {
foreach ((array) $args['params_hidden'] as $kk => $vv) {
if (array_key_exists($kk, $params)) {
unset($params[$kk]);
}
}
$http_build_query = http_build_query($params);
$url = G\get_base_url($basename) . '/?' . $http_build_query;
$url = (filter_var($basename, FILTER_VALIDATE_URL) ? rtrim($basename, '/') : G\get_base_url($basename)) . '/?' . $http_build_query;
$current = isset($args['REQUEST']['sort']) ? $args['REQUEST']['sort'] == $v['sort'] : false;
if ($i==0 && !$current) {
if ($i == 0 && !$current) {
$current = !$args['REQUEST']['sort'];
}
if ($current && is_null($currentKey)) {
@ -548,15 +635,15 @@ class Listing
}
$tab = [
'list' => (bool) $args['list'],
'tools' => $content == 'users' ? false : (bool) $args['tools'],
'tools_available' => $args['tools_available'],
'label' => $v['label'],
'id' => $id,
'params' => $http_build_query, // Es que como explicar la magia que tiene su manera de enamorar...
'current' => (bool) $current,
'type' => $content,
'url' => $url
'list' => (bool) $args['list'],
'tools' => $content == 'users' ? false : (bool) $args['tools'],
'tools_available' => $args['tools_available'],
'label' => $v['label'],
'id' => $id,
'params' => $http_build_query, // Es que como explicar la magia que tiene su manera de enamorar...
'current' => (bool) $current,
'type' => $content,
'url' => $url
];
if ($args['tools_available'] && !G\Handler::getCond('allowed_to_delete_content') && array_key_exists('delete', $args['tools_available'])) {
@ -616,7 +703,7 @@ class Listing
// Validate type
if (!in_array($this->type, self::$valid_types)) {
throw new ListingException('Invalid $type "'.$this->type.'"', 110);
throw new ListingException('Invalid $type "' . $this->type . '"', 110);
}
// Validate limits
@ -629,12 +716,12 @@ class Listing
// Validate sort type
if (!in_array($this->sort_type, self::$valid_sort_types)) {
throw new ListingException('Invalid $sort_type "'.$this->sort_type.'"', 130);
throw new ListingException('Invalid $sort_type "' . $this->sort_type . '"', 130);
}
// Validate sort order
if (!preg_match('/^(asc|desc)$/', $this->sort_order)) {
throw new ListingException('Invalid $sort_order "'.$this->sort_order.'"', 140);
throw new ListingException('Invalid $sort_order "' . $this->sort_order . '"', 140);
}
}
@ -643,7 +730,7 @@ class Listing
{
}
public function htmlOutput($tpl_list=null)
public function htmlOutput($tpl_list = null)
{
if (!is_array($this->output)) {
return;
@ -675,6 +762,13 @@ class Listing
$html_output = '';
$tpl_list = preg_replace('/s$/', '', $tpl_list);
if (function_exists('get_peafowl_item_list')) {
$render = 'get_peafowl_item_list';
} else {
$render = 'CHV\Render\get_peafowl_item_list';
}
$tools = $this->tools ?: null;
$requester = Login::getUser();
foreach ($this->output as $row) {
switch ($tpl_list) {
@ -683,34 +777,24 @@ class Listing
case 'album/image':
default: // key thing here...
$Class = 'CHV\Image';
break;
break;
case 'album':
case 'user/album':
$Class = 'CHV\Album';
break;
break;
case 'user':
case 'user/user':
$Class = 'CHV\User';
break;
break;
}
$item = $Class::formatArray($row);
$tools = $this->tools ?: null;
if (function_exists('get_peafowl_item_list')) {
$render = 'get_peafowl_item_list';
} else {
$render = 'CHV\Render\get_peafowl_item_list';
}
$html_output .= $render($tpl_list, $item, $list_item_template, Login::getUser()['id'], $tools);
$html_output .= $render($tpl_list, $item, $list_item_template, $requester, $tools);
}
return $html_output;
}
public static function getAlbumHtml($album_id, $template='user/albums')
public static function getAlbumHtml($album_id, $template = 'user/albums')
{
try {
$album = new Listing;
@ -728,7 +812,7 @@ class Listing
}
}
public static function getParams($json_call=false)
public static function getParams($json_call = false)
{
self::setValidSortTypes();
@ -736,12 +820,13 @@ class Listing
$listing_pagination_mode = getSetting('listing_pagination_mode');
$params = [];
$params['offset'] = 0;
$params['items_per_page'] = $items_per_page;
if (!$json_call and $listing_pagination_mode == 'endless') {
$params['page'] = max(intval($_REQUEST['page']), 1);
$params['limit'] = $params['items_per_page'] * $params['page'];
$params['offset'] = 0;
// $params['offset'] = 0;
// Switch endless to classic if we are dealing with large listings (from GET)
if ($params['limit'] > getSetting('listing_safe_count')) {
@ -753,15 +838,15 @@ class Listing
if (isset($_REQUEST['pagination']) or $listing_pagination_mode == 'classic') { // Static single page display
$params['page'] = $_REQUEST['page'] ? intval($_REQUEST['page']) - 1 : 0;
$params['limit'] = $params['items_per_page'];
$params['offset'] = $params['page']*$params['limit'];
$params['offset'] = $params['page'] * $params['limit']; // TODO: Get rid
}
if ($json_call) {
$params = array_merge($params, [
'page' => $_REQUEST['page'] ? $_REQUEST['page'] - 1 : 0,
'limit' => $items_per_page
'page' => $_REQUEST['page'] ? $_REQUEST['page'] - 1 : 0,
'limit' => $items_per_page
]);
$params['offset'] = $params['page'] * $params['limit'] + ($_REQUEST['offset'] ? $_REQUEST['offset'] : 0);
$params['offset'] = $params['page'] * $params['limit'] + ($_REQUEST['offset'] ? $_REQUEST['offset'] : 0); // TODO: Get rid
}
$default_sort = [
@ -786,6 +871,16 @@ class Listing
$params['sort'][1] = $default_sort[1];
}
// $_REQUEST is already urldecoded
if ($_REQUEST['seek']) {
$params['seek'] = $_REQUEST['seek'];
} elseif ($_REQUEST['peek']) {
$params['seek'] = $_REQUEST['peek'];
$params['reverse'] = true;
}
$params['page_show'] = isset($_REQUEST['page']) ? intval($_REQUEST['page']) : null;
return $params;
}
}

View file

@ -6,7 +6,7 @@
http://chevereto.com/
@author Rodolfo Berrios A. <http://rodolfoberrios.com/>
<inbox@rodolfoberrios.com>
<inbox@rodolfoberrios.com>
Copyright (C) Rodolfo Berrios A. All rights reserved.
@ -16,102 +16,113 @@
--------------------------------------------------------------------- */
namespace CHV;
use G, Exception;
class Lock {
use G;
use Exception;
static $expire_timeout = 15; // t=seconds
static $path;
class Lock
{
public static $expire_timeout = 15; // t=seconds
public static $path;
function __construct($lock=NULL) {
self::$path = CHV_APP_PATH_CONTENT_LOCKS;
if(strlen($lock) > 0) {
$this->setLock($lock);
}
$this->expiration = self::$expire_timeout;
$this->id = $this->getId();
}
public function __construct($lock=null)
{
self::$path = CHV_APP_PATH_CONTENT_LOCKS;
if (strlen($lock) > 0) {
$this->setLock($lock);
}
$this->expiration = self::$expire_timeout;
$this->id = $this->getId();
}
function getAPI() {
return 'default';
}
public function getAPI()
{
return 'default';
}
function getId() {
if(!isset($this->id)) {
$this->id = G\random_string(8) . md5(microtime(TRUE));
}
return $this->id;
}
public function getId()
{
if (!isset($this->id)) {
$this->id = G\random_string(8) . md5(microtime(true));
}
return $this->id;
}
function setID($id=NULL) {
$this->id = $id;
}
public function setID($id=null)
{
$this->id = $id;
}
function setExpiration($time) {
$this->expiration = $time;
}
public function setExpiration($time)
{
$this->expiration = $time;
}
function setLock($lock) {
$this->lock = $lock;
}
public function setLock($lock)
{
$this->lock = $lock;
}
// Magic wand here (binds ->check(), ->create() and ->destroy())
public function __call($name, $arguments) {
if(in_array($name, ['check', 'create', 'destroy'])) {
return $this->process($name, $arguments);
}
}
private function process($action) {
// Only accept things that look like a file name, not path or something else
$callee = debug_backtrace()[0];
$method = $callee['class'] . $callee['type'] . $callee['function'] . '()';
if(preg_replace('/[^\.\w\d-]/i', '', $this->lock) !== $this->lock) {
throw new LockException(sprintf('Invalid $lock argument \'%s\' passed in ' . $method, $this->lock));
}
$lock_folder = self::$path;
$lock_file = self::$path . $this->lock . '.lock';
clearstatcache(TRUE, $lock_file);
switch($action) {
case 'check':
if(!file_exists($lock_file)) {
return FALSE;
}
$contents = file_get_contents($lock_file);
if(strpos($contents, 'expires') !== FALSE) {
$contents = json_decode($contents);
}
if(isset($contents->expires)) {
$is_locked = $contents->expires > microtime(true);
if(!$is_locked) {
self::destroy();
}
return $is_locked;
}
break;
case 'create':
$contents = [
'id' => $this->id
];
$now = microtime(true);
if($this->expiration) {
$contents['expires'] = $now + (int)$this->expiration;
}
if(!is_dir(self::$path) && !@mkdir(self::$path)) {
throw new LockException('Unable to create lock folder in ' . $method);
}
if(file_put_contents($lock_file, json_encode($contents), LOCK_EX) === FALSE) {
throw new LockException('Unable to create ' . $this->lock . ' lock in ' . $method);
}
break;
case 'destroy':
if(file_exists($lock_file) && !@unlink($lock_file)) {
throw new LockException('Unable to destroy ' . $this->lock . ' lock in ' . $method);
}
break;
}
return TRUE;
}
// Magic wand here (binds ->check(), ->create() and ->destroy())
public function __call($name, $arguments)
{
if (in_array($name, ['check', 'create', 'destroy'])) {
return $this->process($name, $arguments);
}
}
private function process($action)
{
// Only accept things that look like a file name, not path or something else
$callee = debug_backtrace()[0];
$method = $callee['class'] . $callee['type'] . $callee['function'] . '()';
if (preg_replace('/[^\.\w\d-]/i', '', $this->lock) !== $this->lock) {
throw new LockException(sprintf('Invalid $lock argument \'%s\' passed in ' . $method, $this->lock));
}
$lock_folder = self::$path;
$lock_file = self::$path . $this->lock . '.lock';
clearstatcache(true, $lock_file);
switch ($action) {
case 'check':
if (!file_exists($lock_file)) {
return false;
}
$contents = file_get_contents($lock_file);
if (strpos($contents, 'expires') !== false) {
$contents = json_decode($contents);
}
if (isset($contents->expires)) {
$is_locked = $contents->expires > microtime(true);
if (!$is_locked) {
self::destroy();
}
return $is_locked;
}
break;
case 'create':
$contents = [
'id' => $this->id
];
$now = microtime(true);
if ($this->expiration) {
$contents['expires'] = $now + (int)$this->expiration;
}
if (!is_dir(self::$path) && !@mkdir(self::$path)) {
throw new LockException('Unable to create lock folder in ' . $method);
}
if (file_put_contents($lock_file, json_encode($contents), LOCK_EX) === false) {
throw new LockException('Unable to create ' . $this->lock . ' lock in ' . $method);
}
break;
case 'destroy':
if (file_exists($lock_file) && !@unlink($lock_file)) {
throw new LockException('Unable to destroy ' . $this->lock . ' lock in ' . $method);
}
break;
}
return true;
}
}
class LockException extends Exception
{
}
class LockException extends Exception {}

File diff suppressed because it is too large Load diff

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