Compare commits
4 Commits
v1.0
...
356c1885df
| Author | SHA1 | Date | |
|---|---|---|---|
| 356c1885df | |||
| 5638476d71 | |||
| 1ddd50ec90 | |||
| f0fa8b6efc |
@@ -8,7 +8,7 @@ msgstr ""
|
|||||||
"Project-Id-Version: sur-le-sentier.fr\n"
|
"Project-Id-Version: sur-le-sentier.fr\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2024-12-14 11:46+0100\n"
|
"POT-Creation-Date: 2024-12-14 11:46+0100\n"
|
||||||
"PO-Revision-Date: 2024-12-14 13:41+0100\n"
|
"PO-Revision-Date: 2024-12-23 10:21+0100\n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: French <bruno@clicclac.info>\n"
|
"Language-Team: French <bruno@clicclac.info>\n"
|
||||||
"Language: es_ES\n"
|
"Language: es_ES\n"
|
||||||
@@ -857,9 +857,8 @@ msgid "String"
|
|||||||
msgstr "Cadena"
|
msgstr "Cadena"
|
||||||
|
|
||||||
#: vegas/index.php:106
|
#: vegas/index.php:106
|
||||||
#, fuzzy
|
|
||||||
msgid "<span class=\"green\">Latest</span> images..."
|
msgid "<span class=\"green\">Latest</span> images..."
|
||||||
msgstr "<span class=« green »>Últimas</span> imágenes…"
|
msgstr "<span class=« green»>Últimas</span> imágenes…"
|
||||||
|
|
||||||
#: view_bdd.php:101 view_bdd.php:155 view_bdd2.php:280 view_bdd2.php:306
|
#: view_bdd.php:101 view_bdd.php:155 view_bdd2.php:280 view_bdd2.php:306
|
||||||
msgid "Suppress"
|
msgid "Suppress"
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="navPage"><a href="index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a></p>
|
<p class="navPage"><a href="../index.php" title="<?php echo gettext("Home"); ?>"><?php echo gettext("Home"); ?></a> | <a href="../photo-du-mois.php" title="<?php echo gettext("Picture of the month"); ?>"><?php echo gettext("Picture of the month"); ?></a> | <a href="../maps.php" title="<?php echo gettext("Maps"); ?>"><?php echo gettext("Maps"); ?></a> | <a href="admin.php" title="<?php echo gettext("Admin page"); ?>"><?php echo gettext("Admin page"); ?></a></p>
|
||||||
|
|
||||||
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
<p><em><small>© 2013-<?php echo date('Y'); ?> sur-le-sentier.fr</small></em></p>
|
||||||
|
|
||||||
|
|||||||
@@ -108,16 +108,11 @@ $i = 1;
|
|||||||
$photos = array();
|
$photos = array();
|
||||||
|
|
||||||
foreach($dir as $file){
|
foreach($dir as $file){
|
||||||
/*
|
|
||||||
$file->getFilename()
|
|
||||||
pathName()
|
|
||||||
*/
|
|
||||||
$file = $file->getpathName();
|
$file = $file->getpathName();
|
||||||
//$file = $file->getFilename();
|
//$file = $file->getFilename();
|
||||||
echo $file;
|
|
||||||
|
|
||||||
$x = in_bdd($file);
|
$x = in_bdd($file);
|
||||||
echo $x;
|
|
||||||
/*
|
/*
|
||||||
if ($i > 5) {
|
if ($i > 5) {
|
||||||
break;
|
break;
|
||||||
@@ -653,6 +648,9 @@ try {
|
|||||||
$titre = $item['title']; // ***
|
$titre = $item['title']; // ***
|
||||||
$legende = $item['legende']; // ***
|
$legende = $item['legende']; // ***
|
||||||
|
|
||||||
|
|
||||||
|
# Create Thumbnails (functions.php line 203)
|
||||||
|
|
||||||
$big = $chemin . $file;
|
$big = $chemin . $file;
|
||||||
create_thumb($th_w, $th_h, $big);
|
create_thumb($th_w, $th_h, $big);
|
||||||
|
|
||||||
|
|||||||
@@ -201,12 +201,49 @@ function get_gps($exif) {
|
|||||||
|
|
||||||
|
|
||||||
function create_thumb($thumb_w, $thumb_h, $image) {
|
function create_thumb($thumb_w, $thumb_h, $image) {
|
||||||
|
global $chemin;
|
||||||
|
|
||||||
|
list($origin_w, $origin_h) = getimagesize($image);
|
||||||
|
$origin_ratio = round($origin_w / $origin_h, 1);
|
||||||
|
$outFile = str_replace("img", "thumb", $chemin) . basename($image);
|
||||||
|
|
||||||
|
$new_w = 300;
|
||||||
|
$new_h = 200;
|
||||||
|
|
||||||
|
//$f = $chemin . $image;
|
||||||
|
$thumb = new Imagick($image);
|
||||||
|
|
||||||
list($origin_w, $origin_h) = getimagesize($image);
|
if ($origin_w != null && $origin_h != null) {
|
||||||
$origin_ratio = round($origin_w / $origin_h, 1);
|
if ($origin_w > $origin_h) {
|
||||||
$outFile = str_replace("../photos/img", "../photos/thumb", $image);
|
|
||||||
|
$resize_w = $origin_w * $new_h / $origin_h;
|
||||||
|
$resize_h = $new_h;
|
||||||
|
|
||||||
|
//$thumb->resizeImage($resize_w, $resize_h, Imagick::FILTER_LANCZOS, 0.9);
|
||||||
|
$thumb->resizeImage($resize_w, $resize_h, Imagick::FILTER_CATROM, 0.9);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
if ($origin_w != null && $origin_h != null) {
|
$resize_w = $new_w;
|
||||||
|
$resize_h = $origin_h * $new_w / $origin_w; // 450
|
||||||
|
|
||||||
|
$thumb->resizeImage($resize_w, $resize_h, Imagick::FILTER_CATROM, 0.9); // 300 x 300
|
||||||
|
$thumb->cropImage($new_w, $new_h, ($resize_w - $new_w) / 2, ($resize_h - $new_h) / 2); // (w, h, x ,y) (xy coin haut gauche) (300, 200, 0, 125)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//$image->sharpenimage($radius, $sigma, $channel); // 5, 1
|
||||||
|
$thumb->sharpenimage(5, 1);
|
||||||
|
$thumb->setImageCompression(Imagick::COMPRESSION_ZIP);
|
||||||
|
// Set compression level (1 lowest quality, 100 highest quality)
|
||||||
|
$thumb->setImageCompressionQuality(75);
|
||||||
|
// Strip out unneeded meta data
|
||||||
|
$thumb->stripImage();
|
||||||
|
|
||||||
|
$thumb->writeImage($outFile);
|
||||||
|
$thumb->destroy();
|
||||||
|
|
||||||
|
/*
|
||||||
if ($thumb_w / $thumb_h > $origin_ratio) {
|
if ($thumb_w / $thumb_h > $origin_ratio) {
|
||||||
$thumb_w = $thumb_h * $origin_ratio;
|
$thumb_w = $thumb_h * $origin_ratio;
|
||||||
} else {
|
} else {
|
||||||
@@ -219,8 +256,11 @@ if ($origin_w != null && $origin_h != null) {
|
|||||||
$image->writeImage($outFile);
|
$image->writeImage($outFile);
|
||||||
$image->destroy();
|
$image->destroy();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Fonction in_bdd(): test si la photo est déjà dans la bdd
|
/* Fonction in_bdd(): test si la photo est déjà dans la bdd
|
||||||
|
|
||||||
@@ -399,6 +439,11 @@ function data_for_lightbox($data) {
|
|||||||
$latitude = $data['lat'];
|
$latitude = $data['lat'];
|
||||||
$longitude = $data['long'];
|
$longitude = $data['long'];
|
||||||
$altitude = $data['alt'];
|
$altitude = $data['alt'];
|
||||||
|
|
||||||
|
$width = $data['width'];
|
||||||
|
$height = $data['height'];
|
||||||
|
|
||||||
|
//echo $width . "-" . $height;
|
||||||
|
|
||||||
$gps = (!empty($longitude) && !empty($latitude)) ? $latitude . "," . $longitude : "";
|
$gps = (!empty($longitude) && !empty($latitude)) ? $latitude . "," . $longitude : "";
|
||||||
//$gps = $longitude . "," . $latitude;
|
//$gps = $longitude . "," . $latitude;
|
||||||
@@ -488,6 +533,8 @@ function data_for_lightbox($data) {
|
|||||||
$lightbox['creator'] = $creator;
|
$lightbox['creator'] = $creator;
|
||||||
$lightbox['gps'] = $gps;
|
$lightbox['gps'] = $gps;
|
||||||
$lightbox['description'] = $description;
|
$lightbox['description'] = $description;
|
||||||
|
$lightbox['width'] = $width;
|
||||||
|
$lightbox['height'] = $height;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Array
|
Array
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ else $page = intval($_GET['page']);
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
$chemin = 'photos/img/';
|
$chemin = 'photos/img/';
|
||||||
|
$chemin_thumb = str_replace("img", "thumb", $chemin);
|
||||||
|
|
||||||
$base = 'db_photo.sqlite3';
|
$base = 'db_photo.sqlite3';
|
||||||
|
|
||||||
@@ -188,12 +189,33 @@ else exit("Database " . $base . " does not exist !");
|
|||||||
} else {
|
} else {
|
||||||
$meta = '';
|
$meta = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
echo '<div class="item">';
|
echo '<div class="item">';
|
||||||
|
|
||||||
echo '<a href ="' . $lb['big'] . '" title="' . htmlspecialchars($lb['title']) . '" data-lcl-txt="' . htmlspecialchars($lb['description']) . '" data-lcl-author="' . htmlspecialchars($lb['creator']) . '">';
|
echo '<a href ="' . $lb['big'] . '" title="' . htmlspecialchars($lb['title']) . '" data-lcl-txt="' . htmlspecialchars($lb['description']) . '" data-lcl-author="' . htmlspecialchars($lb['creator']) . '">';
|
||||||
|
/*
|
||||||
|
if ($lb['width'] > $lb['height']) {
|
||||||
|
echo '<img src="' . $lb['thumb'] . '" alt="' . htmlspecialchars($lb['title']) . '">';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$f = $chemin . $result[$i]['filename'];
|
||||||
|
$image = new Imagick($f);
|
||||||
|
|
||||||
|
$new_w = 300;
|
||||||
|
$new_h = 200;
|
||||||
|
|
||||||
|
$resize_w = $new_w;
|
||||||
|
$resize_h = $lb['height'] * $new_w / $lb['width']; // 450
|
||||||
|
|
||||||
|
$image->resizeImage($resize_w, $resize_h, Imagick::FILTER_LANCZOS, 0.9); // 300 x 300
|
||||||
|
$image->cropImage($new_w, $new_h, ($resize_w - $new_w) / 2, ($resize_h - $new_h) / 2); // (w, h, x ,y) (xy coin haut gauche) (300, 200, 0, 125)
|
||||||
|
|
||||||
|
$thu = $chemin_thumb ."_" . $result[$i]['filename'];;
|
||||||
|
$image->writeImage($thu);
|
||||||
|
|
||||||
|
echo '<img src="' . $thu . '" alt="' . htmlspecialchars($lb['title']) . '">';
|
||||||
|
}
|
||||||
|
*/
|
||||||
echo '<img src="' . $lb['thumb'] . '" alt="' . htmlspecialchars($lb['title']) . '">';
|
echo '<img src="' . $lb['thumb'] . '" alt="' . htmlspecialchars($lb['title']) . '">';
|
||||||
echo "</a>";
|
echo "</a>";
|
||||||
echo '<span class="caption">' . month($date) . '</span>';
|
echo '<span class="caption">' . month($date) . '</span>';
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 333 KiB |
|
Before Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 330 KiB |
|
Before Width: | Height: | Size: 203 KiB |
|
Before Width: | Height: | Size: 145 KiB |
|
Before Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 433 KiB After Width: | Height: | Size: 894 KiB |
BIN
photos/img/12_2024.jpg
Normal file
|
After Width: | Height: | Size: 943 KiB |
BIN
photos/img/1_2025.jpg
Normal file
|
After Width: | Height: | Size: 592 KiB |
|
Before Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 18 KiB |