Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add file/folder description (and other new features and bugfixes) #289

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ed73d7d
Revert "Fix first accented character of folders stripped out"
Anarky May 10, 2015
165f5de
Remove all dead code that was using basename
Anarky May 9, 2015
0421118
Fix all problematic basename calls in classes
Anarky May 10, 2015
a8dc332
Add title for buttons, with an option to deactivate it
Anarky May 9, 2015
04d91fe
Don't show the RSS button on the main page when it is deactived
Anarky May 9, 2015
9c483b8
Display a spinner when loading a Photo Sphere
Anarky May 10, 2015
90a0b93
Fix thumbnails size option not saved
Anarky May 10, 2015
5a7abf4
Fix visually two elements on the settings page
Anarky May 10, 2015
4325202
AdminUpload: remove dead code
Anarky May 10, 2015
3e26bcf
Make more elements translatable
Anarky May 10, 2015
1f9ee26
Javascript: disable hotkeys inside input and textarea tags
Anarky May 17, 2015
772a0fa
Fix zip name when downloading a directory with accents
Anarky May 19, 2015
e455e7e
Comments: remove dead code
Anarky May 19, 2015
e5e97e8
ImagePanel: remove dead code
Anarky May 19, 2015
c4ecb4d
Fix file comparison when renaming
Anarky May 19, 2015
961ad64
Menu::list_files(): fix the search with an option to list all the files
Anarky Jul 13, 2015
6f37485
Admin::rec_del(): use the new Menu::list_files() option to delete *ev…
Anarky Jul 13, 2015
4e6884b
Abort renaming if there is already a file with the same new name
Anarky May 21, 2015
e0a9b4d
File::Type(): fix the return parameter when using a folder
Anarky May 26, 2015
0c9b9fc
Rename/delete metadatas on file or folder renaming/deletion
Anarky May 26, 2015
e103acc
Add a missing string in the default language file
Anarky May 26, 2015
fb813e9
RSS: don't create or add elements to the file when it is deactived
Anarky May 26, 2015
dd9e2b5
Comments: don't show them when we don't have the right
Anarky Jul 12, 2015
099e4b7
CSS: display #image_panel elements as table-rows
Anarky Jul 12, 2015
7d613a4
New feature: add a description to a folder or a picture
Anarky Jul 12, 2015
0a1970d
Update French translation
Anarky Jul 13, 2015
525cd35
Fix comments and description saving when they contain an ampersand
Anarky Jul 30, 2015
63a407a
Videos: take all available space, like images
Anarky Jul 30, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion inc/js/photosphere/sphere.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function Photosphere(image){
}

Photosphere.prototype.loadPhotosphere = function(holder){
holder.innerHTML = "wait...";
holder.innerHTML = "<div id='loading_spin'><img src='inc/spiffygif.gif' alt='Loading...'></div>";

this.holder = holder;

Expand Down
50 changes: 48 additions & 2 deletions inc/loc/default.ini
Original file line number Diff line number Diff line change
@@ -1,31 +1,42 @@
[settings]
settings = "Settings"
global = "Global"
title = "Title"
site_address= "Site root URL"
buttons = "Buttons"
s_networks = "Social Networks"
fb = "Facebook"
facebook_appid = "Facebook Application ID"
fbappid = "AppID"
plusone = "Google +1"
register = "Register"
options = "Options"
noregister = "Block Registration"
forcehttps = "Force https for login and registration"
comment = "Comments"
nocomment = "Remove Comments Panel"
download = "Downloads"
nocomments = "Remove comments"
nodescription = "Remove descriptions"
nodownload = "Remove downloading links"
reverse_menu = "Reverse menu order"
rss = "RSS feed"
button_title = "Title for buttons"
numcomments = "Number of comments in Admin Stats"
numcomm = "Comments"
sens = "Max number of images displayed when hovering an album"
thumbs_size = "Thumbnails size (px)"
images = "Images"
language = "Language"
user_theme = "Theme"
submit = "Submit"
generate = "Generate recursively thumbs and web images"
folder = "Folder"
all = "All"
gener = "Generate"
video_comment = "PhotoShow only displays videos in WebM. You can set the encoding to convert to other formats than webm"
encode_video = "Encode Video Activate"
video = "Video"
video_comment = "PhotoShow only displays videos in WebM. You can set the encoding to convert to other formats than webm."
encode_video = "Encode Video"
ffmpeg_path = "FFmpeg path"
ffmpeg_option = "Encoding option"

Expand All @@ -40,6 +51,7 @@ oldpass = "Old Pass"
submit = "Save"
or = "or"
cancel = "Cancel"
key = "Key"

[delete]
delete = "Delete"
Expand All @@ -55,16 +67,25 @@ groups = "Edit Groups"
account = "Edit Accounts"
back = "Back to Website"

[statistics]
heading = "Statistics"
summary = "Summary"
by_age = "(by age)"
items = "Items"
gen_items = "Generated items"

[jsaccounts]
accounts = "Accounts"
groups = "Groups"
groupname_label = "Group name:"
groupname = "Name"
addgroup = "Create Group"

[login]
logintitle = "Login"
login = "Login"
pass = "Password"
submit = "Submit"
or = "or"
register = "Register"
back = "Back to Website"
Expand All @@ -84,28 +105,34 @@ back = "Back to Website"

[menubar]
logged = "logged as"
not_logged = "Not logged in!"
login = "LOGIN"
register = "REGISTER"
logout = "LOGOUT"
admin = "ADMIN"
account = "ACCOUNT"
powered = "Powered by"

[bin]
delete = "Delete"

[judge]
infos = "Infos"
access = "Access"
public = "This item is public."
gopriv = "Go Private"
priv = "This item is private."
gopub = "Go Public"
accounts = "Allowed accounts"
groups = "Allowed groups"
set = "Set Rights"
exif = "Exif"

[adminpanel]
rename = "Rename"
new = "New Folder"
create = "Create"
upload_heading = "Upload"
upload = "Upload images here"

[boardheader]
Expand All @@ -114,15 +141,34 @@ download = "DOWNLOAD"
[board]
albums = "Albums"
images = "Images"
videos = "Videos"

[comments]
comment = "Comment"
comments = "Comments"
anonymous = "Anonymous"
submit = "Post Comment"

[description]
description = "Description"
submit = "Post Description"

[token]
token = "Guest Token"
tokens = "Guest Tokens"
deletetoken = "Delete"
createtoken = "Create Guest Token"

[buttons]
prev = "Previous"
back = "Back"
img = "View"
get = "Download"
slideshow = "Start slideshow"
pshere = "Photo Sphere"
next = "Next"
pause = "Pause slideshow"
play = "Play slideshow"
stop = "Stop slideshow"
rss = "RSS feed"
menuright = "Menu"
71 changes: 64 additions & 7 deletions inc/loc/francais.ini
Original file line number Diff line number Diff line change
@@ -1,59 +1,83 @@
[settings]
settings = "Param&eagrave;tres"
settings = "Param&egrave;tres"
global = "G&eacute;n&eacute;ral"
title = "Titre"
site_address= "URL de la racine du site"
buttons = "Boutons"
s_networks = "R&eacute;seaux sociaux"
fb = "Facebook"
facebook_appid = "Facebook Application ID"
fbappid = "AppID"
plusone = "Google +1"
register = "Inscriptions"
options = "Options"
noregister = "Bloquer les inscriptions"
forcehttps = "Forcer HTTPS pour les inscriptions et identifications"
comment = "Comms"
nocomment = "Supprimer le panneau de commentaires"
download = "Archives"
nocomments = "Bloquer les commentaires"
nodescription = "Bloquer les descriptions"
nodownload = "Bloquer le t&eacute;l&eacute;chargement de fichiers"
reverse_menu = "Inverser l'ordre du menu"
rss = "Flux RSS"
button_title = "Titre pour les boutons"
numcomments = "Nombre de commentaires sur la page de stats"
numcomm = "Comms"
sens = "Nombre maximal d'images affich&eacute;es au survol d'album"
thumbs_size = "Taille des miniatures (px)"
images = "Images"
language = "Langue"
user_theme = "Th&egrave;me"
submit = "Valider"
generate = "G&eacute;n&eacute;rer les vignettes et images 800x600 (r&eacute;cursif)"
generate = "G&eacute;n&eacute;rer les vignettes et images (r&eacute;cursif)"
folder = "Dossier"
all = "Tout"
gener = "G&eacute;n&eacute;rer"
video_comment = "PhotoShow affiche uniquement les vid&eacute;os au format Webm. Tu peux activer l'encodage pour les autres formats"
video = "Vid&eacute;o"
video_comment = "PhotoShow affiche uniquement les vid&eacute;os au format WebM. Vous pouvez d&eacute;finir l'encodage pour les autres formats."
encode_video = "Encodage vid&eacute;o"
ffmpeg_path = "Chemin ffmpeg"
ffmpeg_option = "Options ffmpeg"

[account]
createaccount = "Cr&eacute;er un compte"
account = "Compte"
editing = "Edition du compte : "
editing = "&Eacute;dition du compte : "
name = "Nom"
email = "Courriel"
password = "Mot de passe"
oldpass = "Ancien mdp"
submit = "Sauver"
or = "ou"
cancel = "Annuler"
key = "Clef"

[delete]
delete = "Supprimer"
path = "Chemin"
submit = "Supprimer"

[adminmenu]
about = "&Agrave; propos..."
stats = "Afficher statistiques"
settings = "Pr&eacute;f&eacute;rences"
about = "&Agrave; propos"
stats = "Statistiques"
tokens = "Jetons d'authentification"
settings = "Param&egrave;tres"
account = "Comptes"
groups = "Groupes"
back = "Retour au site"

[statistics]
heading = "Statistiques"
summary = "R&eacute;sum&eacute;"
by_age = "(par &acirc;ge)"
items = "Objets"
gen_items = "Objets g&eacute;n&eacute;r&eacute;s"

[jsaccounts]
accounts = "Comptes"
groups = "Groupes"
groupname_label = "Nom du groupe :"
groupname = "Nom"
addgroup = "Cr&eacute;er le groupe"

Expand Down Expand Up @@ -81,28 +105,34 @@ back = "Retourner au site"

[menubar]
logged = "connect&eacute; en tant que"
not_logged = "Non connect&eacute;(e)"
login = "CONNEXION"
register = "INSCRIPTION"
logout = "D&Eacute;CONNEXION"
admin = "PR&Eacute;F&Eacute;RENCES"
account = "COMPTE"
powered = "Ce site utilise"

[bin]
delete = "Supprimer"

[judge]
infos = "Infos"
access = "Acc&egrave;s"
public = "Cet &eacute;l&eacute;ment est public."
gopriv = "Passer priv&eacute;"
priv = "Cet &eacute;l&eacute;ment est priv&eacute;."
gopub = "Passer public"
accounts = "Comptes autoris&eacute;s"
groups = "Groupes autoris&eacute;s"
set = "Valider"
exif = "Exif"

[adminpanel]
rename = "Renommer"
new = "Nouveau dossier"
create = "Cr&eacute;er"
upload_heading = "Ajout"
upload = "Ajouter des images"

[boardheader]
Expand All @@ -111,7 +141,34 @@ download = "T&Eacute;L&Eacute;CHARGER"
[board]
albums = "Albums"
images = "Images"
videos = "Vid&eacute;os"

[comments]
comment = "Commentaire"
comments = "Commentaires"
anonymous = "Anonyme"
submit = "Commenter"

[description]
description = "Description"
submit = "Enregistrer"

[token]
token = "Jeton invité"
tokens = "Jetons d'authentification"
deletetoken = "Supprimer"
createtoken = "Cr&eacute;er un jeton"

[buttons]
prev = "Pr&eacute;c&eacute;dent"
back = "Retour"
img = "Afficher"
get = "T&eacute;l&eacute;charger"
slideshow = "D&eacute;marrer le diaporama"
pshere = "Photo Sphere"
next = "Suivant"
pause = "Mettre en pause le diaporama"
play = "Reprendre le diaporama"
stop = "Quitter le diaporama"
rss = "Flux RSS"
menuright = "Menu"
Binary file added inc/spiffygif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ function protect_user_send_var($var){
return addslashes($var);
}

/// workaround for splitting basename whith beginning utf8 multibyte char
/// See https://bugs.php.net/bug.php?id=37268
function mb_basename($filepath, $suffix = NULL) {
$splited = preg_split ( '/\//', rtrim ( $filepath, '/ ' ) );
return substr ( basename ( 'X' . $splited [count ( $splited ) - 1], $suffix ), 1 );
}


if (!get_magic_quotes_gpc()){
$_POST = protect_user_send_var($_POST);
Expand Down
6 changes: 3 additions & 3 deletions src/classes/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ public function toHTML(){
$this->header();

echo "<div class='header'>";
echo "<h1>Account</h1>";
echo "<h1>".Settings::_("jsaccounts","accounts")."</h1>";
echo "</div>";

if(CurrentUser::$admin){
Expand Down Expand Up @@ -509,9 +509,9 @@ public function toHTML(){
}
echo "</select>\n";

/// Login
/// Key
echo "<div class='pure-control-group'>
<label>".Settings::_("account","Key")."</label>
<label>".Settings::_("account","key")."</label>
<input type='text' name='key' readonly='readonly' value=\"".htmlentities($this->get_key(), ENT_QUOTES ,'UTF-8')."\">
</div>";

Expand Down
Loading