Bonjour Bernard,
Penses-tu que ce fichier psd soit vraiment nécessaire ?
b_b
2009/5/2 <bernard.blazin@free.fr>:
Author: bernard.blazin@free.fr
Date: Sat May 2 10:25:05 2009
New Revision: 28338Log:
plugin photos en essaiAdded:
_plugins_/_test_/photos/
_plugins_/_test_/photos/balise/
_plugins_/_test_/photos/balise/formulaire_photos.php
_plugins_/_test_/photos/base/
_plugins_/_test_/photos/base/photos.php
_plugins_/_test_/photos/base/photos_gestion.php
_plugins_/_test_/photos/css/
_plugins_/_test_/photos/css/highslide.css
_plugins_/_test_/photos/exec/
_plugins_/_test_/photos/exec/editer_photo.php
_plugins_/_test_/photos/exec/effacer_photo.php
_plugins_/_test_/photos/exec/photos.php
_plugins_/_test_/photos/formulaires/
_plugins_/_test_/photos/formulaires/formulaire_photos.html
_plugins_/_test_/photos/graphics/
_plugins_/_test_/photos/graphics/close.png (with props)
_plugins_/_test_/photos/graphics/closeX.png (with props)
_plugins_/_test_/photos/graphics/controlbar-black-border.gif (with props)
_plugins_/_test_/photos/graphics/controlbar-text-buttons.png (with props)
_plugins_/_test_/photos/graphics/controlbar-white-small.gif (with props)
_plugins_/_test_/photos/graphics/controlbar-white.gif (with props)
_plugins_/_test_/photos/graphics/controlbar2.gif (with props)
_plugins_/_test_/photos/graphics/controlbar3.gif (with props)
_plugins_/_test_/photos/graphics/controlbar4-hover.gif (with props)
_plugins_/_test_/photos/graphics/controlbar4.gif (with props)
_plugins_/_test_/photos/graphics/fullexpand.gif (with props)
_plugins_/_test_/photos/graphics/geckodimmer.png (with props)
_plugins_/_test_/photos/graphics/icon.gif (with props)
_plugins_/_test_/photos/graphics/loader.gif (with props)
_plugins_/_test_/photos/graphics/loader.white.gif (with props)
_plugins_/_test_/photos/graphics/loader.white0.gif (with props)
_plugins_/_test_/photos/graphics/outlines/
_plugins_/_test_/photos/graphics/outlines/Outlines.psd (with props)
_plugins_/_test_/photos/graphics/outlines/beveled.png (with props)
_plugins_/_test_/photos/graphics/outlines/drop-shadow.png (with props)
_plugins_/_test_/photos/graphics/outlines/glossy-dark.png (with props)
_plugins_/_test_/photos/graphics/outlines/outer-glow.png (with props)
_plugins_/_test_/photos/graphics/outlines/rounded-black.png (with props)
_plugins_/_test_/photos/graphics/outlines/rounded-white.png (with props)
_plugins_/_test_/photos/graphics/resize.gif (with props)
_plugins_/_test_/photos/graphics/scrollarrows.png (with props)
_plugins_/_test_/photos/graphics/zoomin.cur (with props)
_plugins_/_test_/photos/graphics/zoomout.cur (with props)
_plugins_/_test_/photos/img_pack/
_plugins_/_test_/photos/img_pack/clap.png (with props)
_plugins_/_test_/photos/img_pack/corbeille.gif (with props)
_plugins_/_test_/photos/img_pack/icon_coche.png (with props)
_plugins_/_test_/photos/img_pack/photos.png (with props)
_plugins_/_test_/photos/img_pack/repondre.gif (with props)
_plugins_/_test_/photos/js/
_plugins_/_test_/photos/js/highslide-full.js
_plugins_/_test_/photos/js/highslide-ie6.css
_plugins_/_test_/photos/lang/
_plugins_/_test_/photos/lang/photo_fr.php
_plugins_/_test_/photos/photos_pipelines.php
_plugins_/_test_/photos/plugin.xml
_plugins_/_test_/photos/vignettes/
_plugins_/_test_/photos/vignettes/nature.jpg (with props)Added: _plugins_/_test_/photos/balise/formulaire_photos.php
--- _plugins_/_test_/photos/balise/formulaire_photos.php (added)
+++ _plugins_/_test_/photos/balise/formulaire_photos.php Sat May 2 10:25:05 2009
@@ -0,0 +1,67 @@
+<?php
+
+if (!defined("_ECRIRE_INC_VERSION")) return;
+function balise_FORMULAIRE_PHOTOS($p) {
+ return calculer_balise_dynamique($p, 'FORMULAIRE_PHOTOS', array());
+
+}
+
+function balise_FORMULAIRE_PHOTOS_dyn() {
+return array('formulaires/formulaire_photos', 0,
+ array(
+
+ ));
+}
+$alt_photo=corriger_caracteres($_POST['alt_photo']);
+$id_auteur=$_POST['id_auteur'];
+
+//Définition des variables
+
+$target = './plugins/photos/vignettes/'; // Répertoire cible
+$extension = 'jpg'; // Extension du fichier sans le .
+$max_size = 300000; // Taille max en octets du fichier
+$width_max = 520; // Largeur max de l'image en pixels
+$height_max = 820; // Hauteur max de l'image en pixels
+
+
+// Définition des variables liées au fichier IMG
+
+
+$nom_file = $_FILES['fichier']['name'];
+$taille = $_FILES['fichier']['size'];
+$tmp = $_FILES['fichier']['tmp_name'];
+$chemin= "./plugins/photos/vignettes/";
+$ext='.jpg';
+$logo='image';
+
+if(!empty($_POST['posted'])) {
+ if(!empty($_FILES['fichier']['name'])) {
+ if(substr($nom_file, -3) == $extension) {
+ $infos_img = getimagesize($_FILES['fichier']['tmp_name']);
+ if(($infos_img[0] <= $width_max) && ($infos_img[1] <= $height_max) && ($_FILES['fichier']['size'] <= $max_size)) {
+ if(move_uploaded_file($_FILES['fichier']['tmp_name'], $target.$nom_file )) {
+
+{
+$tab= split("[.]",$nom_file);
+$nom_file_thumb= $tab[0];
+$dateheure=date('Y-m-d H:i:s');
+spip_query ( "INSERT into spip_photos (nom_photo,nom_vignette,dateheure,id_auteur,alt_photo) VALUES ("._q($nom_file).","._q($nom_file).","._q($dateheure).","._q($id_auteur).","._q($alt_photo)." ) ");
+
+}
+ } else {
+ echo '<b>Problème lors de l\'upload !</b><br /><br /><b>',$chemin, '', $_FILES['fichier']['error'], '</b><br /><br />';
+ }
+ } else {
+
+ echo '<b>Problème dans les dimensions ou tailles de l\'image !</b><br /><br />';
+ }
+ } else {
+
+ echo '<b>Votre image ne comporte pas l\'extension .jpg !</b><br /><br />';
+ }
+ } else {
+ echo '<b>Le champ du formulaire est vide !</b><br /><br />';
+ }
+}
+
+?>Added: _plugins_/_test_/photos/base/photos.php
--- _plugins_/_test_/photos/base/photos.php (added)
+++ _plugins_/_test_/photos/base/photos.php Sat May 2 10:25:05 2009
@@ -0,0 +1,52 @@
+<?php
+
+
+ /**
+ * Favoris: plugin Photos SPIP 2.0
+ *
+ * Copyright (c) 2009
+ * Bernard Blazin
+ *
+ * Ce programme est un logiciel libre distribue sous licence GNU/GPL.
+ *
+ *
+ **/
+
+include_spip('base/serial'); // pour eviter une reinit posterieure des tables modifiees
+global $tables_principales;
+//global $tables_auxiliaires;
+
+
+$spip_photos = array(
+ "id_photo" => "BIGINT(21) NOT NULL AUTO_INCREMENT",
+ "nom_photo" => "TINYTEXT NOT NULL",
+ "nom_vignette" => "TINYTEXT NOT NULL",
+ "dateheure" => "DATETIME",
+ "id_auteur" => "BIGINT(21) NOT NULL",
+ "alt_photo" => "TINYTEXT NOT NULL"
+
+ );
+$spip_photos_key = array(
+ "PRIMARY KEY" => "id_photo");
+
+
+ $tables_principales['spip_photos'] =
+ array('field' => &$spip_photos, 'key' => &$spip_photos_key);
+
+
+// Declarer dans la table des tables pour sauvegarde
+global $table_des_tables;
+$table_des_tables['photos'] = 'spip_photos';
+
+//boucle
+function boucle_SPIP_PHOTOS_dist($id_boucle, &$boucles) {
+ $boucle = &$boucles[$id_boucle];
+ $id_table = $boucle->id_table;
+ $boucle->from[$id_table] = "spip_photos";
+
+
+ return calculer_boucle($id_boucle, $boucles);
+ }
+
+
+?>
\ No newline at end of fileAdded: _plugins_/_test_/photos/base/photos_gestion.php
--- _plugins_/_test_/photos/base/photos_gestion.php (added)
+++ _plugins_/_test_/photos/base/photos_gestion.php Sat May 2 10:25:05 2009
@@ -0,0 +1,61 @@
+<?php
+ /**
+ * Plugin Photos
+ *
+ * Copyright (c) 2009
+ * Bernard Blazin
+ * http://www.plugandspip.com
+ * Ce programme est un logiciel libre distribue sous licence GNU/GPL.
+ * Pour plus de details voir le fichier COPYING.txt.
+ *
+ **/
+
+ //version actuelle du plugin à changer en cas de maj
+ $GLOBALS['photos_version'] = 1.0;
+
+ function photos_verifier_base(){
+ $version_base = $GLOBALS['photos_version'];
+ $current_version = 0.0;
+
+ if ( (!isset($GLOBALS['meta']['photos_base_version']) )
+ || (($current_version = $GLOBALS['meta']['photos_base_version'])!=$version_base)) {
+
+ include_spip('base/photos');
+
+ if ($current_version==0.0){
+ include_spip('base/create');
+ include_spip('base/abstract_sql');
+ creer_base();
+ ecrire_meta('photos_base_version',$current_version=$version_base);
+ }
+
+
+
+ ecrire_metas();
+ }
+ }
+
+ function photos_effacer_tables(){
+ include_spip('base/abstract_sql');
+ spip_query("DROP TABLE spip_photos");
+ effacer_meta('photos_base_version');
+ effacer_meta('photos');
+ ecrire_metas();
+ }
+
+ function photos_install($action){
+ $version_base = $GLOBALS['photos_version'];
+ switch ($action){
+ case 'test':
+ return (isset($GLOBALS['meta']['photos_base_version'])
+ AND ($GLOBALS['meta']['photos_base_version']>=$version_base));
+ break;
+ case 'install':
+ photos_verifier_base();
+ break;
+ case 'uninstall':
+ photos_effacer_tables();
+ break;
+ }
+ }
+?>Added: _plugins_/_test_/photos/css/highslide.css
--- _plugins_/_test_/photos/css/highslide.css (added)
[... 4950 lines stripped ...]
_______________________________________________
Spip-zone-commit@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-zone-commit