- Added Path variable in the config file for the LDT's donwloader script (functions.php)
- Added the /ldt_template in the res directory
- Modify default-widgets.php to open in blank all the rss link
- clean a litlle comment in searchform.php
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/web/res/ldt_template/EXEMPLE_zip/X_NOMPROJET_X/LISEZ_MOI_READ_ME.txt Mon Feb 08 14:15:44 2010 +0000
@@ -0,0 +1,24 @@
+
+
+FR :_______________________________________________________________________
+Tout d’abord merci d’avoir téléchargé Lignes de temps
+ainsi que cette documentation.
+
+Une fois la vidéo encodée au format FLV,
+pour qu’elle s’affiche correctement dans Lignes de temps,
+il est impératif de nommer cette vidéo X_NOMPROJET_X.flv
+et de la placer au niveau de ce fichier, à côté du fichier X_NOMPROJET_X.iri.
+___________________________________________________________________________
+Institut de recherche et d’innovation : http://www.iri.centrepompidou.fr/
+
+
+EN :_______________________________________________________________________
+First of all thank you for downloading Lignes de temps and this material.
+
+Once the video encoded in FLV format, in order to display it correctly
+in Lignes de temps, you have to name this video X_NOMPROJET_X.flv and
+place it in the very same folder than this file, next to X_NOMPROJET_X.iri.
+___________________________________________________________________________
+Institute for research and innovation : http://www.iri.centrepompidou.fr/
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/web/res/ldt_template/EXEMPLE_zip/projet_X_NOMPROJET_X.ldt Mon Feb 08 14:15:44 2010 +0000
@@ -0,0 +1,15 @@
+<iri>
+ <project id="1" user="" title="X_NOMPROJET_X" abstract=""/>
+ <medias>
+ <media id="X_NOMPROJET_X" src="X_NOMPROJET_X/X_NOMPROJET_X.iri" video="" pict="" extra=""/>
+ </medias>
+ <annotations/>
+ <displays>
+ <display id="0" title="View at the last recording" idsel="X_NOMPROJET_X" tc="0" zoom="0" scroll="0" infoBAB="">
+ <content id="X_NOMPROJET_X">
+ <decoupage idens="en_2" id="de_PPP" tagsSelect=""/>
+ </content>
+ </display>
+ </displays>
+ <edits/>
+</iri>
\ No newline at end of file
--- a/web/version.php Wed Feb 03 17:52:14 2010 +0000
+++ b/web/version.php Mon Feb 08 14:15:44 2010 +0000
@@ -1,3 +1,3 @@
<?php
- $version="01.01";
+ $version="01.02";
?>
\ No newline at end of file
--- a/web/wp-config.php.tmpl Wed Feb 03 17:52:14 2010 +0000
+++ b/web/wp-config.php.tmpl Mon Feb 08 14:15:44 2010 +0000
@@ -86,3 +86,23 @@
/** Réglage des variables de WordPress et de ses fichiers inclus. */
require_once(ABSPATH . 'wp-settings.php');
+
+/** START LDT */
+
+ /** Chemin RELATIF du dossier de RESSOURCE ou ce trouve les fichier .IRI .LDT */
+ define('LDT_PATH', 'DOCUMENT/_LDT');
+
+ /** Chemin RELATIF du dossier de Cache pour archiver les ZIP des .IRI .LDT */
+ define('LDT_CACHE', '/CACHE');
+
+ /** Nom de BDD des donées sur les fichier .IRI */
+ define('LDT_DB', 'Lignes');
+
+ /** Chemin RELATIF par rapport au LDT_PATH du site du dossier de TEMPLATE pour le ZIP des .IRI .LDT */
+ define('LDT_TEMPLATE', 'res/ldt_template/EXEMPLE_zip');
+
+ /** Chemin relatif de la page de téléchargement */
+ define('DWL_PAGE', "non-classe/telecharger/?URL=".LDT_PATH);
+
+
+/** END LDT */
\ No newline at end of file
--- a/web/wp-content/themes/IRI-Theme/functions.php Wed Feb 03 17:52:14 2010 +0000
+++ b/web/wp-content/themes/IRI-Theme/functions.php Mon Feb 08 14:15:44 2010 +0000
@@ -106,7 +106,7 @@
$MyLdtDataBase = DB_NAME;
$MyWPDataBase = DB_NAME;
- $MyLdtTable = "Lignes";
+ $MyLdtTable = LDT_DB;
$MyLdtconnexion = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
$MyLdtListe = "";
//$WP_db_selected = mysql_select_db();
@@ -174,10 +174,11 @@
# Create the LDT's ZIP to download IT
function createMyLdtProject($fichierIRI){
- $MyRoot = "/iridata/users/hurons/public_html/DOCUMENT/_LDT";
- $MyRootRel = "non-classe/telecharger/?URL=DOCUMENT/_LDT";
- $MyCache = "/CACHE";
- $MyExemple = "/EXEMPLE_zip";
+ $MyLDTRoot = ABSPATH;
+ $MyDocPath = LDT_PATH;
+ $MyRootRel = DWL_PAGE;
+ $MyCache = LDT_CACHE;
+ $MyExemple = LDT_TEMPLATE;
$MyPattern = "X_NOMPROJET_X";
$MyLdtName = "projet_".$MyPattern.".ldt";
$MyReadMeName="LISEZ_MOI_READ_ME.txt";
@@ -193,25 +194,26 @@
if ($ext==".iri"){
// Vérifie si le cache éxiste déja
- if (file_exists($MyCache."/".$FileName.".zip")){
+ if (file_exists($MyLDTRoot.$MyCache."/".$FileName.".zip")){
//echo ($MyCache.$FileName.".zip"." is in cache");
// ensuite envoyer vers la redirection.
+ echo ("Veuillez patientez un instant...");
redirectionDWL($MyRootRel.$MyCache."/".$FileName.".zip");
} else {
- echo ("Le fichier ".$FileName.".zip est en cours de compression, veuillez patientez un instant.");
+ echo ("Le fichier ".$FileName.".zip est en cours de compression, veuillez patientez un instant...");
// Créer le .LDT à partir de l'exemple
- $MyLdtExemple = implode(file($MyRoot.$MyExemple."/".$MyLdtName , FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES));
+ $MyLdtExemple = implode(file($MyLDTRoot.$MyExemple."/".$MyLdtName , FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES));
$MyFuturLdt = str_replace($MyPattern, $FileName, $MyLdtExemple);
// Créer le read me
- $MyReadMeExemple = implode(file($MyRoot.$MyExemple."/".$MyPattern."/".$MyReadMeName , FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES));
+ $MyReadMeExemple = implode(file($MyLDTRoot.$MyExemple."/".$MyPattern."/".$MyReadMeName , FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES));
$MyFuturReadMe = str_replace($MyPattern, $FileName, $MyReadMeExemple);
- // ZIP l'ensemble est met dans le cache
- $Zipfilename = $MyRoot.$MyCache."/".$FileName.".zip";
+ // ZIP l'ensemble est mis dans le cache
+ $Zipfilename = $MyLDTRoot.$MyDocPath.$MyCache."/".$FileName.".zip";
$zip = new ZipArchive();
if ($zip->open($Zipfilename, ZIPARCHIVE::CREATE)!==TRUE) {
exit("Impossible d'ouvrir <$filename>\n");
@@ -220,11 +222,11 @@
$MyLdtNewName = str_replace($MyPattern, $FileName, $MyLdtName);
$zip->addFromString($MyLdtNewName, $MyFuturLdt); //$zip->addFile($MyFuturLdtName, $FileName);
// ZIP - ajouter le .IRI
- $zip->addFile($MyRoot."/".$fichierIRI, $FileName."/".$fichierIRI);
+ $zip->addFile($MyLDTRoot."/".$fichierIRI, $FileName."/".$fichierIRI);
// ZIP - ajouter le ReadMe
$zip->addFromString($FileName."/".$MyReadMeName, $MyFuturReadMe); //$zip->addFile($MyRoot.$MyTemp."/".$FileName."/".$MyReadMeName, $FileName."/".$MyReadMeName);
// ZIP - ajouter le audio si il y a
- $fileAudio = $MyRoot."/".$FileName.$MySoundExt ;
+ $fileAudio = $MyLDTRoot."/".$FileName.$MySoundExt ;
if (file_exists($fileAudio)){
$zip->addFile($fileAudio, $FileName."/".$FileName.$MySoundExt);
}
@@ -233,7 +235,9 @@
// mettre a jour la bdd ? pour vider le cache quand c'est un nouveau fichier ?
// ensuite envoyer vers la redirection.
- redirectionDWL($MyRootRel.$MyCache."/".$FileName.".zip");
+ $FileDWL = $MyRootRel.$MyCache."/".$FileName.".zip";
+ redirectionDWL($FileDWL);
+ //echo ('<br/> DWL : '.$FileDWL);
}
}
}
@@ -248,8 +252,9 @@
echo("<script language=\"javascript\" type=\"text/javascript\"> \n");
echo(" <!--\n");
- echo(" document.location.href = \"".$URL."\";\n ");
- echo(" window.location = \"".$URL."\";\n ");
+ echo(" jQuery(document).ready(function($) {");
+ echo(" $(location).attr('href','".$URL."');");
+ echo(" });");
echo(" //-->\n");
echo("</script>\n");
--- a/web/wp-content/themes/IRI-Theme/searchform.php Wed Feb 03 17:52:14 2010 +0000
+++ b/web/wp-content/themes/IRI-Theme/searchform.php Mon Feb 08 14:15:44 2010 +0000
@@ -28,9 +28,6 @@
");
} else if (!isset($_GET['s'])) {
- echo ("<div id='msg' >
- Ci dessous le formulaire vous permettra de chercher dans les autres sites de l'IRI :
- </div>");
}
?>
--- a/web/wp-includes/default-widgets.php Wed Feb 03 17:52:14 2010 +0000
+++ b/web/wp-includes/default-widgets.php Mon Feb 08 14:15:44 2010 +0000
@@ -798,7 +798,7 @@
$url = esc_url(strip_tags($url));
$icon = includes_url('images/rss.png');
if ( $title )
- $title = "<a class='rsswidget' href='$url' title='" . esc_attr(__('Syndicate this content')) ."'><img style='background:orange;color:white;border:none;' width='14' height='14' src='$icon' alt='RSS' /></a> <a class='rsswidget' href='$link' title='$desc'>$title</a>";
+ $title = "<a class='rsswidget' target='_blank' href='$url' title='" . esc_attr(__('Syndicate this content')) ."'><img style='background:orange;color:white;border:none;' width='14' height='14' src='$icon' alt='RSS' /></a> <a class='rsswidget' href='$link' title='$desc'>$title</a>";
echo $before_widget;
if ( $title )
@@ -907,7 +907,7 @@
if ( $link == '' ) {
echo "<li>$title{$date}{$summary}{$author}</li>";
} else {
- echo "<li><a class='rsswidget' href='$link' title='$desc'>$title</a>{$date}{$summary}{$author}</li>";
+ echo "<li><a class='rsswidget' href='$link' title='$desc' target='_blank'>$title</a>{$date}{$summary}{$author}</li>";
}
}
echo '</ul>';