diff --git a/functions.php b/functions.php
index f928e93..5e94556 100644
--- a/functions.php
+++ b/functions.php
@@ -234,4 +234,38 @@ function host() {
return $host;
}
+
+class AdvancedFilesystemIterator extends ArrayIterator
+ {
+ public function __construct(string $path, int $flags = FilesystemIterator::KEY_AS_PATHNAME | FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::SKIP_DOTS)
+ {
+ parent::__construct(iterator_to_array(new FilesystemIterator($path, $flags)));
+ }
+
+ public function __call(string $name, array $arguments)
+ {
+ if (preg_match('/^sortBy(.*)/', $name, $m)) return $this->sort('get' . $m[1]);
+ throw new MemberAccessException('Method ' . $methodName . ' not exists');
+ }
+
+ public function sort($method)
+ {
+ if (!method_exists('SplFileInfo', $method)) throw new InvalidArgumentException(sprintf('Method "%s" does not exist in SplFileInfo', $method));
+
+ $this->uasort(function(SplFileInfo $a, SplFileInfo $b) use ($method) { return (is_string($a->$method()) ? strnatcmp($a->$method(), $b->$method()) : $b->$method() - $a->$method()); });
+
+ return $this;
+ }
+
+ public function limit(int $offset = 0, int $limit = -1)
+ {
+ return parent::__construct(iterator_to_array(new LimitIterator($this, $offset, $limit))) ?? $this;
+ }
+
+ public function match(string $regex, int $mode = RegexIterator::MATCH, int $flags = 0, int $preg_flags = 0)
+ {
+ return parent::__construct(iterator_to_array(new RegexIterator($this, $regex, $mode, $flags, $preg_flags))) ?? $this;
+ }
+ }
+
?>
\ No newline at end of file
diff --git a/index.php b/index.php
index 26453de..61647a6 100644
--- a/index.php
+++ b/index.php
@@ -40,19 +40,24 @@ $host = $pv_URIprotocol . $_SERVER['HTTP_HOST'];
$wp = (($_SERVER['SERVER_NAME'] == "sur-le-sentier.fr") ? "blog" : "wordpress");
-$root = dirname($_SERVER['SCRIPT_FILENAME']);
+//if ($_SERVER['SERVER_NAME'] == 'airbook.local')
+$root = $_SERVER['DOCUMENT_ROOT'];
+//$root = dirname($_SERVER['SCRIPT_FILENAME']); // /Users/bruno/Sites/sls
include($root.'/lib2/localize.php');
-$dir_locales = $root . '/locales';
+$dir_locales = $root . '/Locale';
$liste_locale = list_dir($dir_locales);
if ((!isset($_POST['lang'])) and (!isset($_GET['lang']))) $langue = locale_language_from_browser($myLanguages);
else $langue = $_REQUEST['lang'];
+
$domain = 'sentier';
putenv('LC_ALL=' . $langue);
$loc = setlocale(LC_ALL, $langue);
-bindtextdomain($domain, $root . '/locales/');
+
+bindtextdomain($domain, $root . '/Locale/');
bind_textdomain_codeset($domain, 'UTF-8');
textdomain($domain);
+
$nation = array('fr_FR' => gettext('French'), 'en_US' => gettext('English') , 'de_DE' => gettext('German'), 'es_ES' => gettext('Spanish') );
?>
@@ -139,7 +144,7 @@ foreach($fileList as $filename){
-
+
diff --git a/insert_bdd.php b/insert_bdd.php
index b45fc90..69c7191 100644
--- a/insert_bdd.php
+++ b/insert_bdd.php
@@ -12,7 +12,29 @@
-
+ gettext('French'), 'en_US' => gettext('English') , 'de_DE' => gettext('German'), 'es_ES' => gettext('Spanish') );
+
+ include 'functions.php';
+ ?>
@@ -20,16 +42,18 @@
match('/heic|HEIC|jpg|jpeg|JPG|JPEG|webp|WEBP$/');
-echo 'Creation de la base ' . $base . ' et de la table photo (si nécessaire)...
';
+echo '' . count($dir) . gettext(' images found in folder') . ' photos/img/ ...
';
+
+echo '' . gettext("Creation of the database") . ' ' . $base . ' ' . gettext("and the table") . ' photo (' . gettext("if necessary") . ')...
';
// Création de la base et de la table photos
$conn = new PDO("sqlite:db_photo.sqlite3");
@@ -39,7 +63,7 @@ $query = "CREATE TABLE IF NOT EXISTS photos (
filename TEXT NOT NULL,
date TEXT,
lens TEXT,
- exposure INTEGER,
+ speed TEXT,
iso INTEGER,
width INTEGER,
height INTEGER,
@@ -51,40 +75,224 @@ $query = "CREATE TABLE IF NOT EXISTS photos (
alt REAL,
legende TEXT,
copyright TEXT,
- titre TEXT,
- createur TEXTr,
+ title TEXT,
+ creator TEXTr,
keywords TEXT,
+ metering TEXT,
+ flash TEXT,
+ focal TEXT,
+ wb TEXT,
+ program TEXT,
UNIQUE(filename)
)";
$conn->exec($query);
-echo 'Lecture des fichiers images dans le dossier photos/img/...
';
+echo '' . gettext('Read image files in the folder') . ' photos/img/...
';
$i = 1;
+$photos = array();
-// Ajout de données dans la table
-foreach($fileList as $file){
-
+foreach($dir as $file){
+ /*
+ $file->getFilename()
+ pathName()
+ */
+ $file = $file->getpathName();
+
$x = in_bdd($file);
if ($x == false) { //false
if ($exif = @exif_read_data($file, 0, true )) {
-
+ //_pr($exif);
+ //if (($file == 'photos/img/12_2007.jpg') || ($file == 'photos/img/11_2007.jpg') || ($file == 'photos/img/10_2020.jpg')) {
+ if (($file == 'photos/img/4_2008.jpg') || ($file == 'photos/img/10_2020.jpg')) {
+ _pr($exif);
+ }
+ $mod = isset($exif['IFD0']['Model']) ? $exif['IFD0']['Model'] : '';
+
//_pr($exif);
# YYYY-MM-DD HH:MM:SS.SSS - 2019:10:01 14:03:12
$da = isset($exif['EXIF']['DateTimeOriginal']) ? $exif['EXIF']['DateTimeOriginal'] : '';
- $obj = isset($exif['EXIF']['UndefinedTag:0xA434']) ? $exif['EXIF']['UndefinedTag:0xA434'] : '';
- $ex = isset($exif['EXIF']['ExposureTime']) ? $exif['EXIF']['ExposureTime'] : '';
+
+ if (isset($exif['EXIF']['UndefinedTag:0xA434'])) {
+ $w = $exif['EXIF']['UndefinedTag:0xA434'];
+
+ $arr = array("100.0 mm" => "EF100mm f/2.8 Macro USM", "100.0-400.0 mm" => "EF100-400mm f/4.5-5.6L IS USM", "140.0-560.0 mm" => "EF100-400mm f/4.5-5.6L IS USM +1.4x II", "17.0-40.0 mm" => "EF17-40mm f/4L USM", "24-70mm" => "SIGMA 24-70mm F2.8 EX DG", "70.0-200.0 mm" => "EF70-200mm f/4L USM", "10.0-22.0 mm" => "EF-S10-22mm f/3.5-4.5 USM", "500.0 mm" => "Sigma 500mm f/4.5 EX HSM ", "500mm" => "Sigma 500mm f/4.5 EX HSM ");
+
+ if (array_key_exists($w, $arr)) $obj= $arr[$w];
+ else $obj = $w;
+
+ } else {
+ $obj = '';
+ }
+
+ if (isset($exif['EXIF']['ExposureTime'])) {
+ $q = explode('/', $exif['EXIF']['ExposureTime']);
+ $sp = ($q[0] > 1) ? ($q[0] / $q[1]) . "s" : $exif['EXIF']['ExposureTime'];
+ } else {
+ $sp = '';
+ }
+
$iso = isset($exif['EXIF']['ISOSpeedRatings']) ? $exif['EXIF']['ISOSpeedRatings'] : '';
+ if (isset($exif['EXIF']['MeteringMode'])) {
+ $mm = $exif['EXIF']['MeteringMode'];
+
+ switch ($mm) {
+ case 1: $mm = gettext("Average");
+ break;
+ case 2: $mm = gettext("Center-weighted average"); // Moy. à pred. centrale
+ break;
+ case 3: $mm = gettext("Spot");
+ break;
+ case 4: $mm = gettext("Multi-Spot");
+ break;
+ case 5: $mm = gettext("Pattern"); // Mesure évaluative
+ break;
+ case 6: $mm = gettext("Partial"); // Mesure sélective
+ break;
+ default: $mm = gettext("Unknown") . ': ' . $mm;
+ // Evaluative Mesure évaluative
+ // Centre-weighted Average Moy. à pred. centrale
+ // Partial Mesure sélective
+ // Spot Spot
+
+ // Pattern =Mesure évaluative (30D)
+ // Average Mesure évaluative
+ }
+
+ } else {
+ $mm = '';
+ }
+
+ if (isset($exif['EXIF']['Flash'])) {
+ $fla = $exif['EXIF']['Flash'];
+
+ switch ($fla) {
+ case 0: $fla = gettext("Off");
+ break;
+ case 1: $fla = gettext("Auto");
+ break;
+ case 2: $fla = gettext("On");
+ break;
+ case 3: $fla = gettext("Red Eye Reduction");
+ break;
+ case 4: $fla = gettext("Slow Synchro");
+ break;
+ case 5: $fla = gettext("Auto + Red Eye Reduction");
+ break;
+ case 6: $fla = gettext("On + Red Eye Reduction");
+ break;
+ case 16: $fla = gettext("External Flash");
+ break;
+ default: $fla = gettext("Unknown");
+ }
+
+ } else {
+ $fla = '';
+ }
+
+ if (isset($exif['EXIF']['FocalLength'])) {
+ $k = explode('/', $exif['EXIF']['FocalLength']);
+ $fl = $k[0] . " mm";
+ } else {
+ $fl = '';
+ }
+
+ /*
+ if (isset($exif['EXIF']['ExposureMode'])) {
+ $em = $exif['EXIF']['ExposureMode'];
+ echo $em;
+ $em = hexdec(intel2Moto($exif['EXIF']['ExposureMode']));
+ echo $em;
+
+ switch ($em) {
+ case 0: $em = gettext("EasyShoot");
+ break;
+ case 1: $em = gettext("Program");
+ break;
+ case 2: $em = gettext("Tv");
+ break;
+ case 3: $em = gettext("Av");
+ break;
+ case 4: $em = gettext("Manual");
+ break;
+ case 5: $em = gettext("Auto-DEP");
+ break;
+ default: $em = gettext("Unknown");
+ }
+
+ } else {
+ $em = '';
+ }
+ */
+
+ if (isset($exif['EXIF']['WhiteBalance'])) {
+ $wb = $exif['EXIF']['WhiteBalance'];
+
+ switch ($wb) {
+ case 0: $wb = gettext("Auto");
+ break;
+ case 1: $wb = gettext("Daylight");
+ break;
+ case 2: $wb = gettext("Cloudy");
+ break;
+ case 3: $wb = gettext("Tungsten");
+ break;
+ case 4: $wb = gettext("Fluorescent");
+ break;
+ case 5: $wb = gettext("Flash");
+ break;
+ case 6: $wb = gettext("Custom");
+ break;
+ case 7: $wb = gettext("Black & White");
+ break;
+ case 8: $wb = gettext("Shade");
+ break;
+ case 9: $wb = gettext("Manual Temperature (Kelvin)");
+ break;
+ default: $wb = gettext("Unknown");
+ }
+
+ } else {
+ $wb = '';
+ }
+ if (isset($exif['EXIF']['ExposureProgram'])) {
+ $ep = $exif['EXIF']['ExposureProgram'];
+
+ switch ($ep) {
+ case 1: $ep = gettext('Manual');
+ break;
+ case 2: $ep = gettext('Program');
+ break;
+ case 3: $ep = gettext('Aperture Priority');
+ break;
+ case 4: $ep = gettext('Shutter Priority');
+ break;
+ case 5: $ep = gettext('Program Creative');
+ break;
+ case 6: $ep = gettext('Program Action');
+ break;
+ case 7: $ep = gettext('Portrait');
+ break;
+ case 8: $ep = gettext('Landscape');
+ break;
+ default: $ep = gettext('Unknown') . ': ' . $data;
+ break;
+ }
+
+ } else {
+ $ep = '';
+ }
+
+ ///echo "File: " . basename($file) . " - Objectif: " . $obj . " - Model: " . $mod . " - Metering: " . $mm . " - Flash: " . $fla. " - Focal: " . $fl. " - Exposure: " . " - Balance: " . $wb. " - Program: " . $ep . "
";
+
$wi = isset($exif['COMPUTED']['Width']) ? $exif['COMPUTED']['Width'] : '';
$he = isset($exif['COMPUTED']['Height']) ? $exif['COMPUTED']['Height'] : '';
$ht = isset($exif['COMPUTED']['html']) ? $exif['COMPUTED']['html'] : '';
$ap = isset($exif['COMPUTED']['ApertureFNumber']) ? $exif['COMPUTED']['ApertureFNumber'] : '';
- $mod = isset($exif['IFD0']['Model']) ? $exif['IFD0']['Model'] : '';
-
$gps = get_gps($exif);
$photos[$i] = array(
@@ -92,7 +300,7 @@ foreach($fileList as $file){
'date' => $da,
'lens' => $obj,
- 'exposure' => $ex,
+ 'speed' => $sp,
'iso' => $iso,
'width' => $wi,
@@ -104,19 +312,29 @@ foreach($fileList as $file){
'lat' => $gps['latitude'],
'long' => $gps['longitude'],
- 'alt' => $gps['altitude']
+ 'alt' => $gps['altitude'],
+ 'metering' => $mm,
+ 'flash' => $fla,
+ 'focal' => $fl,
+ 'wb' => $wb,
+ 'program' => $ep
+
);
}
- if ($iptc = getimagesize($file, $info)) {
+ //$qq = getimagesize($file, $info);
+ //_pr($qq);
+
+ if ($iptc = @getimagesize($file, $info)) {
+ //_pr($iptc);
if (isset($info["APP13"])) {
$mots = "";
$iptc = iptcparse ($info["APP13"]);
$legende = (isset($iptc["2#120"][0])) ? $iptc["2#120"][0] : '';
$copyright = (isset($iptc["2#116"][0])) ? $iptc["2#116"][0] : '';
- $titre = (isset($iptc["2#105"][0])) ? $iptc["2#105"][0] : '';
- $createur = (isset($iptc["2#080"][0])) ? $iptc["2#080"][0] : '';
+ $title = (isset($iptc["2#105"][0])) ? $iptc["2#105"][0] : '';
+ $creator = (isset($iptc["2#080"][0])) ? $iptc["2#080"][0] : '';
$mots_cles = (isset($iptc["2#025"])) ? $iptc["2#025"] : '';
if (!empty($mots_cles)) {
foreach ($mots_cles as $key => $val) {
@@ -127,54 +345,54 @@ foreach($fileList as $file){
$photos[$i]['legende'] = $legende;
$photos[$i]['copyright'] = $copyright;
- $photos[$i]['titre'] = $titre;
- $photos[$i]['createur'] = $createur;
+ $photos[$i]['title'] = $title;
+ $photos[$i]['creator'] = $creator;
$photos[$i]['mots_cles'] = $mots;
}
+ else {
+ $photos[$i]['legende'] = '';
+ $photos[$i]['copyright'] = '';
+ $photos[$i]['title'] = '';
+ $photos[$i]['creator'] = '';
+ $photos[$i]['mots_cles'] = '';
+ }
}
}
$i++;
}
+//_pr($photos);
+$z = count($photos);
+if ($z == 0) {
+ echo '' . gettext('No new image files to add') . '...
';
+ die();
+ }
+
$query5 = "SELECT MAX(id) FROM photos";
-//$conn->$stmt->execute($query5);
$stmt = $conn->prepare($query5);
$stmt->execute();
-//$resultat = $stmt->fetchAll(PDO::FETCH_ASSOC);
-/*
-Array
- (
- [0] => Array
- (
- [MAX(id)] => 5
- )
-
- )
-*/
$resultat = $stmt->fetch(PDO::FETCH_ASSOC);
-/*
-Array
- (
- [MAX(id)] => 5
- )
-*/
-//_pr($resultat);
-$nb_avant = $resultat['MAX(id)'];
+$avant = $resultat['MAX(id)'];
+
+$nb_avant = (isset($avant)) ? $avant : 0;
-echo 'Création des vignettes dans le dossier photos/thumb/ et insertion dans la base...
';
+echo '' . gettext('Creation of thumbnails') . ' ('. $th_w . 'px x ' . $th_h . 'px) ' . gettext('in the folder') . ' photos/thumb/.
';
+//$b = ($z > 1) ? 'nouvelles images' : 'nouvelle image';
+$b = ($z > 1) ? gettext('new images') : gettext('new image');
+echo '' . gettext('Insertion of ') . $z . ' ' . $b . gettext(' in database') . '...
';
// Insertion des photos dans la base
// Création des vignettes
try {
- $query2 = "INSERT OR IGNORE INTO photos (filename, date, lens, exposure, iso, width, height, html, aperture, model, lat, long, alt, legende, copyright, titre, createur, keywords) VALUES (:filename, :date, :lens, :exposure, :iso, :width, :height, :html, :aperture, :model, :lat, :long, :alt, :legende, :copyright, :titre, :createur, :keywords)";
+ $query2 = "INSERT OR IGNORE INTO photos (filename, date, lens, speed, iso, width, height, html, aperture, model, lat, long, alt, legende, copyright, title, creator, keywords, metering, flash, focal, wb, program) VALUES (:filename, :date, :lens, :speed, :iso, :width, :height, :html, :aperture, :model, :lat, :long, :alt, :legende, :copyright, :title, :creator, :keywords, :metering, :flash, :focal, :wb, :program)";
$stmt = $conn->prepare($query2);
$stmt->bindParam(':filename', $file);
$stmt->bindParam(':date', $da);
$stmt->bindParam(':lens', $obj);
- $stmt->bindParam(':exposure', $ex);
+ $stmt->bindParam(':speed', $sp);
$stmt->bindParam(':iso', $iso);
$stmt->bindParam(':width', $wi);
$stmt->bindParam(':height', $he);
@@ -187,16 +405,25 @@ try {
$stmt->bindParam(':legende', $leg);
$stmt->bindParam(':copyright', $cop);
- $stmt->bindParam(':titre', $tit);
- $stmt->bindParam(':createur', $crea);
+ $stmt->bindParam(':title', $tit);
+ $stmt->bindParam(':creator', $crea);
$stmt->bindParam(':keywords', $mot);
+ $stmt->bindParam(':metering', $mm);
+ $stmt->bindParam(':flash', $fla);
+ $stmt->bindParam(':focal', $fl);
+ $stmt->bindParam(':wb', $wb);
+ $stmt->bindParam(':program', $ep);
+
+ //echo count($photos);
+ //_pr($photos);
+
if (isset($photos)) {
foreach ($photos as $item) {
$file = $item['filename'];
$da = $item['date'];
$obj = $item['lens'];
- $ex = $item['exposure'];
+ $sp = $item['speed'];
$iso = $item['iso'];
$wi = $item['width'];
$he = $item['height'];
@@ -209,10 +436,16 @@ try {
$leg = $item['legende'];
$cop = $item['copyright'];
- $tit = $item['titre'];
- $crea = $item['createur'];
+ $tit = $item['title'];
+ $crea = $item['creator'];
$mot = $item['mots_cles'];
-
+
+ $mm = $item['metering'];
+ $fla = $item['flash'];
+ $fl = $item['focal'];
+ $wb = $item['wb'];
+ $ep = $item['program'];
+
create_thumb($th_w, $th_h, $file);
$stmt->execute();
@@ -225,10 +458,10 @@ try {
/* Affichage depuis la bdd des dernières images ajoutées */
-/* */
+
try {
- $query4 = "SELECT filename, date, lens, exposure, iso, width, height, html, aperture, model, lat, long, alt, legende, copyright, titre, createur, keywords FROM photos WHERE id > ? ORDER BY date DESC";
- //$query4 = "SELECT filename, date, lens, exposure, iso, width, height, html, aperture, model, lat, long, alt, legende, copyright, titre, createur, keywords FROM photos WHERE lat != '' OR long != '' ORDER BY date DESC";
+ $query4 = "SELECT filename, date, lens, speed, iso, width, height, html, aperture, model, lat, long, alt, legende, copyright, title, creator, keywords, metering, flash, focal, wb, program FROM photos WHERE id > ? ORDER BY date DESC";
+ //$query4 = "SELECT filename, date, lens, speed, iso, width, height, html, aperture, model, lat, long, alt, legende, copyright, title, creator, keywords FROM photos WHERE lat != '' OR long != '' ORDER BY date DESC";
$stmt = $conn->prepare($query4);
$stmt->bindValue(1, $nb_avant, SQLITE3_INTEGER); // (1,3...) 1=1ere valeur 3=valeur
@@ -243,14 +476,16 @@ try {
echo '';
echo '
';
echo '';
- echo '| Thumb | Filename | Date | Lens | Exposure | Iso | Width | Height | Html | Aperture | Model | Lat | Long | Alt | Legende | Copyright | Titre | Createur | Keywords | ';
+ echo '' . gettext('Thumb') . ' | ' . gettext('Filename') . ' | ' . gettext('Date') . ' | ' . gettext('Lens') . ' | ' . gettext('Speed') . ' | ' . gettext('Iso') . ' | ' . gettext('Width') . ' | ' . gettext('Height') . ' | ' . gettext('Html') . ' | ';
+ echo '' . gettext('Aperture') . ' | ' . gettext('Model') . ' | ' . gettext('Latitude') . ' | ' . gettext('Longitude') . ' | ' . gettext('Alttitude') . ' | ' . gettext('Legende') . ' | ' . gettext('Copyright') . ' | ' . gettext('Title') . ' | ';
+ echo '' . gettext('Creator') . ' | ' . gettext('Keywords') . ' | ' . gettext('Metering') . ' | ' . gettext('Flash') . ' | ' . gettext('Focal') . ' | ' . gettext('Wb') . ' | ' . gettext('Program') . ' | ';
echo '';
echo '';
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
$thumbnail = host() . str_replace("photos/img", "photos/thumb", $row['filename']);
$full = host() . $row['filename'];
- //echo ' | ' . $row['filename'] . ' | ' . $row['date'] . ' | ' . $row['lens'] . ' | ' . $row['exposure'] . ' | ' . $row['iso'] . ' | ' . $row['width'] . ' | ' . $row['height'] . ' | ' . $row['html'] . ' | ' . $row['aperture'] . ' | ' . $row['model'] . ' | ' . $row['lat'] . ' | ' . $row['long'] . ' | ' . $row['alt'] . ' | ' . $row['legende'] . ' | ' . $row['copyright'] . ' | ' . $row['titre'] . ' | ' . $row['createur'] . " |\r\n";
- echo '' . ' ' . ' | ' . $row['filename'] . ' | ' . $row['date'] . ' | ' . $row['lens'] . ' | ' . $row['exposure'] . ' | ' . $row['iso'] . ' | ' . $row['width'] . ' | ' . $row['height'] . ' | ' . $row['html'] . ' | ' . $row['aperture'] . ' | ' . $row['model'] . ' | ' . $row['lat'] . ' | ' . $row['long'] . ' | ' . $row['alt'] . ' | ' . $row['legende'] . ' | ' . $row['copyright'] . ' | ' . $row['titre'] . ' | ' . $row['createur'] . ' | ' . $row['keywords'] . ' |
';
+
+ echo '' . ' ' . ' | ' . $row['filename'] . ' | ' . $row['date'] . ' | ' . $row['lens'] . ' | ' . $row['speed'] . ' | ' . $row['iso'] . ' | ' . $row['width'] . ' | ' . $row['height'] . ' | ' . $row['html'] . ' | ' . $row['aperture'] . ' | ' . $row['model'] . ' | ' . $row['lat'] . ' | ' . $row['long'] . ' | ' . $row['alt'] . ' | ' . $row['legende'] . ' | ' . $row['copyright'] . ' | ' . $row['title'] . ' | ' . $row['creator'] . ' | ' . $row['keywords'] . ' | ' . $row['metering'] . ' | ' . $row['flash'] . ' | ' . $row['focal'] . ' | ' . $row['wb'] . ' | ' . $row['program'] . ' |
';
}
echo '
';
echo '
';
@@ -280,7 +515,8 @@ try {
});
-
+
+
diff --git a/lib2/localize.php b/lib2/localize.php
deleted file mode 100644
index af84e01..0000000
--- a/lib2/localize.php
+++ /dev/null
@@ -1,119 +0,0 @@
- $valeur) {
- if ($string == $cle) {
- $a = $valeur;
- break;
- }
- }
- return $a;
- }
-
-function locale_language_from_browser($languages) {
- // Specified by the user via the browser's Accept Language setting
- // Samples: "hu, en-us;q=0.66, en;q=0.33", "hu,en-us;q=0.5"
- $browser_langs = array();
-
- if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
- $browser_accept = explode(",", $_SERVER['HTTP_ACCEPT_LANGUAGE']);
- foreach ($browser_accept as $langpart) {
- // The language part is either a code or a code with a quality.
- // We cannot do anything with a * code, so it is skipped.
- // If the quality is missing, it is assumed to be 1 according to the RFC.
- if (preg_match("!([a-z-]+)(;q=([0-9\\.]+))?!", trim($langpart), $found)) {
- $browser_langs[$found[1]] = (isset($found[3]) ? (float) $found[3] : 1.0);
- }
- }
- }
-
- // Order the codes by quality
- arsort($browser_langs);
- //Array ( [en-us] => 1 [en] => 0.7 [fr] => 0.3 ) Firefox Fr
- //Array ( [fr-] => 1 [en-] => 1 [fr] => 0.8 [en] => 0.4 ) Chrome 5 Fr
- //Array ( [fr-fr] => 1 ) Safari Fr
- //Array ( [fr-fr] => 1 ) iCab Fr
- //Array ( [zh-] => 1 [fr] => 1 [pt-] => 1 [en-] => 1 [en] => 0.9 [ja] => 0.7 [de] => 0.6 [es] => 0.5 [it] => 0.4 [pt] => 0.3 [pl] => 0.1 [ru] => 0.1 [ko] => 0.1 [sv] => 0.1 [nl] => 0.1 [nb] => 0.1 [da] => 0.1 [fi] => 0.1 ) Opera 10.6
-
- // Try to find the first preferred language we have
- foreach ($browser_langs as $langcode => $q) {
- foreach ($languages as $value) {
- /*
- $string = strtolower(str_replace('_','-',$value));
- echo $langcode . '-' . $q . '-' . $value . '
';
- if ($string == $langcode) {
- echo $value;
- return $value;
- break;
- }
- */
- //echo $langcode . '-' . $q . '-' . $value . '
';
- if (substr($langcode, 0, 2) == substr($value, 0, 2)) {
- $lang = $value;
- break 2;
- }
- }
- }
-
- if (!isset($lang)) $lang = 'fr_FR';
- return $lang;
-}
-
-// Affiche sur popup (POST=-1) ou une liste de liens (GET=-1) pour choisir la langue
-//echo choose_lang($liste_locale, $get=0, $post=-1);
-function choose_lang($select_language,$liste, $get, $post) {
- global $nation;
- if ($get == true) {
- $i = 1;
- foreach ($liste as $value) {
- //echo "" . recherche($nation,$value) . "";
- $links .= "
";
- if ($i < count($liste)) $links .= ' | ';
- $i++;
- }
- }
- elseif ($post == true) {
- $links = "\n";
- }
- return $links;
- }
-
-
-?>
diff --git a/locales/de_DE/LC_MESSAGES/.DS_Store b/locales/de_DE/LC_MESSAGES/.DS_Store
deleted file mode 100644
index 5008ddf..0000000
Binary files a/locales/de_DE/LC_MESSAGES/.DS_Store and /dev/null differ
diff --git a/locales/de_DE/LC_MESSAGES/sentier.mo b/locales/de_DE/LC_MESSAGES/sentier.mo
deleted file mode 100644
index 4ba33db..0000000
Binary files a/locales/de_DE/LC_MESSAGES/sentier.mo and /dev/null differ
diff --git a/locales/de_DE/LC_MESSAGES/sentier.po b/locales/de_DE/LC_MESSAGES/sentier.po
deleted file mode 100644
index 129e81a..0000000
--- a/locales/de_DE/LC_MESSAGES/sentier.po
+++ /dev/null
@@ -1,193 +0,0 @@
-msgid ""
-msgstr ""
-"Project-Id-Version: sur-le-sentier.fr\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-03-05 17:43+0100\n"
-"PO-Revision-Date: 2022-03-06 07:35+0100\n"
-"Last-Translator: Bruno \n"
-"Language-Team: German \n"
-"Language: de_DE\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"
-"X-Poedit-KeywordsList: _;gettext;gettext_noop\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Poedit-Basepath: ../../..\n"
-"X-Generator: Poedit 3.0.1\n"
-"X-Poedit-SearchPath-0: index.php\n"
-
-#: index.php:48
-msgid "French"
-msgstr "Französisch"
-
-#: index.php:48
-msgid "English"
-msgstr "Englisch"
-
-#: index.php:48
-msgid "German"
-msgstr "Deutsche"
-
-#: index.php:48
-msgid "Spanish"
-msgstr "Spanisch"
-
-#: index.php:128
-msgid "Blog"
-msgstr "Blog"
-
-#: index.php:128
-msgid "Go to the blog..."
-msgstr "Zum Blog..."
-
-#: index.php:130
-msgid "Gallery"
-msgstr "Galeries"
-
-#: index.php:130
-msgid "Visit the gallery..."
-msgstr "Besuchen Sie die Galerie..."
-
-#: index.php:132
-msgid "Piwigo"
-msgstr "Piwigo"
-
-#: index.php:132
-msgid "Visit the Piwigo gallery..."
-msgstr "Besuchen Sie die Piwigo-Galerie..."
-
-#: index.php:134
-msgid "This month"
-msgstr "Diesen Monat"
-
-#: index.php:134
-msgid "Latest images..."
-msgstr "Neueste Bilder..."
-
-#: index.php:141
-msgid "Powered by"
-msgstr "Bereitgestellt von"
-
-#~ msgid "Enter"
-#~ msgstr "Eintragen"
-
-#~ msgid "Tags clouds:"
-#~ msgstr "Schlagwortwolke:"
-
-#~ msgid "Site news:"
-#~ msgstr "Website Neues:"
-
-#~ msgid "Select language"
-#~ msgstr "Auswahl Sprachen"
-
-#~ msgid "Photo of the month..."
-#~ msgstr "Foto Monat..."
-
-#~ msgid "January"
-#~ msgstr "Januar"
-
-#~ msgid "February"
-#~ msgstr "Februar"
-
-#~ msgid "March"
-#~ msgstr "März"
-
-#~ msgid "April"
-#~ msgstr "April"
-
-#~ msgid "May"
-#~ msgstr "Mai"
-
-#~ msgid "June"
-#~ msgstr "Juni"
-
-#~ msgid "July"
-#~ msgstr "Juli"
-
-#~ msgid "August"
-#~ msgstr "August"
-
-#~ msgid "September"
-#~ msgstr "September"
-
-#~ msgid "October"
-#~ msgstr "Oktober"
-
-#~ msgid "November"
-#~ msgstr "November"
-
-#~ msgid "December"
-#~ msgstr "Dezember"
-
-#~ msgid "Now"
-#~ msgstr "Jetzt"
-
-#~ msgid "The "
-#~ msgstr "Der "
-
-#~ msgid "F j, Y, g:i a"
-#~ msgstr "d. F Y H:i"
-
-#~ msgid " at "
-#~ msgstr " auf "
-
-#~ msgid "Focal "
-#~ msgstr "Brennweite "
-
-#~ msgid "Archives"
-#~ msgstr "Archives"
-
-#~ msgid "Previous Page"
-#~ msgstr "Vorheriges Seite"
-
-#~ msgid "prev"
-#~ msgstr "zurück"
-
-#~ msgid "Page"
-#~ msgstr "Seite"
-
-#~ msgid "Next Page"
-#~ msgstr "Nächstes Seite"
-
-#~ msgid "next"
-#~ msgstr "weiter"
-
-#~ msgid "Photo's licence"
-#~ msgstr "Foto Lizenz"
-
-#~ msgid "Links"
-#~ msgstr "Links"
-
-#~ msgid "Photographers"
-#~ msgstr "Fotografs"
-
-#~ msgid "Festivals, competitions..."
-#~ msgstr "Fotofestival, Wettbewerb..."
-
-#~ msgid "Forums"
-#~ msgstr "Forums"
-
-#~ msgid "Photo news"
-#~ msgstr "Foto Neues"
-
-#~ msgid "Equipment"
-#~ msgstr "Ausrüstung"
-
-#~ msgid "Home"
-#~ msgstr "Empfang"
-
-#~ msgid "Guestbook"
-#~ msgstr "Gästebuch"
-
-#~ msgid "Contact"
-#~ msgstr "Kontakt"
-
-#~ msgid "Linkse"
-#~ msgstr "Liense"
-
-#~ msgid "d.m.Y à H:i"
-#~ msgstr "F j, Y, g:i a"
-
-#~ msgid " à "
-#~ msgstr " at "
diff --git a/locales/en_US/LC_MESSAGES/sentier.mo b/locales/en_US/LC_MESSAGES/sentier.mo
deleted file mode 100644
index 7449c60..0000000
Binary files a/locales/en_US/LC_MESSAGES/sentier.mo and /dev/null differ
diff --git a/locales/en_US/LC_MESSAGES/sentier.po b/locales/en_US/LC_MESSAGES/sentier.po
deleted file mode 100644
index aa8b7bc..0000000
--- a/locales/en_US/LC_MESSAGES/sentier.po
+++ /dev/null
@@ -1,73 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR , YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: \n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-03-05 17:48+0100\n"
-"PO-Revision-Date: 2022-03-05 17:48+0100\n"
-"Last-Translator: \n"
-"Language-Team: \n"
-"Language: en_US\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"
-"X-Generator: Poedit 3.0.1\n"
-"X-Poedit-Basepath: ../../..\n"
-"X-Poedit-SearchPath-0: index.php\n"
-
-#: index.php:48
-msgid "French"
-msgstr ""
-
-#: index.php:48
-msgid "English"
-msgstr ""
-
-#: index.php:48
-msgid "German"
-msgstr ""
-
-#: index.php:48
-msgid "Spanish"
-msgstr ""
-
-#: index.php:128
-msgid "Blog"
-msgstr ""
-
-#: index.php:128
-msgid "Go to the blog..."
-msgstr ""
-
-#: index.php:130
-msgid "Gallery"
-msgstr ""
-
-#: index.php:130
-msgid "Visit the gallery..."
-msgstr ""
-
-#: index.php:132
-msgid "Piwigo"
-msgstr ""
-
-#: index.php:132
-msgid "Visit the Piwigo gallery..."
-msgstr ""
-
-#: index.php:134
-msgid "This month"
-msgstr ""
-
-#: index.php:134
-msgid "Latest images..."
-msgstr ""
-
-#: index.php:141
-msgid "Powered by"
-msgstr ""
diff --git a/locales/es_ES/LC_MESSAGES/sentier.mo b/locales/es_ES/LC_MESSAGES/sentier.mo
deleted file mode 100644
index c6cb676..0000000
Binary files a/locales/es_ES/LC_MESSAGES/sentier.mo and /dev/null differ
diff --git a/locales/es_ES/LC_MESSAGES/sentier.po b/locales/es_ES/LC_MESSAGES/sentier.po
deleted file mode 100644
index a323b19..0000000
--- a/locales/es_ES/LC_MESSAGES/sentier.po
+++ /dev/null
@@ -1,176 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR , YEAR.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: sur-le-sentier.fr\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-03-05 17:50+0100\n"
-"PO-Revision-Date: 2022-03-05 20:54+0100\n"
-"Last-Translator: \n"
-"Language-Team: French \n"
-"Language: es_ES\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"
-"X-Generator: Poedit 3.0.1\n"
-"X-Poedit-Basepath: ..\n"
-"X-Poedit-SearchPath-0: index.php\n"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:37
-msgid "Enter"
-msgstr "Entrar"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:39
-msgid "French"
-msgstr "Francés"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:39
-msgid "English"
-msgstr "Inglés"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:39
-msgid "German"
-msgstr "Alemán"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:39
-msgid "Spanish"
-msgstr "Español"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:52
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:364
-msgid "Photo of the month..."
-msgstr "Foto del mes..."
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:171
-msgid "January"
-msgstr "Enero"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:174
-msgid "February"
-msgstr "Febrero"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:177
-msgid "March"
-msgstr "Marzo"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:180
-msgid "April"
-msgstr "Abril"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:183
-msgid "May"
-msgstr "Mayo"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:186
-msgid "June"
-msgstr "Junio"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:189
-msgid "July"
-msgstr "Julio"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:192
-msgid "August"
-msgstr "Agosto"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:195
-msgid "September"
-msgstr "Septiembre"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:198
-msgid "October"
-msgstr "Octubre"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:201
-msgid "November"
-msgstr "Noviembre"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:204
-msgid "December"
-msgstr "Diciembre"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:344
-msgid "When"
-msgstr "Cuando"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:344
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:349
-msgid "Now"
-msgstr "Ahora"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:350
-msgid "Blog"
-msgstr "Blog"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:351
-msgid "Gallery"
-msgstr "Galería"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:352
-msgid "Guestbook"
-msgstr "Libro de visitas"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:353
-msgid "Contact"
-msgstr "Contacto"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:354
-msgid "Links"
-msgstr "Enlaces"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:476
-msgid "The"
-msgstr "El"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:476
-msgid "F j, Y, g:i a"
-msgstr "F j, Y, g:i a"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:478
-msgid " at "
-msgstr " en "
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:478
-msgid "Focal "
-msgstr "Focal "
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:629
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:630
-msgid "Archives"
-msgstr "Archivos"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:630
-msgid "Help"
-msgstr "Ayuda"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:673
-msgid "Previous Page"
-msgstr "Página anterior"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:673
-msgid "prev"
-msgstr "anterior"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:676
-msgid "Page"
-msgstr "Página"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:682
-msgid "Next Page"
-msgstr "Siguiente página"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:682
-msgid "next"
-msgstr "siguiente"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:704
-msgid "Select language"
-msgstr "Seleccione el idioma"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:706
-msgid "Photo's licence"
-msgstr "Licencia de la foto"
diff --git a/locales/fr_FR/LC_MESSAGES/sentier.mo b/locales/fr_FR/LC_MESSAGES/sentier.mo
deleted file mode 100644
index ecaaad8..0000000
Binary files a/locales/fr_FR/LC_MESSAGES/sentier.mo and /dev/null differ
diff --git a/locales/fr_FR/LC_MESSAGES/sentier.po b/locales/fr_FR/LC_MESSAGES/sentier.po
deleted file mode 100644
index 9c9a45f..0000000
--- a/locales/fr_FR/LC_MESSAGES/sentier.po
+++ /dev/null
@@ -1,183 +0,0 @@
-# French translations for PACKAGE package.
-# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Bruno Pesenti <>, 2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: sur-le-sentier.fr\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-03-05 17:38+0100\n"
-"PO-Revision-Date: 2022-03-05 17:51+0100\n"
-"Last-Translator: Bruno \n"
-"Language-Team: French \n"
-"Language: fr\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"
-"X-Generator: Poedit 3.0.1\n"
-"X-Poedit-KeywordsList: gettext;_\n"
-"X-Poedit-Basepath: ../../..\n"
-"X-Poedit-SourceCharset: UTF-8\n"
-"X-Poedit-SearchPath-0: index.php\n"
-
-#: index.php:48
-msgid "French"
-msgstr "Français"
-
-#: index.php:48
-msgid "English"
-msgstr "Anglais"
-
-#: index.php:48
-msgid "German"
-msgstr "Allemand"
-
-#: index.php:48
-msgid "Spanish"
-msgstr "Espagnol"
-
-#: index.php:128
-msgid "Blog"
-msgstr "Blog"
-
-#: index.php:128
-msgid "Go to the blog..."
-msgstr "Aller sur le blog..."
-
-#: index.php:130
-msgid "Gallery"
-msgstr "Portfolio"
-
-#: index.php:130
-msgid "Visit the gallery..."
-msgstr "Visiter la galerie..."
-
-#: index.php:132
-msgid "Piwigo"
-msgstr "Piwigo"
-
-#: index.php:132
-msgid "Visit the Piwigo gallery..."
-msgstr "Visiter la galerie Piwigo…"
-
-#: index.php:134
-msgid "This month"
-msgstr "Ce mois-çi"
-
-#: index.php:134
-msgid "Latest images..."
-msgstr "Dernières images..."
-
-#: index.php:141
-msgid "Powered by"
-msgstr "Propulsé par"
-
-#~ msgid "WordPress"
-#~ msgstr "WordPress"
-
-#~ msgid "Zenphoto"
-#~ msgstr "Zenphoto"
-
-#~ msgid "Contact"
-#~ msgstr "Contact"
-
-#~ msgid "Enter"
-#~ msgstr "Entrer"
-
-#~ msgid "Photo of the month..."
-#~ msgstr "Photo du mois..."
-
-#~ msgid "January"
-#~ msgstr "Janvier"
-
-#~ msgid "February"
-#~ msgstr "Février"
-
-#~ msgid "March"
-#~ msgstr "Mars"
-
-#~ msgid "April"
-#~ msgstr "Avril"
-
-#~ msgid "May"
-#~ msgstr "Mai"
-
-#~ msgid "June"
-#~ msgstr "Juin"
-
-#~ msgid "July"
-#~ msgstr "Juillet"
-
-#~ msgid "August"
-#~ msgstr "Aout"
-
-#~ msgid "September"
-#~ msgstr "Septembre"
-
-#~ msgid "October"
-#~ msgstr "Octobre"
-
-#~ msgid "November"
-#~ msgstr "Novembre"
-
-#~ msgid "December"
-#~ msgstr "Décembre"
-
-#~ msgid "Now"
-#~ msgstr "En ce moment"
-
-#~ msgid "Guestbook"
-#~ msgstr "Livre d'Or"
-
-#~ msgid "Links"
-#~ msgstr "Liens"
-
-#~ msgid "The"
-#~ msgstr "Le"
-
-#~ msgid "F j, Y, g:i a"
-#~ msgstr "d m Y à G:i"
-
-#~ msgid " at "
-#~ msgstr " à "
-
-#~ msgid "Focal "
-#~ msgstr "Focale "
-
-#~ msgid "Archives"
-#~ msgstr "Archives"
-
-#~ msgid "Help"
-#~ msgstr "Aide"
-
-#~ msgid "Previous Page"
-#~ msgstr "Page précédente"
-
-#~ msgid "prev"
-#~ msgstr "prec"
-
-#~ msgid "Page"
-#~ msgstr "Page"
-
-#~ msgid "Next Page"
-#~ msgstr "Page suivante"
-
-#~ msgid "next"
-#~ msgstr "suiv"
-
-#~ msgid "Select language"
-#~ msgstr "Choix du language"
-
-#~ msgid "Photo's licence"
-#~ msgstr "License des photos"
-
-#~ msgid "Tags clouds:"
-#~ msgstr "Nuage de mot-clés:"
-
-#~ msgid "Site news:"
-#~ msgstr "Nouveautés du site:"
-
-#~ msgid "See my last work..."
-#~ msgstr "Voir mes dernières photos..."
diff --git a/locales/sentier.pot b/locales/sentier.pot
deleted file mode 100644
index 067b66c..0000000
--- a/locales/sentier.pot
+++ /dev/null
@@ -1,175 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR , YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: sur-le-sentier.fr\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-03-05 17:50+0100\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME \n"
-"Language-Team: French \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 3.0.1\n"
-"X-Poedit-Basepath: ..\n"
-"X-Poedit-SearchPath-0: index.php\n"
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:37
-msgid "Enter"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:39
-msgid "French"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:39
-msgid "English"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:39
-msgid "German"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:39
-msgid "Spanish"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:52
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:364
-msgid "Photo of the month..."
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:171
-msgid "January"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:174
-msgid "February"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:177
-msgid "March"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:180
-msgid "April"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:183
-msgid "May"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:186
-msgid "June"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:189
-msgid "July"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:192
-msgid "August"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:195
-msgid "September"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:198
-msgid "October"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:201
-msgid "November"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:204
-msgid "December"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:344
-msgid "When"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:344
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:349
-msgid "Now"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:350
-msgid "Blog"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:351
-msgid "Gallery"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:352
-msgid "Guestbook"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:353
-msgid "Contact"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:354
-msgid "Links"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:476
-msgid "The"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:476
-msgid "F j, Y, g:i a"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:478
-msgid " at "
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:478
-msgid "Focal "
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:629
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:630
-msgid "Archives"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:630
-msgid "Help"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:673
-msgid "Previous Page"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:673
-msgid "prev"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:676
-msgid "Page"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:682
-msgid "Next Page"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:682
-msgid "next"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:704
-msgid "Select language"
-msgstr ""
-
-#: /Library/WebServer/Documents/photoblog/ce-mois.php:706
-msgid "Photo's licence"
-msgstr ""
diff --git a/photo-du-mois-lc.php b/photo-du-mois-lc.php
deleted file mode 100644
index 8413dfe..0000000
--- a/photo-du-mois-lc.php
+++ /dev/null
@@ -1,274 +0,0 @@
-
-
-
-
-
-
-
- Photo du mois
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-prepare($query4);
- $stmt->execute(array($limit, $offset));
-
- $result = $stmt->fetchAll(PDO::FETCH_ASSOC);
- $rowcount = count($result);
-
- $conn4 = null;
- }
- catch(PDOException $e) {
- echo $e->getMessage();
- }
-
- $photo_du_mois = $result[0];
- $z = $photo_du_mois['date'];
-
- $photo_du_mois['titre'] = "Titre";
- $photo_du_mois['legende'] = "Légende";
-
- if (!empty($photo_du_mois['titre'])) {
- $x = $photo_du_mois['titre'];
- $y = $photo_du_mois['legende'];
- }
- elseif (!empty($photo_du_mois['legende'])) {
- $x = $photo_du_mois['legende'];
- }
- else {
- $x = basename($photo_du_mois['filename']);
- $y = "";
- }
-
- $month_exif = $photo_du_mois['model'] . " \u{30FB} " . $photo_du_mois['lens'] . " \u{30FB} " . $photo_du_mois['exposure'] . " \u{30FB} " . $photo_du_mois['aperture'] . " \u{30FB} " . $photo_du_mois['iso'] . " ISO";
-?>
-
-
-
-';
- echo '';
- // data-lcl-author=
- echo '
';
-
- echo "";
- echo '';
-
- if (!empty($photo_du_mois['titre']) || !empty($photo_du_mois['legende'])) {
- ?>
-
-
- ';
- //echo $photo_du_mois['model'] . " \u{30FB} " . $photo_du_mois['lens'] . " \u{30FB} ";
- //echo $photo_du_mois['exposure'] . " \u{30FB} " . $photo_du_mois['aperture'] . " \u{30FB} " . $photo_du_mois['iso'] . " ISO";
- echo $month_exif;
- echo '';
-?>
-
-
-';
- }
-
- /*
- $rowcount = 5 - 10 - 15 => add 0
- $rowcount = 4 - 9 - 14 => add 1
- $rowcount = 3 - 8 - 13 => add 2
- $rowcount = 2 - 7 - 12 => add 3
- $rowcount = 1 - 6 - 11 => add 4
- */
-
- if ($rowcount % 4 == 0) $blank = 1;
- elseif ($rowcount % 3 == 0) $blank = 2;
- elseif ($rowcount % 2 == 0) $blank = 3;
- elseif ($rowcount % 1 == 0) $blank = 4;
-
- for ($i = 1; $i <= $blank; $i++) {
- echo '';
- echo '
';
- }
- ?>
-
-
-
-
-
-
-prepare($query4);
- $stmt->execute();
-
- $result = $stmt->fetch(PDO::FETCH_ASSOC);
- $numRows = $result['count'];
-
- $conn4 = null;
- }
- catch(PDOException $e) {
- echo $e->getMessage();
- }
-
-
-// calcul du nombre de pages (arrondi a l'entier supérieur)
-$nbpages = ceil($numRows / 12);
-$prec = $page - 1;
-$suiv = $page + 1;
-
-echo '' . gettext("Page: ");
-if ($page >= 2) echo '
« '.gettext("prev").' ';
-for ($i = 1; $i <= $nbpages; $i++) {
- if ($i != $page) {
- echo '
'.$i.' ';
- }
- else {
- echo "
".$i." ";
- }
- }
-if ($page < $nbpages) echo '
'.gettext("next").' » ';
-
-echo '
';
-
-?>
-
-@ 2022
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/photo-du-mois.php b/photo-du-mois.php
index d95c7ea..6dd58d2 100644
--- a/photo-du-mois.php
+++ b/photo-du-mois.php
@@ -5,104 +5,56 @@
- Document
-
-
+ = _("Picture of the month");?>
-
-
+
+
+
+
-// Include Lightbox
-import PhotoSwipeLightbox from './js/photoswipe-lightbox.esm.js';
+ $liste_locale = list_dir($dir_locales);
+ if ((!isset($_POST['lang'])) and (!isset($_GET['lang']))) $langue = locale_language_from_browser($myLanguages);
+ else $langue = $_REQUEST['lang'];
-const backEasing = {
- in: 'cubic-bezier(0.6, -0.28, 0.7, 1)',
- out: 'cubic-bezier(0.3, 0, 0.32, 1.275)',
- inOut: 'cubic-bezier(0.68, -0.55, 0.265, 1.55)'
-};
+ $domain = 'sentier';
+ putenv('LC_ALL=' . $langue);
+ $loc = setlocale(LC_ALL, $langue);
-const options = {
- // may select multiple "galleries"
- gallery: '#gallery--simple',
+ bindtextdomain($domain, $root . '/Locale/');
+ bind_textdomain_codeset($domain, 'UTF-8');
+ textdomain($domain);
+
+ $nation = array('fr_FR' => gettext('French'), 'en_US' => gettext('English') , 'de_DE' => gettext('German'), 'es_ES' => gettext('Spanish') );
- // Elements within gallery (slides)
- children: 'a',
- //showHideAnimationType: 'zoom',
- //showAnimationDuration: 1000,
- //hideAnimationDuration: 1000,
+ include 'functions.php';
+?>
- // Include PhotoSwipe Core
- // and use absolute path (that starts with http(s)://)
- //pswpModule: 'https://airbook.local/sls/js/photoswipe.esm.js'
- pswpModule: 'https:///sls/js/photoswipe.esm.js'
-};
-
-const lightbox = new PhotoSwipeLightbox(options);
-lightbox.on('uiRegister', function() {
- lightbox.pswp.ui.registerElement({
- name: 'custom-caption',
- order: 9,
- isButton: false,
- appendTo: 'root',
- html: 'Caption text',
- onInit: (el, pswp) => {
- lightbox.pswp.on('change', () => {
- const currSlideElement = lightbox.pswp.currSlide.data.element;
- let captionHTML = '';
- if (currSlideElement) {
- const hiddenCaption = currSlideElement.querySelector('.hidden-caption-content');
- if (hiddenCaption) {
- // get caption from element with class hidden-caption-content
- captionHTML = hiddenCaption.innerHTML;
- } else {
- // get caption from alt attribute
- captionHTML = currSlideElement.querySelector('img').getAttribute('alt');
- }
- }
- el.innerHTML = captionHTML || '';
- });
- }
- });
-});
-lightbox.init();
-
-lightbox.on('firstUpdate', () => {
- lightbox.pswp.options.easing = backEasing.out;
-});
-lightbox.on('initialZoomInEnd', () => {
- lightbox.pswp.options.easing = backEasing.inOut;
-});
-lightbox.on('close', () => {
- lightbox.pswp.options.easing = backEasing.in;
-});
-
-lightbox.init();
-
+
-
-
+
+ = _("Picture of the month");?>
prepare($query4);
$stmt->execute(array($limit, $offset));
@@ -119,42 +71,57 @@ try {
$photo_du_mois = $result[0];
$z = $photo_du_mois['date'];
- $photo_du_mois['titre'] = "Titre";
+ $photo_du_mois['title'] = "Titre";
$photo_du_mois['legende'] = "Légende";
+
+ if (!empty($photo_du_mois['title'])) {
+ $x = $photo_du_mois['title'];
+ $y = $photo_du_mois['legende'];
+ }
+ elseif (!empty($photo_du_mois['legende'])) {
+ $x = $photo_du_mois['legende'];
+ }
+ else {
+ $x = basename($photo_du_mois['filename']);
+ $y = "";
+ }
+ $month_exif = $photo_du_mois['model'] . " \u{30FB} " . $photo_du_mois['lens'] . " \u{30FB} " . $photo_du_mois['speed'] . " \u{30FB} " . $photo_du_mois['aperture'] . " \u{30FB} " . $photo_du_mois['iso'] . " ISO";
?>
';
- echo '
';
+ echo '';
if (!empty($photo_du_mois['titre']) || !empty($photo_du_mois['legende'])) {
?>
-
+
';
- echo $photo_du_mois['model'] . " \u{30FB} " . $photo_du_mois['lens'] . " \u{30FB} ";
- echo $photo_du_mois['exposure'] . " \u{30FB} " . $photo_du_mois['aperture'] . " \u{30FB} " . $photo_du_mois['iso'] . " ISO";
+ //echo $photo_du_mois['model'] . " \u{30FB} " . $photo_du_mois['lens'] . " \u{30FB} ";
+ //echo $photo_du_mois['exposure'] . " \u{30FB} " . $photo_du_mois['aperture'] . " \u{30FB} " . $photo_du_mois['iso'] . " ISO";
+ echo $month_exif;
echo '';
?>
-
+
';
@@ -210,7 +183,56 @@ try {
}
?>
-
+
+
+
getMessage();
}
-
// calcul du nombre de pages (arrondi a l'entier supérieur)
-$nbpages = ceil($numRows / 12);
+$nbpages = ceil($numRows / 13);
$prec = $page - 1;
$suiv = $page + 1;
-echo '' . gettext("Page: ");
+echo '
' . gettext("Page") . ': ';
if ($page >= 2) echo '
« '.gettext("prev").' ';
for ($i = 1; $i <= $nbpages; $i++) {
if ($i != $page) {
@@ -253,7 +274,11 @@ echo '
';
?>
-
@ 2022
+
sur-le-sentier.fr@ 2022
+
+
+
+