Page ce mois-ci (pagination ajax 1)
https://www.sanwebe.com/2013/03/ajax-pagination-with-jquery-php
This commit is contained in:
BIN
-child/ce-mois.php.zip
Normal file
BIN
-child/ce-mois.php.zip
Normal file
Binary file not shown.
366
ce-mois-bis.php
Executable file
366
ce-mois-bis.php
Executable file
@@ -0,0 +1,366 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Template Name: Ce-mois bis
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty_Ten
|
||||||
|
* @since Twenty Ten 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
get_header();
|
||||||
|
|
||||||
|
$root = $_SERVER['DOCUMENT_ROOT'];
|
||||||
|
define('SERVERPATH',$root.'/zenphoto');
|
||||||
|
//define('WEBPATH','/'.basename(dirname(__FILE__)).'/zenphoto');
|
||||||
|
//require_once(SERVERPATH.'/zp-core/template-functions.php');
|
||||||
|
include('../photoblog/exifer/exif.php');
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<div class="container">
|
||||||
|
<div class="post_content">
|
||||||
|
<?php if(have_posts()): the_post(); ?>
|
||||||
|
<article class="post_box" id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||||
|
<h1><?php the_title(); ?></h1>
|
||||||
|
<?php the_content(); ?>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$mois = date('n');
|
||||||
|
$an = date('Y');
|
||||||
|
$image = $mois . '_' . $an . '.jpg';
|
||||||
|
$annee = $an;
|
||||||
|
|
||||||
|
// nom des fichiers: 7_2009.jpg et non pas 07_2009.jpg
|
||||||
|
|
||||||
|
for ($i = 0; $i <= 11 ; $i++) {
|
||||||
|
$a = ($mois - $i);
|
||||||
|
if ($a < 1) {
|
||||||
|
$a = (12 + $a);
|
||||||
|
$annee = $an - 1;
|
||||||
|
}
|
||||||
|
$tableau[$i] = $a . '_' . $annee . '.jpg';
|
||||||
|
}
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
while ($i < 13) {
|
||||||
|
$file = '../zenphoto/albums/photos-du-mois/' . $tableau[$i];
|
||||||
|
//echo $file;
|
||||||
|
|
||||||
|
if (file_exists($file)) {
|
||||||
|
//echo "<br />" ."file exist: " . $file;
|
||||||
|
// ../zenphoto/albums/photos-du-mois/4_2014.jpg
|
||||||
|
// 4_2014_800_watermark.jpg, 4_2014_FULL_watermark.jpg
|
||||||
|
$photo_du_mois = $file;
|
||||||
|
$title = $tableau[$i];
|
||||||
|
|
||||||
|
$size = getimagesize($photo_du_mois, $info);
|
||||||
|
//preprint($size);
|
||||||
|
|
||||||
|
if ($size[0] > 1000) {
|
||||||
|
// HD
|
||||||
|
$hd = '../../zenphoto/cache/photos-du-mois/' . substr($tableau[$i], 0, strlen($tableau[$i]) - 4) . "_FULL_watermark.jpg";
|
||||||
|
if (file_exists($hd)) {
|
||||||
|
$size_hd = getimagesize($hd, $info_hd);
|
||||||
|
$imgs['img_hd'] = array(
|
||||||
|
'url' => $hd,
|
||||||
|
'width' => $size_hd[0],
|
||||||
|
'height' => $size_hd[1]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$imgs['img_hd'] = array(
|
||||||
|
'url' => '../' . $photo_du_mois,
|
||||||
|
'width' => $size[0],
|
||||||
|
'height' => $size[1]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// SD
|
||||||
|
$sd = '../../zenphoto/cache/photos-du-mois/' . substr($tableau[$i], 0, strlen($tableau[$i]) - 4) . "_800_watermark.jpg";
|
||||||
|
if (file_exists($sd)) {
|
||||||
|
$size_sd = getimagesize($sd, $info_sd);
|
||||||
|
$imgs['img_sd'] = array(
|
||||||
|
'url' => $sd,
|
||||||
|
'width' => $size_sd[0],
|
||||||
|
'height' => $size_sd[1]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// SD
|
||||||
|
$sd = '../../zenphoto/cache/photos-du-mois/' . substr($tableau[$i], 0, strlen($tableau[$i]) - 4) . "_800_watermark.jpg";
|
||||||
|
if (file_exists($sd)) {
|
||||||
|
$size_sd = getimagesize($sd, $info_sd);
|
||||||
|
$imgs['img_sd'] = array(
|
||||||
|
'url' => $sd,
|
||||||
|
'width' => $size_sd[0],
|
||||||
|
'height' => $size_sd[1]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$imgs['img_hd'] = array(
|
||||||
|
'url' => "",
|
||||||
|
'width' => "",
|
||||||
|
'height' => ""
|
||||||
|
);
|
||||||
|
} // if ($size[0] > 1000)
|
||||||
|
|
||||||
|
$title = explode('.',$title);
|
||||||
|
$title = explode('_',$title[0]);
|
||||||
|
$title = mois2($title[0]) . ' ' . $title[1];
|
||||||
|
$imgs['img_sd']['title'] = $title;
|
||||||
|
|
||||||
|
if (isset($info["APP13"])) {
|
||||||
|
$iptc = iptcparse($info["APP13"]);
|
||||||
|
|
||||||
|
if (isset($iptc['2#120'][0])) $legende = $iptc['2#120'][0];
|
||||||
|
else $legende = "";
|
||||||
|
if (isset($iptc['2#005'][0])) $titre = $iptc['2#005'][0];
|
||||||
|
else $titre = "";
|
||||||
|
|
||||||
|
$keyword = "";
|
||||||
|
if (isset($iptc['2#025'])) {
|
||||||
|
foreach ($iptc['2#025'] as $key => $val) {
|
||||||
|
$keyword .= '<a href="' . $host . '/zenphoto/index.php?p=search&words=' . $val . '" title="Tag > ' . $val . '" rel="tag">' . $val . '</a>';
|
||||||
|
$keyword .= ', ';
|
||||||
|
}
|
||||||
|
$keyword = substr($keyword, 0, -2);
|
||||||
|
}
|
||||||
|
|
||||||
|
$imgs['img_sd']['legende'] = $legende;
|
||||||
|
$imgs['img_sd']['titre'] = $titre;
|
||||||
|
$imgs['img_sd']['keyword'] = $keyword;
|
||||||
|
}
|
||||||
|
|
||||||
|
$exifInfo = "";
|
||||||
|
$exif_array = read_exif_data_raw($file,0);
|
||||||
|
$exifInfo = __('The','CreatorThemeRes-child') . " " .date(__("F j, Y, g:i a",'CreatorThemeRes-child'),strtotime($exif_array['SubIFD']['DateTimeOriginal'])).' - ';
|
||||||
|
$exifInfo .= $exif_array['SubIFD']['ExposureTime']. __(' at ','CreatorThemeRes-child') .$exif_array['SubIFD']['FNumber'].' - ' .$exif_array['SubIFD']['ISOSpeedRatings'].' ISO - '. __('Focal','CreatorThemeRes-child') .$exif_array['SubIFD']['FocalLength'];
|
||||||
|
$imgs['img_sd']['exif'] = $exifInfo;
|
||||||
|
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
//preprint($imgs);
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="cadre">
|
||||||
|
|
||||||
|
<?php if (($imgs['img_sd']['titre'] != "") || ($imgs['img_sd']['legende'] != "")) { ?>
|
||||||
|
<p class="titrePhoto"><?php echo $imgs['img_sd']['titre']; ?>Titre</p>
|
||||||
|
<p class="legendePhoto"><?php echo $imgs['img_sd']['legende']; ?>Légende</p>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<!--img src="watermark2.php?src=<?php echo $photo_du_mois; ?>" alt="Image du mois" title="<?php echo $title; ?>" <?php echo $size[3]; ?> /-->
|
||||||
|
|
||||||
|
<!-- Retina -->
|
||||||
|
<?php
|
||||||
|
if (($imgs['img_sd']['url'] != "") && ($imgs['img_hd']['url'] != "")) {
|
||||||
|
$standard_source = $imgs['img_sd']['url'] . ', ' . $imgs['img_hd']['url'] . ' 2x';
|
||||||
|
//echo "1";
|
||||||
|
}
|
||||||
|
else if ($imgs['img_sd']['url'] != "") {
|
||||||
|
$standard_source = $imgs['img_sd']['url'];
|
||||||
|
//echo "2";
|
||||||
|
}
|
||||||
|
else if ($imgs['img_hd']['url'] != "") {
|
||||||
|
$standard_source = $imgs['img_hd']['url'] . ' 2x';
|
||||||
|
//echo "3";
|
||||||
|
}
|
||||||
|
//echo $standard_source;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<picture data-picture data-alt="">
|
||||||
|
<!--[if IE 9]><video style="display: none;"><![endif]-->
|
||||||
|
<source class="image_standard" srcset="<?php echo $standard_source; ?>">
|
||||||
|
<!--source class="image_medium" srcset="" media="(max-width: 767px)">
|
||||||
|
<source class="image_small" srcset="" media="(max-width: 767px)"-->
|
||||||
|
<!--[if IE 9]></video><![endif]-->
|
||||||
|
<?php
|
||||||
|
echo '<img srcset="' . $imgs['img_sd']['url'] . '" alt="" width="'. $imgs['img_sd']['width'] . '" height="'. $imgs['img_sd']['height'] .'" />';
|
||||||
|
?>
|
||||||
|
</picture>
|
||||||
|
|
||||||
|
<!-- /Retina -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if (($imgs['img_sd']['titre'] != "") || ($imgs['img_sd']['legende'] != "")) { ?>
|
||||||
|
<p class="titrePhoto"><?php echo $imgs['img_sd']['titre']; ?>Titre</p>
|
||||||
|
<p class="legendePhoto"><?php echo $imgs['img_sd']['legende']; ?>Légende</p>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<p class="exifs"><?php echo $imgs['img_sd']['exif']; ?></p>
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
require_once($_SERVER['DOCUMENT_ROOT'].'/Connections/cnx.php');
|
||||||
|
|
||||||
|
$album = 'photos-du-mois'; //Photos du mois
|
||||||
|
$table = array();
|
||||||
|
if ($_SERVER['HTTP_HOST'] == "macbook-pro.local") {
|
||||||
|
$table['images'] = ".images";
|
||||||
|
$table['albums'] = ".albums";
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
if ($_SERVER['HTTP_HOST'] == "clicclac.info") {
|
||||||
|
$table['images'] = "zp_images";
|
||||||
|
$table['albums'] = "zp_albums";
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
if ($_SERVER['HTTP_HOST'] == "clicclac.info") {
|
||||||
|
$table['images'] = "zenphoto_images";
|
||||||
|
$table['albums'] = "zenphoto_albums";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Récupérer l'ID de l'album 'photos-du-mois' ($id_album)
|
||||||
|
$i = 0;
|
||||||
|
$conn = new mysqli($dbhost, $dbuser, $dbpassword, $zptable);
|
||||||
|
if ($conn->connect_error) {
|
||||||
|
trigger_error('Database connection failed: ' . $conn->connect_error, E_USER_ERROR);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
$conn->set_charset("utf8");
|
||||||
|
|
||||||
|
$excquery = "SELECT `id` FROM `" . $table['albums'] . "` WHERE `folder` = '" . $album . "'";
|
||||||
|
|
||||||
|
if ($result = $conn->query($excquery)) {
|
||||||
|
$result->data_seek(0);
|
||||||
|
$row = $result->fetch_row();
|
||||||
|
$id_album = $row[0];
|
||||||
|
$result->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
$conn->close();
|
||||||
|
|
||||||
|
|
||||||
|
// Récupérer toutes les fichiers de l'album 'photos-du-mois' ($fichier[])
|
||||||
|
|
||||||
|
$conn = new mysqli($dbhost, $dbuser, $dbpassword, $zptable);
|
||||||
|
if ($conn->connect_error) {
|
||||||
|
trigger_error('Database connection failed: ' . $conn->connect_error, E_USER_ERROR);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
$conn->set_charset("utf8");
|
||||||
|
|
||||||
|
$pictquery = "SELECT `filename` FROM `" . $table['images'] . "` WHERE `albumid` = ? ORDER BY `date` DESC";
|
||||||
|
|
||||||
|
$stmt = $conn->prepare($pictquery);
|
||||||
|
//echo $pictquery;
|
||||||
|
if($stmt === false) {
|
||||||
|
trigger_error('Wrong SQL: ' . $pictquery . ' Error: ' . $conn->error, E_USER_ERROR);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$stmt->bind_param('i', $id_album);
|
||||||
|
$stmt->execute();
|
||||||
|
$stmt->bind_result($filename);
|
||||||
|
while ($stmt->fetch()) {
|
||||||
|
$fichier[] = $filename;
|
||||||
|
$i++;
|
||||||
|
//echo $filename;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$stmt->close();
|
||||||
|
|
||||||
|
//
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$aide = "<span class='aide'> ? </span><b>Utilisation:</b> cliquer sur une vignette, puis....<br />";
|
||||||
|
$aide .= " <b><i>-sur ordinateur:</i></b> naviguer avec les touches flèches droite et gauche, quitter avec ESC.<br />";
|
||||||
|
$aide .= " <b><i>-sur tablettes et smartphones:</i></b> balayer l'écran avec un doigt vers la droite ou vers la gauche, ou naviguer avec les touches flèches droite et gauche. Cliquer sur la X pour quitter.";
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="archive">
|
||||||
|
<p style="clear: both; "></p>
|
||||||
|
<h4><?php echo gettext("Archives"); ?> (<abbr title="<?php echo $aide; ?>" rel="tooltip"> ? </abbr>)</h4>
|
||||||
|
<!--h4><?php echo gettext("Archives"); ?> <span class='aide'><a href="#" title="<?php echo $aide; ?>" class="tooltip"><span title="<?php echo gettext("Help"); ?>">( ? )</span></a></span></h4-->
|
||||||
|
|
||||||
|
<?php
|
||||||
|
//nb d'archive par page
|
||||||
|
$nb = 12;
|
||||||
|
global $page;
|
||||||
|
|
||||||
|
if (!isset($_GET['page'])) $page = 1;
|
||||||
|
// sinon on recupere la valeur numerique recue en paramètre
|
||||||
|
else $page = intval($_GET['page']);
|
||||||
|
|
||||||
|
// on determine debut du limit
|
||||||
|
$debut = (($page - 1) * $nb) +1; // page 1: 2, page 2: 14, page 3: 26
|
||||||
|
$fin = ($debut + $nb) - 1;
|
||||||
|
|
||||||
|
/*
|
||||||
|
echo count($fichier) . "<br>";
|
||||||
|
echo $debut . "<br>";
|
||||||
|
echo $fin . "<br>";
|
||||||
|
echo $page . "<br>";
|
||||||
|
*/
|
||||||
|
for ($j=$debut; $j<=$fin; $j++) {
|
||||||
|
|
||||||
|
//$fin = (($start + $epp) -1);
|
||||||
|
//for ($j=($start + 1); $j<=$fin; $j++) {
|
||||||
|
/*
|
||||||
|
if ($j <= count($fichier)-1) echo display($fichier[$j],$album);
|
||||||
|
if ($j+1 <= count($fichier)-1) echo display($fichier[$j+1],$album);
|
||||||
|
if ($j+2 <= count($fichier)-1) echo display($fichier[$j+2],$album);
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ($j <= count($fichier)-1) echo displayRetina($fichier[$j],$album);
|
||||||
|
if ($j+1 <= count($fichier)-1) echo displayRetina($fichier[$j+1],$album);
|
||||||
|
if ($j+2 <= count($fichier)-1) echo displayRetina($fichier[$j+2],$album);
|
||||||
|
|
||||||
|
//echo $fichier[$j]; // 9_2015.jpg
|
||||||
|
|
||||||
|
$j = $j + 2;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<p style="clear: both; "></p>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="pagination">
|
||||||
|
<?php
|
||||||
|
/**/
|
||||||
|
// calcul du nombre de pages (arrondi a l'entier superieur)
|
||||||
|
$nbpages = ceil(count($fichier) / 12);
|
||||||
|
$prec = $page - 1;
|
||||||
|
$suiv = $page + 1;
|
||||||
|
|
||||||
|
// $_SERVER[REQUEST_URI] -> /wordpress/ce-mois-ci/
|
||||||
|
|
||||||
|
|
||||||
|
if ($page >= 2) echo '<a href="'.$_SERVER['REQUEST_URI'].'?page='.$prec.'" title="'.gettext("Previous Page").'">« '.gettext("prev").'</a> ';
|
||||||
|
for ($i = 1; $i <= $nbpages; $i++) {
|
||||||
|
if ($i != $page) {
|
||||||
|
echo '<a href="'.$_SERVER['REQUEST_URI'].'?page='.$i.'" title="'.gettext("Page").' '.$i.'">'.$i.' </a> ';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo "<span class='gras'>".$i."</span> ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($page < $nbpages) echo '<a href="'.$_SERVER['REQUEST_URI'].'?page='.$suiv.'" title="'.gettext("Next Page").'">'.gettext("next").' »</a> ';
|
||||||
|
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="clear"></div>
|
||||||
|
<?php if ( comments_open() || '0' != get_comments_number() ) : ?>
|
||||||
|
<div class="home_blog_box">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<?php endif;
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
get_footer( 'page' );
|
||||||
|
?>
|
||||||
240
ce-mois.php
Executable file
240
ce-mois.php
Executable file
@@ -0,0 +1,240 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Template Name: Ce-mois
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty_Ten
|
||||||
|
* @since Twenty Ten 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
get_header();
|
||||||
|
|
||||||
|
$root = $_SERVER['DOCUMENT_ROOT'];
|
||||||
|
define('SERVERPATH',$root.'/zenphoto');
|
||||||
|
//define('WEBPATH','/'.basename(dirname(__FILE__)).'/zenphoto');
|
||||||
|
//require_once(SERVERPATH.'/zp-core/template-functions.php');
|
||||||
|
include('../photoblog/exifer/exif.php');
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<div class="container">
|
||||||
|
<div class="post_content">
|
||||||
|
<?php if(have_posts()): the_post(); ?>
|
||||||
|
<article class="post_box" id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||||
|
<h1><?php the_title(); ?></h1>
|
||||||
|
<?php the_content(); ?>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$mois = date('n');
|
||||||
|
$an = date('Y');
|
||||||
|
$image = $mois . '_' . $an . '.jpg';
|
||||||
|
$annee = $an;
|
||||||
|
|
||||||
|
// nom des fichiers: 7_2009.jpg et non pas 07_2009.jpg
|
||||||
|
|
||||||
|
for ($i = 0; $i <= 11 ; $i++) {
|
||||||
|
$a = ($mois - $i);
|
||||||
|
if ($a < 1) {
|
||||||
|
$a = (12 + $a);
|
||||||
|
$annee = $an - 1;
|
||||||
|
}
|
||||||
|
$tableau[$i] = $a . '_' . $annee . '.jpg';
|
||||||
|
}
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
while ($i < 13) {
|
||||||
|
$file = '../zenphoto/albums/photos-du-mois/' . $tableau[$i];
|
||||||
|
//echo $file;
|
||||||
|
|
||||||
|
if (file_exists($file)) {
|
||||||
|
//echo "<br />" ."file exist: " . $file;
|
||||||
|
// ../zenphoto/albums/photos-du-mois/4_2014.jpg
|
||||||
|
// 4_2014_800_watermark.jpg, 4_2014_FULL_watermark.jpg
|
||||||
|
$photo_du_mois = $file;
|
||||||
|
$title = $tableau[$i];
|
||||||
|
|
||||||
|
$size = getimagesize($photo_du_mois, $info);
|
||||||
|
//preprint($size);
|
||||||
|
|
||||||
|
if ($size[0] > 1000) {
|
||||||
|
// HD
|
||||||
|
$hd = '../../zenphoto/cache/photos-du-mois/' . substr($tableau[$i], 0, strlen($tableau[$i]) - 4) . "_FULL_watermark.jpg";
|
||||||
|
if (file_exists($hd)) {
|
||||||
|
$size_hd = getimagesize($hd, $info_hd);
|
||||||
|
$imgs['img_hd'] = array(
|
||||||
|
'url' => $hd,
|
||||||
|
'width' => $size_hd[0],
|
||||||
|
'height' => $size_hd[1]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$imgs['img_hd'] = array(
|
||||||
|
'url' => '../' . $photo_du_mois,
|
||||||
|
'width' => $size[0],
|
||||||
|
'height' => $size[1]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// SD
|
||||||
|
$sd = '../../zenphoto/cache/photos-du-mois/' . substr($tableau[$i], 0, strlen($tableau[$i]) - 4) . "_800_watermark.jpg";
|
||||||
|
if (file_exists($sd)) {
|
||||||
|
$size_sd = getimagesize($sd, $info_sd);
|
||||||
|
$imgs['img_sd'] = array(
|
||||||
|
'url' => $sd,
|
||||||
|
'width' => $size_sd[0],
|
||||||
|
'height' => $size_sd[1]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// SD
|
||||||
|
$sd = '../../zenphoto/cache/photos-du-mois/' . substr($tableau[$i], 0, strlen($tableau[$i]) - 4) . "_800_watermark.jpg";
|
||||||
|
if (file_exists($sd)) {
|
||||||
|
$size_sd = getimagesize($sd, $info_sd);
|
||||||
|
$imgs['img_sd'] = array(
|
||||||
|
'url' => $sd,
|
||||||
|
'width' => $size_sd[0],
|
||||||
|
'height' => $size_sd[1]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$imgs['img_hd'] = array(
|
||||||
|
'url' => "",
|
||||||
|
'width' => "",
|
||||||
|
'height' => ""
|
||||||
|
);
|
||||||
|
} // if ($size[0] > 1000)
|
||||||
|
|
||||||
|
$title = explode('.',$title);
|
||||||
|
$title = explode('_',$title[0]);
|
||||||
|
$title = mois2($title[0]) . ' ' . $title[1];
|
||||||
|
$imgs['img_sd']['title'] = $title;
|
||||||
|
|
||||||
|
if (isset($info["APP13"])) {
|
||||||
|
$iptc = iptcparse($info["APP13"]);
|
||||||
|
|
||||||
|
if (isset($iptc['2#120'][0])) $legende = $iptc['2#120'][0];
|
||||||
|
else $legende = "";
|
||||||
|
if (isset($iptc['2#005'][0])) $titre = $iptc['2#005'][0];
|
||||||
|
else $titre = "";
|
||||||
|
|
||||||
|
$keyword = "";
|
||||||
|
if (isset($iptc['2#025'])) {
|
||||||
|
foreach ($iptc['2#025'] as $key => $val) {
|
||||||
|
$keyword .= '<a href="' . $host . '/zenphoto/index.php?p=search&words=' . $val . '" title="Tag > ' . $val . '" rel="tag">' . $val . '</a>';
|
||||||
|
$keyword .= ', ';
|
||||||
|
}
|
||||||
|
$keyword = substr($keyword, 0, -2);
|
||||||
|
}
|
||||||
|
|
||||||
|
$imgs['img_sd']['legende'] = $legende;
|
||||||
|
$imgs['img_sd']['titre'] = $titre;
|
||||||
|
$imgs['img_sd']['keyword'] = $keyword;
|
||||||
|
}
|
||||||
|
|
||||||
|
$exifInfo = "";
|
||||||
|
$exif_array = read_exif_data_raw($file,0);
|
||||||
|
$exifInfo = __('The','CreatorThemeRes-child') . " " .date(__("F j, Y, g:i a",'CreatorThemeRes-child'),strtotime($exif_array['SubIFD']['DateTimeOriginal'])).' - ';
|
||||||
|
$exifInfo .= $exif_array['SubIFD']['ExposureTime']. __(' at ','CreatorThemeRes-child') .$exif_array['SubIFD']['FNumber'].' - ' .$exif_array['SubIFD']['ISOSpeedRatings'].' ISO - '. __('Focal','CreatorThemeRes-child') .$exif_array['SubIFD']['FocalLength'];
|
||||||
|
$imgs['img_sd']['exif'] = $exifInfo;
|
||||||
|
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
//preprint($imgs);
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="cadre">
|
||||||
|
|
||||||
|
<?php if (($imgs['img_sd']['titre'] != "") || ($imgs['img_sd']['legende'] != "")) { ?>
|
||||||
|
<p class="titrePhoto"><?php echo $imgs['img_sd']['titre']; ?>Titre</p>
|
||||||
|
<p class="legendePhoto"><?php echo $imgs['img_sd']['legende']; ?>Légende</p>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<!--img src="watermark2.php?src=<?php echo $photo_du_mois; ?>" alt="Image du mois" title="<?php echo $title; ?>" <?php echo $size[3]; ?> /-->
|
||||||
|
|
||||||
|
<!-- Retina -->
|
||||||
|
<?php
|
||||||
|
if (($imgs['img_sd']['url'] != "") && ($imgs['img_hd']['url'] != "")) {
|
||||||
|
$standard_source = $imgs['img_sd']['url'] . ', ' . $imgs['img_hd']['url'] . ' 2x';
|
||||||
|
//echo "1";
|
||||||
|
}
|
||||||
|
else if ($imgs['img_sd']['url'] != "") {
|
||||||
|
$standard_source = $imgs['img_sd']['url'];
|
||||||
|
//echo "2";
|
||||||
|
}
|
||||||
|
else if ($imgs['img_hd']['url'] != "") {
|
||||||
|
$standard_source = $imgs['img_hd']['url'] . ' 2x';
|
||||||
|
//echo "3";
|
||||||
|
}
|
||||||
|
//echo $standard_source;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<picture data-picture data-alt="">
|
||||||
|
<!--[if IE 9]><video style="display: none;"><![endif]-->
|
||||||
|
<source class="image_standard" srcset="<?php echo $standard_source; ?>">
|
||||||
|
<!--source class="image_medium" srcset="" media="(max-width: 767px)">
|
||||||
|
<source class="image_small" srcset="" media="(max-width: 767px)"-->
|
||||||
|
<!--[if IE 9]></video><![endif]-->
|
||||||
|
<?php
|
||||||
|
echo '<img srcset="' . $imgs['img_sd']['url'] . '" alt="" width="'. $imgs['img_sd']['width'] . '" height="'. $imgs['img_sd']['height'] .'" />';
|
||||||
|
?>
|
||||||
|
</picture>
|
||||||
|
|
||||||
|
<!-- /Retina -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php if (($imgs['img_sd']['titre'] != "") || ($imgs['img_sd']['legende'] != "")) { ?>
|
||||||
|
<p class="titrePhoto"><?php echo $imgs['img_sd']['titre']; ?>Titre</p>
|
||||||
|
<p class="legendePhoto"><?php echo $imgs['img_sd']['legende']; ?>Légende</p>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<p class="exifs"><?php echo $imgs['img_sd']['exif']; ?></p>
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$aide = "<span class='aide'> ? </span><b>Utilisation:</b> cliquer sur une vignette, puis....<br />";
|
||||||
|
$aide .= " <b><i>-sur ordinateur:</i></b> naviguer avec les touches flèches droite et gauche, quitter avec ESC.<br />";
|
||||||
|
$aide .= " <b><i>-sur tablettes et smartphones:</i></b> balayer l'écran avec un doigt vers la droite ou vers la gauche, ou naviguer avec les touches flèches droite et gauche. Cliquer sur la X pour quitter.";
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="archive">
|
||||||
|
<p style="clear: both; "></p>
|
||||||
|
<h4><?php echo gettext("Archives"); ?> (<abbr title="<?php echo $aide; ?>" rel="tooltip"> ? </abbr>)</h4>
|
||||||
|
<!--h4><?php echo gettext("Archives"); ?> <span class='aide'><a href="#" title="<?php echo $aide; ?>" class="tooltip"><span title="<?php echo gettext("Help"); ?>">( ? )</span></a></span></h4-->
|
||||||
|
|
||||||
|
<?php ?>
|
||||||
|
|
||||||
|
<div class="clear"></div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="loading-div"><img src="<?php echo get_stylesheet_directory_uri() . "/"; ?>ajax-loader.gif" ></div>
|
||||||
|
<div id="results"><!-- content will be loaded here --></div>
|
||||||
|
|
||||||
|
<div class="clear"></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="clear"></div>
|
||||||
|
<?php if ( comments_open() || '0' != get_comments_number() ) : ?>
|
||||||
|
<div class="home_blog_box">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<?php endif;
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
get_footer( 'page' );
|
||||||
|
?>
|
||||||
34
contact.php
Executable file
34
contact.php
Executable file
@@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Template Name: Contact
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty_Ten
|
||||||
|
* @since Twenty Ten 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
get_header();
|
||||||
|
?>
|
||||||
|
<div class="content">
|
||||||
|
<div class="container">
|
||||||
|
<div class="post_content">
|
||||||
|
<?php if(have_posts()): the_post(); ?>
|
||||||
|
<article class="post_box" id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||||
|
<h1><?php the_title(); ?></h1>
|
||||||
|
<?php the_content(); ?>
|
||||||
|
</article>
|
||||||
|
<div class="clear"></div>
|
||||||
|
<?php if ( comments_open() || '0' != get_comments_number() ) : ?>
|
||||||
|
<div class="home_blog_box">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<?php endif;
|
||||||
|
endif;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
get_footer( 'page' );
|
||||||
|
?>
|
||||||
310
fetch_pages.php
Executable file
310
fetch_pages.php
Executable file
@@ -0,0 +1,310 @@
|
|||||||
|
<?php
|
||||||
|
/* Title : Ajax Pagination with jQuery & PHP
|
||||||
|
Example URL : http://www.sanwebe.com/2013/03/ajax-pagination-with-jquery-php */
|
||||||
|
|
||||||
|
function preprint($s, $return=false) {
|
||||||
|
$x = "<pre>";
|
||||||
|
$x .= print_r($s, 1);
|
||||||
|
$x .= "</pre>";
|
||||||
|
if ($return) return $x;
|
||||||
|
else print $x;
|
||||||
|
}
|
||||||
|
|
||||||
|
function displayRetina ($filename,$album) {
|
||||||
|
// 6_2012.jpg
|
||||||
|
// 4_2014_180_thumb.jpg 4_2014_360_thumb.jpg
|
||||||
|
$path = "../../../../zenphoto/cache/" . $album . "/";
|
||||||
|
$file = explode(".", $filename);
|
||||||
|
|
||||||
|
//$a = $path . $filename;
|
||||||
|
//echo $a. "<br>";
|
||||||
|
|
||||||
|
$file_sd = $path . $file[0] . "_180_thumb.jpg";
|
||||||
|
$file_hd = $path . $file[0] . "_360_thumb.jpg";
|
||||||
|
/*
|
||||||
|
$file_sd = $path . $file[0] . "_180_watermark.jpg";
|
||||||
|
$file_hd = $path . $file[0] . "_360_watermark.jpg";
|
||||||
|
*/
|
||||||
|
//
|
||||||
|
$th_sd = false;
|
||||||
|
$th_hd = false;
|
||||||
|
|
||||||
|
if (file_exists($file_sd)) {
|
||||||
|
$th_sd = true;
|
||||||
|
$size_sd = getimagesize($file_sd, $info);
|
||||||
|
$thumb['sd'] = array(
|
||||||
|
'url' => "../" . $file_sd,
|
||||||
|
'width' => $size_sd[0],
|
||||||
|
'height' => $size_sd[1]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (file_exists($file_hd)) {
|
||||||
|
$th_hd = true;
|
||||||
|
$size_hd = getimagesize($file_hd, $info);
|
||||||
|
$thumb['hd'] = array(
|
||||||
|
'url' => "../" . $file_hd,
|
||||||
|
'width' => $size_hd[0],
|
||||||
|
'height' => $size_hd[1]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
//preprint($thumb);
|
||||||
|
|
||||||
|
if (($th_sd == true) && ($th_hd == true)) {
|
||||||
|
$standard = $thumb['sd']['url'] . ', ' . $thumb['hd']['url'] . ' 2x';
|
||||||
|
}
|
||||||
|
elseif ($th_sd == true) {
|
||||||
|
$standard = $thumb['sd']['url'];
|
||||||
|
}
|
||||||
|
elseif ($th_hd == true) {
|
||||||
|
$standard = $thumb['hd']['url'] . ' 2x';
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
$display = '<div class="album">';
|
||||||
|
$display .= '<div class="thumb">';
|
||||||
|
$display .= '<a href="../../zenphoto/albums/'.$album.'/'.$filename.'" title="'.date_archive($filename).'" class="wraptocenter swipebox" />';
|
||||||
|
|
||||||
|
$display .= '<picture data-picture data-alt="">';
|
||||||
|
$display .= '<!--[if IE 9]><video style="display: none;"><![endif]-->';
|
||||||
|
$display .= '<source class="image_standard" srcset="' . $standard . '">';
|
||||||
|
|
||||||
|
$display .= '<!--[if IE 9]></video><![endif]-->';
|
||||||
|
$display .= '<img srcset="' . $thumb['sd']['url'] . '" width="' . $thumb['sd']['width'] . '" height="' . $thumb['sd']['height'] . '"alt="">';
|
||||||
|
$display .= '</picture>';
|
||||||
|
|
||||||
|
$display .= '</a>';
|
||||||
|
$display .= '</div>';
|
||||||
|
$display .= '<div class="albumdesc">';
|
||||||
|
$display .= '<a href="../../zenphoto/index.php?album='.$album.'&image='.$filename.'" title= "'.date_archive($filename).'" class="" />';
|
||||||
|
$display .= '<span class="exif">'.date_archive($filename).'</span>';
|
||||||
|
$display .= '</a></div>';
|
||||||
|
$display .= '</div>';
|
||||||
|
*/
|
||||||
|
$display = '<div class="album">';
|
||||||
|
$display .= '<div class="thumb">';
|
||||||
|
$display .= '<picture data-picture data-alt="">';
|
||||||
|
$display .= '<source class="image_standard" srcset="' . $standard . '">';
|
||||||
|
$display .= '<img srcset="' . $thumb['sd']['url'] . '" width="' . $thumb['sd']['width'] . '" height="' . $thumb['sd']['height'] . '"alt="">';
|
||||||
|
$display .= '</picture>';
|
||||||
|
$display .= '</div>';
|
||||||
|
$display .= '<div class="albumdesc">';
|
||||||
|
$display .= '<span class="exif">';
|
||||||
|
$display .= '<a href="../../zenphoto/index.php?album='.$album.'&image='.$filename.'" title= "'.date_archive($filename).'" class="" />'.date_archive($filename).'</a>';
|
||||||
|
$display .= '</span></div>';
|
||||||
|
$display .= '</div>';
|
||||||
|
return $display;
|
||||||
|
}
|
||||||
|
|
||||||
|
function date_archive ($chaine) {
|
||||||
|
$pieces = explode(".", $chaine);
|
||||||
|
$b = explode("_", $pieces[0]);
|
||||||
|
$mois = $b[0];
|
||||||
|
$an = $b[1];
|
||||||
|
$chaine = mois2($mois) . ' '. $an;
|
||||||
|
return $chaine;
|
||||||
|
}
|
||||||
|
|
||||||
|
function mois2 ($mois) {
|
||||||
|
switch ($mois)
|
||||||
|
{
|
||||||
|
case 00:
|
||||||
|
$mois = "00";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
$mois = gettext('January');
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
$mois = gettext('February');
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
$mois = gettext('March');
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
$mois = gettext('April');
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
$mois = gettext('May');
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
$mois = gettext('June');
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
$mois = gettext('July');
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
$mois = gettext('August');
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
$mois = gettext('September');
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
$mois = gettext('October');
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
$mois = gettext('November');
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
$mois = gettext('December');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $mois;
|
||||||
|
}
|
||||||
|
|
||||||
|
//continue only if $_POST is set and it is a Ajax request
|
||||||
|
if(isset($_POST) && isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'){
|
||||||
|
|
||||||
|
//include("config.inc.php"); //include config file
|
||||||
|
//require_once($_SERVER['DOCUMENT_ROOT'].'/Connections/cnx.php');
|
||||||
|
$db_host = 'localhost';
|
||||||
|
$db_username = 'root';
|
||||||
|
$db_password = 'sncfp1p2';
|
||||||
|
$db_name = 'zenphoto';
|
||||||
|
$zptable = 'zenphoto';
|
||||||
|
|
||||||
|
$album = 'photos-du-mois'; //Photos du mois
|
||||||
|
$item_per_page = 12; //item to display per page
|
||||||
|
|
||||||
|
$table = array();
|
||||||
|
if ($_SERVER['HTTP_HOST'] == "macbook-pro.local") {
|
||||||
|
$table['images'] = ".images";
|
||||||
|
$table['albums'] = ".albums";
|
||||||
|
}
|
||||||
|
if ($_SERVER['HTTP_HOST'] == "clicclac.info") {
|
||||||
|
$table['images'] = "zenphoto_images";
|
||||||
|
$table['albums'] = "zenphoto_albums";
|
||||||
|
}
|
||||||
|
|
||||||
|
$mysqli = new mysqli($db_host, $db_username, $db_password, $db_name);
|
||||||
|
//Output any connection error
|
||||||
|
if ($mysqli->connect_error) {
|
||||||
|
die('Error : ('. $mysqli->connect_errno .') '. $mysqli->connect_error);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Récupérer l'ID de l'album 'photos-du-mois' ($id_album)
|
||||||
|
$i = 0;
|
||||||
|
$conn = new mysqli($db_host, $db_username, $db_password, $zptable);
|
||||||
|
if ($conn->connect_error) {
|
||||||
|
trigger_error('Database connection failed: ' . $conn->connect_error, E_USER_ERROR);
|
||||||
|
exit();
|
||||||
|
}
|
||||||
|
$conn->set_charset("utf8");
|
||||||
|
|
||||||
|
$excquery = "SELECT `id` FROM `" . $table['albums'] . "` WHERE `folder` = '" . $album . "'";
|
||||||
|
|
||||||
|
if ($result = $conn->query($excquery)) {
|
||||||
|
$result->data_seek(0);
|
||||||
|
$row = $result->fetch_row();
|
||||||
|
$id_album = $row[0];
|
||||||
|
$result->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
$conn->close();
|
||||||
|
|
||||||
|
|
||||||
|
//Get page number from Ajax POST
|
||||||
|
if(isset($_POST["page"])){
|
||||||
|
$page_number = filter_var($_POST["page"], FILTER_SANITIZE_NUMBER_INT, FILTER_FLAG_STRIP_HIGH); //filter number
|
||||||
|
if(!is_numeric($page_number)){die('Invalid page number!');} //incase of invalid page number
|
||||||
|
}else{
|
||||||
|
$page_number = 1; //if there's no page number, set it to 1
|
||||||
|
}
|
||||||
|
|
||||||
|
//get total number of records from database for pagination
|
||||||
|
//$results = $mysqli->query("SELECT COUNT(*) FROM paginate");
|
||||||
|
$results = $mysqli->query("SELECT COUNT(*) FROM `" . $table['images'] . "` WHERE `albumid` = $id_album ");
|
||||||
|
$get_total_rows = $results->fetch_row(); //hold total records in variable
|
||||||
|
|
||||||
|
//break records into pages
|
||||||
|
$total_pages = ceil($get_total_rows[0]/$item_per_page);
|
||||||
|
|
||||||
|
//get starting position to fetch the records
|
||||||
|
$page_position = (($page_number-1) * $item_per_page);
|
||||||
|
|
||||||
|
|
||||||
|
//Limit our results within a specified range.
|
||||||
|
$results = $mysqli->prepare("SELECT `filename` FROM `" . $table['images'] . "` WHERE `albumid` = ? ORDER BY `date` DESC LIMIT $page_position, $item_per_page");
|
||||||
|
$results->bind_param('i', $id_album);
|
||||||
|
$results->execute(); //Execute prepared Query
|
||||||
|
$results->bind_result($filename); //bind variables to prepared statement
|
||||||
|
|
||||||
|
//Display records fetched from database.
|
||||||
|
//echo '<ul class="contents">';
|
||||||
|
while($results->fetch()){ //fetch values
|
||||||
|
/*
|
||||||
|
echo '<li>';
|
||||||
|
echo $filename;
|
||||||
|
echo '</li>';
|
||||||
|
*/
|
||||||
|
|
||||||
|
echo displayRetina($filename,$album);
|
||||||
|
/*
|
||||||
|
if ($j <= count($fichier)-1) echo displayRetina($fichier[$j],$album);
|
||||||
|
if ($j+1 <= count($fichier)-1) echo displayRetina($fichier[$j+1],$album);
|
||||||
|
if ($j+2 <= count($fichier)-1) echo displayRetina($fichier[$j+2],$album);
|
||||||
|
|
||||||
|
//echo $fichier[$j];
|
||||||
|
|
||||||
|
$j = $j + 2;
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
//echo '</ul>';
|
||||||
|
|
||||||
|
echo '<div align="center" class="pagine">';
|
||||||
|
/* We call the pagination function here to generate Pagination link for us.
|
||||||
|
As you can see I have passed several parameters to the function. */
|
||||||
|
echo paginate_function($item_per_page, $page_number, $get_total_rows[0], $total_pages);
|
||||||
|
echo '</div>';
|
||||||
|
echo '<p style="clear: both; "></p>';
|
||||||
|
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
################ pagination function #########################################
|
||||||
|
function paginate_function($item_per_page, $current_page, $total_records, $total_pages)
|
||||||
|
{
|
||||||
|
$pagination = '';
|
||||||
|
if($total_pages > 0 && $total_pages != 1 && $current_page <= $total_pages){ //verify total pages and current page number
|
||||||
|
$pagination .= '<ul class="pagination">';
|
||||||
|
|
||||||
|
$right_links = $current_page + 3;
|
||||||
|
$previous = $current_page - 3; //previous link
|
||||||
|
$next = $current_page + 1; //next link
|
||||||
|
$first_link = true; //boolean var to decide our first link
|
||||||
|
|
||||||
|
if($current_page > 1){
|
||||||
|
$previous_link = ($previous==0)? 1: $previous;
|
||||||
|
$pagination .= '<li class="first"><a href="#" data-page="1" title="First">«</a></li>'; //first link
|
||||||
|
$pagination .= '<li><a href="#" data-page="'.$previous_link.'" title="Previous"><</a></li>'; //previous link
|
||||||
|
for($i = ($current_page-2); $i < $current_page; $i++){ //Create left-hand side links
|
||||||
|
if($i > 0){
|
||||||
|
$pagination .= '<li><a href="#" data-page="'.$i.'" title="Page'.$i.'">'.$i.'</a></li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$first_link = false; //set first link to false
|
||||||
|
}
|
||||||
|
|
||||||
|
if($first_link){ //if current active page is first link
|
||||||
|
$pagination .= '<li class="first active">'.$current_page.'</li>';
|
||||||
|
}elseif($current_page == $total_pages){ //if it's the last active link
|
||||||
|
$pagination .= '<li class="last active">'.$current_page.'</li>';
|
||||||
|
}else{ //regular current link
|
||||||
|
$pagination .= '<li class="active">'.$current_page.'</li>';
|
||||||
|
}
|
||||||
|
|
||||||
|
for($i = $current_page+1; $i < $right_links ; $i++){ //create right-hand side links
|
||||||
|
if($i<=$total_pages){
|
||||||
|
$pagination .= '<li><a href="#" data-page="'.$i.'" title="Page '.$i.'">'.$i.'</a></li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($current_page < $total_pages){
|
||||||
|
$next_link = ($i > $total_pages) ? $total_pages : $i;
|
||||||
|
$pagination .= '<li><a href="#" data-page="'.$next_link.'" title="Next">></a></li>'; //next link
|
||||||
|
$pagination .= '<li class="last"><a href="#" data-page="'.$total_pages.'" title="Last">»</a></li>'; //last link
|
||||||
|
}
|
||||||
|
|
||||||
|
$pagination .= '</ul>';
|
||||||
|
}
|
||||||
|
return $pagination; //return pagination links
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
13
footer-page.php
Executable file
13
footer-page.php
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
<footer id="foot">
|
||||||
|
<div class="bottom-foot">
|
||||||
|
<div class="container">
|
||||||
|
<div class="copyright">
|
||||||
|
<p class="credits"><?php echo ( dess_setting('dess_copyright') !='' ? dess_setting('dess_copyright') : __('2016 Copyright. Powered by WordPress','creator') ); ?></p>
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
<?php wp_footer(); ?>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
199
functions.php
199
functions.php
@@ -68,6 +68,23 @@ function RelativeTime() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getRandomFile($start_dir) {
|
||||||
|
|
||||||
|
chdir($start_dir);
|
||||||
|
$dir = opendir('.');
|
||||||
|
while (($myfile = readdir($dir)) !==false) {
|
||||||
|
if ($myfile != '.' && $myfile != '..' && is_file($myfile) && $myfile != 'resource.frk') {
|
||||||
|
$files[] = $myfile;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($dir);
|
||||||
|
chdir('../');
|
||||||
|
srand ((float) microtime() * 10000000);
|
||||||
|
$file = array_rand($files);
|
||||||
|
return $files[$file];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function preprint($s, $return=false) {
|
function preprint($s, $return=false) {
|
||||||
$x = "<pre>";
|
$x = "<pre>";
|
||||||
$x .= print_r($s, 1);
|
$x .= print_r($s, 1);
|
||||||
@@ -76,4 +93,186 @@ function preprint($s, $return=false) {
|
|||||||
else print $x;
|
else print $x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* photo du mois */
|
||||||
|
|
||||||
|
function exif_date($date,$apn) {
|
||||||
|
//'Model' => string 'Canon EOS 50D' (length=13)
|
||||||
|
//50D: 'DateTimeOriginal' => string '2009:12:05 12:42:33' (length=19)
|
||||||
|
|
||||||
|
//'Model' => string 'Canon EOS 7D' (length=12)
|
||||||
|
//7D: DateTimeOriginal' => string '2010-02-20T15:07:05.24+01:00' (length=28)
|
||||||
|
|
||||||
|
// -> 50D
|
||||||
|
if (!preg_match("/7D/", $apn)) {
|
||||||
|
$pieces = explode(' ', $date);
|
||||||
|
list($yy, $mm, $dd) = explode(':', $pieces[0]);
|
||||||
|
list($hh, $min, $ss) = explode(':', $pieces[1]);
|
||||||
|
}
|
||||||
|
// 7D
|
||||||
|
else {
|
||||||
|
$pieces = explode('T', $date);
|
||||||
|
list($yy, $mm, $dd) = explode('-', $pieces[0]);
|
||||||
|
$pieces_h = explode('.', $pieces[1]);
|
||||||
|
list($hh, $min, $ss) = explode(':', $pieces_h[0]);
|
||||||
|
}
|
||||||
|
$timestamp = mktime((int) $hh, (int) $min, (int) $ss, (int) $mm, (int) $dd, (int) $yy, '-1');
|
||||||
|
$date = date('d.m.Y à H:i',$timestamp);
|
||||||
|
return $date;
|
||||||
|
}
|
||||||
|
function mois2 ($mois) {
|
||||||
|
switch ($mois)
|
||||||
|
{
|
||||||
|
case 00:
|
||||||
|
$mois = "00";
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
$mois = __('January','CreatorThemeRes-child');
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
$mois = __('February','CreatorThemeRes-child');
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
$mois = __('March','CreatorThemeRes-child');
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
$mois = __('April','CreatorThemeRes-child');
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
$mois = __('May','CreatorThemeRes-child');
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
$mois = __('June','CreatorThemeRes-child');
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
$mois = __('July','CreatorThemeRes-child');
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
$mois = __('August','CreatorThemeRes-child');
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
$mois = __('September','CreatorThemeRes-child');
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
$mois = __('October','CreatorThemeRes-child');
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
$mois = __('November','CreatorThemeRes-child');
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
$mois = __('December','CreatorThemeRes-child');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $mois;
|
||||||
|
}
|
||||||
|
|
||||||
|
function display ($filename,$album) {
|
||||||
|
$display = '<div class="album">'.
|
||||||
|
'<div class="thumb">' .
|
||||||
|
'<a href="../zenphoto/albums/'.$album.'/'.$filename.'" title="'.date_archive($filename).'" class="wraptocenter swipebox" />'.
|
||||||
|
'<img src="../zenphoto/zp-core/i.php?a='.$album.'&i='.$filename.'&s=180" class="img_archive" />'.
|
||||||
|
'</a>'.
|
||||||
|
'</div>'.
|
||||||
|
'<div class="albumdesc">'.
|
||||||
|
'<a href="../zenphoto/index.php?album='.$album.'&image='.$filename.'" title= "'.date_archive($filename).'" class="" />'.
|
||||||
|
'<span class="exif">'.date_archive($filename).'</span>'.
|
||||||
|
'</a></div>'.
|
||||||
|
'</div>';
|
||||||
|
return $display;
|
||||||
|
}
|
||||||
|
|
||||||
|
function displayRetina ($filename,$album) {
|
||||||
|
// 6_2012.jpg
|
||||||
|
// 4_2014_180_thumb.jpg 4_2014_360_thumb.jpg
|
||||||
|
$path = "../zenphoto/cache/" . $album . "/";
|
||||||
|
$file = explode(".", $filename);
|
||||||
|
|
||||||
|
//$a = $path . $filename;
|
||||||
|
//echo $a. "<br>";
|
||||||
|
|
||||||
|
$file_sd = $path . $file[0] . "_180_thumb.jpg";
|
||||||
|
$file_hd = $path . $file[0] . "_360_thumb.jpg";
|
||||||
|
/*
|
||||||
|
$file_sd = $path . $file[0] . "_180_watermark.jpg";
|
||||||
|
$file_hd = $path . $file[0] . "_360_watermark.jpg";
|
||||||
|
*/
|
||||||
|
//
|
||||||
|
$th_sd = false;
|
||||||
|
$th_hd = false;
|
||||||
|
|
||||||
|
if (file_exists($file_sd)) {
|
||||||
|
$th_sd = true;
|
||||||
|
$size_sd = getimagesize($file_sd, $info);
|
||||||
|
$thumb['sd'] = array(
|
||||||
|
'url' => "../" . $file_sd,
|
||||||
|
'width' => $size_sd[0],
|
||||||
|
'height' => $size_sd[1]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (file_exists($file_hd)) {
|
||||||
|
$th_hd = true;
|
||||||
|
$size_hd = getimagesize($file_hd, $info);
|
||||||
|
$thumb['hd'] = array(
|
||||||
|
'url' => "../" . $file_hd,
|
||||||
|
'width' => $size_hd[0],
|
||||||
|
'height' => $size_hd[1]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
//preprint($thumb);
|
||||||
|
|
||||||
|
if (($th_sd == true) && ($th_hd == true)) {
|
||||||
|
$standard = $thumb['sd']['url'] . ', ' . $thumb['hd']['url'] . ' 2x';
|
||||||
|
}
|
||||||
|
elseif ($th_sd == true) {
|
||||||
|
$standard = $thumb['sd']['url'];
|
||||||
|
}
|
||||||
|
elseif ($th_hd == true) {
|
||||||
|
$standard = $thumb['hd']['url'] . ' 2x';
|
||||||
|
}
|
||||||
|
|
||||||
|
$display = '<div class="album">';
|
||||||
|
$display .= '<div class="thumb">';
|
||||||
|
$display .= '<a href="../../zenphoto/albums/'.$album.'/'.$filename.'" title="'.date_archive($filename).'" class="wraptocenter swipebox" />';
|
||||||
|
|
||||||
|
$display .= '<picture data-picture data-alt="">';
|
||||||
|
$display .= '<!--[if IE 9]><video style="display: none;"><![endif]-->';
|
||||||
|
$display .= '<source class="image_standard" srcset="' . $standard . '">';
|
||||||
|
|
||||||
|
//$display .= '<img src="../zenphoto/zp-core/i.php?a='.$album.'&i='.$filename.'&s=180" class="img_archive" />';
|
||||||
|
|
||||||
|
$display .= '<!--[if IE 9]></video><![endif]-->';
|
||||||
|
$display .= '<img srcset="' . $thumb['sd']['url'] . '" width="' . $thumb['sd']['width'] . '" height="' . $thumb['sd']['height'] . '"alt="">';
|
||||||
|
$display .= '</picture>';
|
||||||
|
|
||||||
|
$display .= '</a>';
|
||||||
|
$display .= '</div>';
|
||||||
|
$display .= '<div class="albumdesc">';
|
||||||
|
$display .= '<a href="../../zenphoto/index.php?album='.$album.'&image='.$filename.'" title= "'.date_archive($filename).'" class="" />';
|
||||||
|
$display .= '<span class="exif">'.date_archive($filename).'</span>';
|
||||||
|
$display .= '</a></div>';
|
||||||
|
$display .= '</div>';
|
||||||
|
return $display;
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_image_title ($photo) {
|
||||||
|
$photo = '../zenphoto/albums/photos-du-mois/' . $photo;
|
||||||
|
$size = getimagesize($photo, $info);
|
||||||
|
if (isset($info["APP13"])) {
|
||||||
|
$iptc = iptcparse($info["APP13"]);
|
||||||
|
//print_r($iptc);
|
||||||
|
$caption = isset($iptc['2#120'][0]);
|
||||||
|
$graphic_name = isset($iptc['2#005'][0]);
|
||||||
|
}
|
||||||
|
return $caption;
|
||||||
|
}
|
||||||
|
|
||||||
|
function date_archive ($chaine) {
|
||||||
|
$pieces = explode(".", $chaine);
|
||||||
|
$b = explode("_", $pieces[0]);
|
||||||
|
$mois = $b[0];
|
||||||
|
$an = $b[1];
|
||||||
|
$chaine = mois2($mois) . ' '. $an;
|
||||||
|
return $chaine;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
96
header.php
Executable file
96
header.php
Executable file
@@ -0,0 +1,96 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html <?php language_attributes(); ?>>
|
||||||
|
<head>
|
||||||
|
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<?php wp_head(); ?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function() {
|
||||||
|
var fetch = '<?php echo get_stylesheet_directory_uri() . "/fetch_pages.php" ?>'
|
||||||
|
$("#results" ).load( fetch ); //load initial records
|
||||||
|
// $_SERVER['REQUEST_URI']
|
||||||
|
|
||||||
|
//executes code below when user click on pagination links
|
||||||
|
$("#results").on( "click", ".pagination a", function (e){
|
||||||
|
e.preventDefault();
|
||||||
|
$(".loading-div").show(); //show loading element
|
||||||
|
var page = $(this).attr("data-page"); //get page number from link
|
||||||
|
$("#results").load( fetch ,{"page":page}, function(){ //get content from PHP page
|
||||||
|
$(".loading-div").hide(); //once done, hide loading element
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style type="text/css">
|
||||||
|
/*found on http://www.brunildo.org/test/img_center.html*/
|
||||||
|
.wraptocenter {
|
||||||
|
display: table-cell!important;
|
||||||
|
text-align: center!important;
|
||||||
|
vertical-align: middle!important;
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
.wraptocenter * {
|
||||||
|
vertical-align: middle!important;
|
||||||
|
}
|
||||||
|
/*\*//*/
|
||||||
|
.wraptocenter {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.wraptocenter span {
|
||||||
|
display: inline-block;
|
||||||
|
height: 100%;
|
||||||
|
width: 1px;
|
||||||
|
}
|
||||||
|
/**/
|
||||||
|
</style>
|
||||||
|
<!--[if IE]><style>
|
||||||
|
.wraptocenter span {
|
||||||
|
display: inline-block;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style><![endif]-->
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body <?php body_class(); ?>>
|
||||||
|
<header id="head">
|
||||||
|
<div class="top-area">
|
||||||
|
<div class="container">
|
||||||
|
<div class="head-details">
|
||||||
|
<?php
|
||||||
|
echo (dess_setting('dess_tel') != '' ? __('Tel: ','creator').'<a href="tel:'.dess_setting('dess_tel').'">'. dess_setting('dess_tel').'</a>' : '');
|
||||||
|
echo (dess_setting('dess_email') != '' ? ' | '.__('Email: ','creator').'<a href="mailto:'.dess_setting('dess_email').'">'. dess_setting('dess_email').'</a>' : '');
|
||||||
|
echo (dess_setting('dess_hoursup') != '' ? ' | '.dess_setting('dess_hoursup') : '');
|
||||||
|
?>
|
||||||
|
</div><!-- head-details -->
|
||||||
|
<div class="head-socials">
|
||||||
|
<ul>
|
||||||
|
<?php
|
||||||
|
$socials = array('twitter','facebook','google-plus','instagram','pinterest','vimeo','youtube','linkedin');
|
||||||
|
for($i=0;$i<count($socials);$i++){
|
||||||
|
$url = '';
|
||||||
|
$s = $socials[$i];
|
||||||
|
$url = dess_setting('dess_'.$s);
|
||||||
|
echo ($url != '' ? '<li><a target="_blank" href="'.$url.'"><img src="'.esc_url( get_stylesheet_directory_uri() ).'/images/'.$s.'-icon.png" alt="'.$s.'" /></a></li>':'');
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</div><!-- head-socials -->
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div><!-- container -->
|
||||||
|
</div><!-- top-area -->
|
||||||
|
<div class="head-area">
|
||||||
|
<div class="container">
|
||||||
|
<div class="logo">
|
||||||
|
<?php echo (dess_setting('dess_logo') != '' ? '<a href="'.home_url().'"><img src="'.dess_setting('dess_logo').'" alt="logo" /></a>': '<a href="'.home_url().'"><img src="'.esc_url( get_stylesheet_directory_uri() ).'/images/logo.png" alt="logo" /></a>'); ?>
|
||||||
|
</div><!-- logo -->
|
||||||
|
<div class="head-nav">
|
||||||
|
<?php wp_nav_menu(array('theme_location' => 'header-menu')); ?>
|
||||||
|
</div><!-- head-nav -->
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div><!-- container -->
|
||||||
|
</div><!-- head-area -->
|
||||||
|
|
||||||
|
</header>
|
||||||
Binary file not shown.
@@ -1,8 +1,8 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Creator Responsive WordPress Theme Child\n"
|
"Project-Id-Version: Creator Responsive WordPress Theme Child\n"
|
||||||
"POT-Creation-Date: 2016-12-09 15:44+0100\n"
|
"POT-Creation-Date: 2016-12-26 11:11+0100\n"
|
||||||
"PO-Revision-Date: 2016-12-09 15:44+0100\n"
|
"PO-Revision-Date: 2016-12-26 11:12+0100\n"
|
||||||
"Last-Translator: Bruno <bruno@clicclac.info>\n"
|
"Last-Translator: Bruno <bruno@clicclac.info>\n"
|
||||||
"Language-Team: Bruno <bruno@clicclac.info>\n"
|
"Language-Team: Bruno <bruno@clicclac.info>\n"
|
||||||
"Language: fr_FR\n"
|
"Language: fr_FR\n"
|
||||||
@@ -20,7 +20,19 @@ msgstr ""
|
|||||||
"X-Poedit-SearchPath-0: .\n"
|
"X-Poedit-SearchPath-0: .\n"
|
||||||
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
||||||
|
|
||||||
#: accueil.php:178
|
#: accueil.php:42
|
||||||
|
msgid "Previous"
|
||||||
|
msgstr "Précédent"
|
||||||
|
|
||||||
|
#: accueil.php:43
|
||||||
|
msgid "Next"
|
||||||
|
msgstr "Suivant"
|
||||||
|
|
||||||
|
#: accueil.php:51
|
||||||
|
msgid "Portfolio"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: accueil.php:178 index.php:167 tpl-blog.php:45
|
||||||
msgid "Read More"
|
msgid "Read More"
|
||||||
msgstr "Lire la suite"
|
msgstr "Lire la suite"
|
||||||
|
|
||||||
@@ -32,6 +44,54 @@ msgstr "Lire plus d'entrées de blog..."
|
|||||||
msgid "Sorry, no posts found."
|
msgid "Sorry, no posts found."
|
||||||
msgstr "Désolé, aucun post trouvé."
|
msgstr "Désolé, aucun post trouvé."
|
||||||
|
|
||||||
|
#: ce-mois.php:140
|
||||||
|
msgid "The"
|
||||||
|
msgstr "Le"
|
||||||
|
|
||||||
|
#: ce-mois.php:140
|
||||||
|
msgid "F j, Y, g:i a"
|
||||||
|
msgstr "d.m.Y à H:i"
|
||||||
|
|
||||||
|
#: ce-mois.php:142
|
||||||
|
msgid " at "
|
||||||
|
msgstr " à "
|
||||||
|
|
||||||
|
#: ce-mois.php:142
|
||||||
|
msgid "Focal"
|
||||||
|
msgstr "Focale "
|
||||||
|
|
||||||
|
#: ce-mois.php:288 ce-mois.php:289
|
||||||
|
msgid "Archives"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ce-mois.php:289
|
||||||
|
msgid "Help"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ce-mois.php:334
|
||||||
|
msgid "Previous Page"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ce-mois.php:334
|
||||||
|
msgid "prev"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ce-mois.php:337
|
||||||
|
msgid "Page"
|
||||||
|
msgstr "Page"
|
||||||
|
|
||||||
|
#: ce-mois.php:343
|
||||||
|
msgid "Next Page"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ce-mois.php:343
|
||||||
|
msgid "next"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: footer-page.php:5
|
||||||
|
msgid "2016 Copyright. Powered by WordPress"
|
||||||
|
msgstr "2016 Copyright. Propulsé par WordPress"
|
||||||
|
|
||||||
#: functions.php:48
|
#: functions.php:48
|
||||||
msgid "yesterday"
|
msgid "yesterday"
|
||||||
msgstr "hier"
|
msgstr "hier"
|
||||||
@@ -59,6 +119,72 @@ msgstr "il y a %1$s semaine"
|
|||||||
msgid "%1$s weeks ago"
|
msgid "%1$s weeks ago"
|
||||||
msgstr "il y a %1$s semaines"
|
msgstr "il y a %1$s semaines"
|
||||||
|
|
||||||
|
#: functions.php:130
|
||||||
|
msgid "January"
|
||||||
|
msgstr "Janvier"
|
||||||
|
|
||||||
|
#: functions.php:133
|
||||||
|
msgid "February"
|
||||||
|
msgstr "Février"
|
||||||
|
|
||||||
|
#: functions.php:136
|
||||||
|
msgid "March"
|
||||||
|
msgstr "Mars"
|
||||||
|
|
||||||
|
#: functions.php:139
|
||||||
|
msgid "April"
|
||||||
|
msgstr "Avril"
|
||||||
|
|
||||||
|
#: functions.php:142
|
||||||
|
msgid "May"
|
||||||
|
msgstr "Mai"
|
||||||
|
|
||||||
|
#: functions.php:145
|
||||||
|
msgid "June"
|
||||||
|
msgstr "Juin"
|
||||||
|
|
||||||
|
#: functions.php:148
|
||||||
|
msgid "July"
|
||||||
|
msgstr "Juillet"
|
||||||
|
|
||||||
|
#: functions.php:151
|
||||||
|
msgid "August"
|
||||||
|
msgstr "Aout"
|
||||||
|
|
||||||
|
#: functions.php:154
|
||||||
|
msgid "September"
|
||||||
|
msgstr "Septembre"
|
||||||
|
|
||||||
|
#: functions.php:157
|
||||||
|
msgid "October"
|
||||||
|
msgstr "Octobre"
|
||||||
|
|
||||||
|
#: functions.php:160
|
||||||
|
msgid "November"
|
||||||
|
msgstr "Novembre"
|
||||||
|
|
||||||
|
#: functions.php:163
|
||||||
|
msgid "December"
|
||||||
|
msgstr "Décembre"
|
||||||
|
|
||||||
|
#: header.php:14
|
||||||
|
msgid "Tel: "
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: header.php:15
|
||||||
|
msgid "Email: "
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: livre-d-or.php:30
|
||||||
|
msgid "Pages"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: tpl-blog.php:66
|
||||||
|
msgid ""
|
||||||
|
"Sorry, no blog posts found. Please create a post and assign it in \"blog\" "
|
||||||
|
"category."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. Theme Name of the plugin/theme
|
#. Theme Name of the plugin/theme
|
||||||
msgid "Creator Responsive WordPress Theme Child"
|
msgid "Creator Responsive WordPress Theme Child"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@@ -80,3 +206,6 @@ msgstr ""
|
|||||||
#. Author URI of the plugin/theme
|
#. Author URI of the plugin/theme
|
||||||
msgid "http://dessign.net"
|
msgid "http://dessign.net"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#~ msgid "Focal "
|
||||||
|
#~ msgstr "Focale "
|
||||||
|
|||||||
57
livre-d-or.php
Executable file
57
livre-d-or.php
Executable file
@@ -0,0 +1,57 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Template Name: Guestbook
|
||||||
|
*
|
||||||
|
* @package WordPress
|
||||||
|
* @subpackage Twenty_Ten
|
||||||
|
* @since Twenty Ten 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
get_header(); ?>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<div class="container">
|
||||||
|
<div class="post_content">
|
||||||
|
<?php while ( have_posts() ) : the_post(); ?>
|
||||||
|
<article class="post_box" id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||||
|
<h1><?php the_title(); ?></h1>
|
||||||
|
<?php the_content(); ?>
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$imagesDir = '../zenphoto/albums/photos-du-mois';
|
||||||
|
$imageURL = getRandomFile($imagesDir);
|
||||||
|
$RandomImage = '../' . $imagesDir . '/' . $imageURL;
|
||||||
|
echo '<div id="randomImg"><img src="' . $RandomImage . '" alt="" title="" /></div>';
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
wp_link_pages(array(
|
||||||
|
'before' => '<div class="link_pages">'.__('Pages', 'creator'),
|
||||||
|
'after' => '</div>',
|
||||||
|
'link_before' => '<span>',
|
||||||
|
'link_after' => '</span>'
|
||||||
|
));
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php the_tags( '<div class="post_tags">Tags: ', ', ', '</div>' ); ?>
|
||||||
|
</article>
|
||||||
|
<div class="clear"><br /></div>
|
||||||
|
<?php if ( comments_open() || '0' != get_comments_number() ) : ?>
|
||||||
|
<div class="home_blog_box">
|
||||||
|
<div class="comments_cont">
|
||||||
|
<?php
|
||||||
|
// If comments are open or we have at least one comment, load up the comment template
|
||||||
|
comments_template( '', true );
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php endif;
|
||||||
|
endwhile;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
get_footer( 'page' );
|
||||||
|
?>
|
||||||
183
style.css
183
style.css
@@ -25,3 +25,186 @@ Text Domain: CreatorThemeRes-child
|
|||||||
.featured-box {
|
.featured-box {
|
||||||
/*border: thin solid #ff6231;*/
|
/*border: thin solid #ff6231;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* livre d'or */
|
||||||
|
|
||||||
|
#randomImg {
|
||||||
|
margin-right: auto;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#randomImg img {
|
||||||
|
padding: 10px;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #818181;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-left: auto;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* photo du mois */
|
||||||
|
|
||||||
|
.cadre {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 1em;
|
||||||
|
}
|
||||||
|
.cadre img {
|
||||||
|
padding: 50px;
|
||||||
|
background-color: #fff;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.exifs {
|
||||||
|
text-align: center;
|
||||||
|
color: #909090;
|
||||||
|
font-size: smaller;
|
||||||
|
margin-bottom: 3em;
|
||||||
|
margin-top: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.thumb {
|
||||||
|
/*float: left;
|
||||||
|
line-height: 200px;*/
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
/**/
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.albumdesc {
|
||||||
|
float: right;
|
||||||
|
text-align:center;
|
||||||
|
width: 200px;
|
||||||
|
padding: 6px 0 0 0;
|
||||||
|
text-align:center;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination {
|
||||||
|
margin-top: 4em;
|
||||||
|
margin-bottom: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.albumdesc a, .pagination a {
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gras {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.albumdesc:hover {
|
||||||
|
/*
|
||||||
|
background: #ddd;
|
||||||
|
color: #333 !important;
|
||||||
|
border-radius: 0;
|
||||||
|
*/
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.album {
|
||||||
|
float: left;
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
text-align:center;
|
||||||
|
margin-top: 0;
|
||||||
|
margin-right: auto;
|
||||||
|
/* entre 2 rangées d'albums */
|
||||||
|
margin-bottom: 25px;
|
||||||
|
margin-left: auto;
|
||||||
|
padding: 0px 11px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*found on http://www.brunildo.org/test/img_center.html*/
|
||||||
|
.wraptocenter {
|
||||||
|
display: table-cell!important;
|
||||||
|
text-align: center!important;
|
||||||
|
vertical-align: middle!important;
|
||||||
|
width: 200px;
|
||||||
|
height: 200px;
|
||||||
|
}
|
||||||
|
.wraptocenter * {
|
||||||
|
vertical-align: middle!important;
|
||||||
|
}
|
||||||
|
/*\*//*/
|
||||||
|
.wraptocenter {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.wraptocenter span {
|
||||||
|
display: inline-block;
|
||||||
|
height: 100%;
|
||||||
|
width: 1px;
|
||||||
|
}
|
||||||
|
/**/
|
||||||
|
</style>
|
||||||
|
<!--[if IE]><style>
|
||||||
|
.wraptocenter span {
|
||||||
|
display: inline-block;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style><![endif]-->
|
||||||
|
|
||||||
|
/*
|
||||||
|
.contents{
|
||||||
|
margin: 20px;
|
||||||
|
padding: 20px;
|
||||||
|
list-style: none;
|
||||||
|
background: #F9F9F9;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
.contents li{
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
.loading-div{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: rgba(0, 0, 0, 0.56);
|
||||||
|
z-index: 999;
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
.loading-div img {
|
||||||
|
margin-top: 20%;
|
||||||
|
margin-left: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Pagination style */
|
||||||
|
.pagination{margin:0;padding:0;}
|
||||||
|
.pagination li{
|
||||||
|
display: inline;
|
||||||
|
padding: 6px 10px 6px 10px;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
margin-right: -1px;
|
||||||
|
font: 15px/20px Arial, Helvetica, sans-serif;
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: inset 1px 1px 5px #F4F4F4;
|
||||||
|
}
|
||||||
|
.pagination li a{
|
||||||
|
text-decoration:none;
|
||||||
|
color: rgb(89, 141, 235);
|
||||||
|
}
|
||||||
|
.pagination li.first {
|
||||||
|
border-radius: 5px 0px 0px 5px;
|
||||||
|
}
|
||||||
|
.pagination li.last {
|
||||||
|
border-radius: 0px 5px 5px 0px;
|
||||||
|
}
|
||||||
|
.pagination li:hover{
|
||||||
|
background: #CFF;
|
||||||
|
}
|
||||||
|
.pagination li.active{
|
||||||
|
background: #F0F0F0;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.pagine {
|
||||||
|
clear: both;
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user