|
From: mdw c. <myd...@li...> - 2002-05-07 23:17:53
|
MyDynaWeb CVS committal
Author : sukria
Project : mydynaweb
Module : htdocs
Dir : mydynaweb/htdocs/galleries
Modified Files:
index.php
Log Message:
Now the display is better :)
===================================================================
RCS file: /cvsroot/mydynaweb/mydynaweb/htdocs/galleries/index.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- index.php 7 May 2002 18:05:42 -0000 1.3
+++ index.php 7 May 2002 23:17:52 -0000 1.4
@@ -103,7 +103,14 @@
}
$browse = "<table align=center>\n$browse</table>\n";
-$titre = "$parse - ";
+if (strlen($parse)) {
+ $tmp = explode("/", $parse);
+ $titre = $tmp[1];
+}
+else {
+ $titre = "Galleries";
+}
+
$CONTENT = get_page($titre, $chapeau, $browse, $DBH);
print_template(THEMES_PATH."/main.html", $CONTENT, $titre, $DBH,"toto");
@@ -114,7 +121,9 @@
if ($parse != '') {
$up = preg_replace('/\/\w+$/', '', $parse);
- return "<a href='galleries/?parse=$up'><<</a><br>";
+ if (!strlen($up)) $upname = 'Galleries';
+ else $upname = $up;
+ return "<center><a href='galleries/?parse=$up'><img src='images/folder-back.png' border='0' alt='Back'></a><br>[$upname]</center><br>";
}
}
|
|
From: mdw c. <myd...@li...> - 2002-05-07 23:18:25
|
MyDynaWeb CVS committal Author : sukria Project : mydynaweb Module : htdocs Dir : mydynaweb/htdocs/images Added Files: folder-back.png Log Message: An icon for the back link |
|
From: mdw c. <myd...@li...> - 2002-05-10 11:26:57
|
MyDynaWeb CVS committal
Author : sukria
Project : mydynaweb
Module : htdocs
Dir : mydynaweb/htdocs/galleries
Modified Files:
index.php
Added Files:
gallery_wizzard.sh
Log Message:
make_thumbnails.sh is no more pesistent !
gallery_wizzard does all the job !
===================================================================
RCS file: /cvsroot/mydynaweb/mydynaweb/htdocs/galleries/index.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- index.php 9 May 2002 18:58:50 -0000 1.6
+++ index.php 10 May 2002 11:26:56 -0000 1.7
@@ -50,6 +50,7 @@
if ($file == '.' or
$file == 'CVS' or
$file == 'thumbs' or
+ $file == 'pics_640x480' or
$file == 'index.php') continue;
// do not display hidden files (shell scrips (.sh))
@@ -61,6 +62,11 @@
continue;
}
+ // do not display sh files (*.sh)
+ if (preg_match('/^.+\.sh$/', $file)) {
+ continue;
+ }
+
// the back link to go upper in the tree
if ($file == '..') {
$browse .= print_back($parse);
@@ -141,8 +147,13 @@
function print_file ($file, $parse) {
if (preg_match('/.*\.jpg/i', $file)) {
- return "<a href='galleries/$parse/$file'><img
- src='galleries/$parse/thumbs/$file' border='0'></a><br><a href='galleries/$parse/$file'>$file</a>";
+
+ if (file_exists(DYNA_ROOT . "/galleries/$parse/pics_640x480/$file")) {
+ return "<a href='galleries/$parse/$file'><img src='galleries/$parse/thumbs/$file' border='0'></a><br> <a href='galleries/$parse/pics_640x480/$file'>Med</a> | <a href='galleries/$parse/$file'>Full</a>";
+ }
+ else {
+ return "<a href='galleries/$parse/$file'><img src='galleries/$parse/thumbs/$file' border='0'></a><br><a href='galleries/$parse/$file'>Full</a>";
+ }
}
else {
return $file;
|
|
From: mdw c. <myd...@li...> - 2002-05-10 13:08:02
|
MyDynaWeb CVS committal Author : sukria Project : mydynaweb Module : htdocs Dir : mydynaweb/htdocs/galleries Modified Files: gallery_wizzard.sh Log Message: Ajout d'une nouvelle boîte possible : la boîte des rubrique du site. Elle liste toutes les rubriques du site est propose un lien vers le sommaire de cette rubrique. Pour l'utiliser, il suffit d'ajouter le mot clef ~TOPICS_BOX~ =================================================================== RCS file: /cvsroot/mydynaweb/mydynaweb/htdocs/galleries/gallery_wizzard.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- gallery_wizzard.sh 10 May 2002 11:26:56 -0000 1.1 +++ gallery_wizzard.sh 10 May 2002 13:00:02 -0000 1.2 @@ -76,10 +76,13 @@ mode=$1 case "$mode" in - 'render') + 'thumbs') render_thumbnails ;; + 'mid') + render_mid + ;; 'export') export_directory @@ -94,7 +97,7 @@ echo "2 : Rendering 640x480 pictures" echo "3 : Exporting the whole directory to a remote host (ssh)" echo "4 : Rendering recursively thumbnails from the current directory" - echo "5 : Full method, including 1,2,3,4 [default]" + echo "5 : Full method, including 1,2,3 [default]" echo "-------------------------------------" echo -n "-> " |
|
From: mdw c. <myd...@li...> - 2002-05-10 13:08:10
|
MyDynaWeb CVS committal
Author : sukria
Project : mydynaweb
Module : htdocs
Dir : mydynaweb/htdocs/include
Modified Files:
gui.inc.php templates.inc.php
Log Message:
Ajout d'une nouvelle boîte possible : la boîte des rubrique du site.
Elle liste toutes les rubriques du site est propose un lien vers le sommaire de cette rubrique.
Pour l'utiliser, il suffit d'ajouter le mot clef ~TOPICS_BOX~
===================================================================
RCS file: /cvsroot/mydynaweb/mydynaweb/htdocs/include/gui.inc.php,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -3 -r1.51 -r1.52
--- gui.inc.php 26 Apr 2002 13:56:06 -0000 1.51
+++ gui.inc.php 10 May 2002 13:00:02 -0000 1.52
@@ -255,6 +255,30 @@
}
+function get_topics_htmlbox($DBH)
+{
+
+ $BOX_HASH_TEMPLATE = read_template(THEMES_PATH . "/box.html");
+
+ $VALUES['TITLE'] = translate("TOPICS",$DBH);
+ $form = get_hash_template($BOX_HASH_TEMPLATE["HEAD"], $VALUES);
+
+ $sql = "select titre, num_topic from topic where lang_id='".USER_LANG."'";
+ $rqt = new query($DBH);
+ $rqt->query($DBH, $sql) or send_sql_error($PHP_SELF, $sql, $rqt->error());
+
+ while ($row = $rqt->getrow()) {
+ $VALUES["CONTENT"] = "<a href='news.php?q=$row[1]'>$row[0]</a>";
+ $form .= get_hash_template($BOX_HASH_TEMPLATE["LINE"], $VALUES);
+ }
+
+ $form .= get_hash_template($BOX_HASH_TEMPLATE["FOOT"], $VALUES);
+ return($form);
+}
+
+
+
+
function get_searchengine($seek, $DBH)
{
===================================================================
RCS file: /cvsroot/mydynaweb/mydynaweb/htdocs/include/templates.inc.php,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- templates.inc.php 18 Jan 2002 17:25:09 -0000 1.34
+++ templates.inc.php 10 May 2002 13:00:02 -0000 1.35
@@ -27,6 +27,7 @@
$VALUES["HEADLINES"] .= get_headlines($DBH, $news_sites[$i]);
}
+ $VALUES["TOPICS_BOX"] = get_topics_htmlbox($DBH);
$VALUES['LAYER'] = get_layer($DBH, $hash_layer);
$VALUES['SPONSORS'] = get_sponsors($DBH, $hash_box);
$VALUES['STATBOX'] = get_global_stats_box($DBH, $hash_box);
|
|
From: mdw c. <myd...@li...> - 2002-05-10 16:15:36
|
MyDynaWeb CVS committal
Author : sukria
Project : mydynaweb
Module : htdocs
Dir : mydynaweb/htdocs/galleries
Modified Files:
index.php
Log Message:
A lot of enhancment !
A true gallery browser when clicking on a folder :)
===================================================================
RCS file: /cvsroot/mydynaweb/mydynaweb/htdocs/galleries/index.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- index.php 10 May 2002 11:26:56 -0000 1.7
+++ index.php 10 May 2002 16:15:35 -0000 1.8
@@ -89,6 +89,12 @@
//$sql = "replace into files_stats () values ()";
+ if ($file == $img ) {
+ $img_id = $count;
+ }
+
+ $img_ids[$count] = $file;
+
if ( ($count-1) % $cols == 0 ) {
$browse .= "<tr>\n";
}
@@ -122,8 +128,51 @@
}
-$CONTENT = get_page($titre, $chapeau, $browse, $DBH);
-print_template(THEMES_PATH."/main.html", $CONTENT, $titre, $DBH,"toto");
+if ($mode=='popup') {
+
+ if ($img == "content") {
+ $VALUES["GALLERYNAME"] = "<a href='".SITE_ROOT."/galleries/?mode=popup&img=content&parse=$parse'>$parse</a>";
+ $VALUES["IMAGENAME"] = $file;
+ $VALUES["CONTENT"] = $browse;
+
+ $TEMPLATE = read_template(THEMES_PATH . "/gallery.html");
+ $HTML = get_hash_template($TEMPLATE["ALL"], $VALUES);
+
+ print $HTML;
+
+ }
+ else {
+ for ($i=1; $i<=$count; $i++) {
+
+ $file = $img_ids[$i];
+
+ if ($i==1) $VALUES["links"] = "<a href='?parse=$parse&img=$file&mode=popup'><<</a> ";
+
+ if ($i != $img_id) $VALUES["links"] .= "<a href='?parse=$parse&img=$file&mode=popup'>$i</a> ";
+ else $VALUES["links"] .= "<a href='?parse=$parse&img=$file&mode=popup'><b>$i</b></a> ";
+
+ if ($i==$count) $VALUES["links"] .= "<a href='?parse=$parse&img=$file&mode=popup'>>></a> ";
+ }
+
+ $file = $img;
+
+ $VALUES["GALLERYNAME"] = "<a href='".SITE_ROOT."/galleries/?mode=popup&img=content&parse=$parse'>$parse</a>";
+ $VALUES["IMAGENAME"] = $file;
+ $BIG_PATH = SITE_ROOT."/galleries/$parse/$file";
+ $VALUES["CONTENT"] = "<a href='$BIG_PATH'><img border='0' src='".SITE_ROOT."/galleries/$parse/pics_640x480/$file'></a>";
+
+ $TEMPLATE = read_template(THEMES_PATH . "/gallery.html");
+ $HTML = get_hash_template($TEMPLATE["ALL"], $VALUES);
+
+ print $HTML;
+ }
+}
+else {
+ $CONTENT = get_page($titre, $chapeau, $browse, $DBH);
+ print_template(THEMES_PATH."/main.html", $CONTENT, $titre, $DBH,"toto");
+}
+
+
$DBH->close();
@@ -133,7 +182,7 @@
$up = preg_replace('/\/\w+$/', '', $parse);
if (!strlen($up)) $upname = 'Galleries';
else $upname = $up;
- return "<center><a href='galleries/?parse=$up'><img src='images/folder-back.png' border='0' alt='Back'></a><br>[$upname]</center><br>";
+ return "<center><a href='".SITE_ROOT."/galleries/?parse=$up'><img src='".SITE_ROOT."/images/folder-back.png' border='0' alt='Back'></a><br>[$upname]</center><br>";
}
}
@@ -141,7 +190,7 @@
function print_folder ($file, $parse)
// prints out a folder icon with a link to the folder
{
- return "<a href='galleries/?parse=$parse/$file'><img src='images/folder.png' border='0'></a><br>$file";
+ return "<a href='#' onclick=\"window.open('".SITE_ROOT."/galleries/?mode=popup&parse=$parse/$file&img=content', 'popup', 'width=800,height=600,menubar=1,statusbar=1');return(false);\"><img src='".SITE_ROOT."/images/folder.png' border='0'></a><br>$file";
}
function print_file ($file, $parse) {
@@ -149,10 +198,10 @@
if (preg_match('/.*\.jpg/i', $file)) {
if (file_exists(DYNA_ROOT . "/galleries/$parse/pics_640x480/$file")) {
- return "<a href='galleries/$parse/$file'><img src='galleries/$parse/thumbs/$file' border='0'></a><br> <a href='galleries/$parse/pics_640x480/$file'>Med</a> | <a href='galleries/$parse/$file'>Full</a>";
+ return "<a href='".SITE_ROOT."/galleries/$parse/$file'><img src='".SITE_ROOT."/galleries/$parse/thumbs/$file' border='0'></a><br> <a href='".SITE_ROOT."/galleries/?mode=popup&parse=$parse&img=$file'>Med</a> | <a href='".SITE_ROOT."/galleries/$parse/$file'>Full</a>";
}
else {
- return "<a href='galleries/$parse/$file'><img src='galleries/$parse/thumbs/$file' border='0'></a><br><a href='galleries/$parse/$file'>Full</a>";
+ return "<a href='".SITE_ROOT."/galleries/$parse/$file'><img src='".SITE_ROOT."/galleries/$parse/thumbs/$file' border='0'></a><br><a href='".SITE_ROOT."/galleries/$parse/$file'>Full</a>";
}
}
else {
|
|
From: mdw c. <myd...@li...> - 2002-05-10 16:16:50
|
MyDynaWeb CVS committal Author : sukria Project : mydynaweb Module : htdocs Dir : mydynaweb/htdocs/templates/deekay Added Files: gallery.html Log Message: The template for gallery browsing |
|
From: mdw c. <myd...@li...> - 2002-05-10 16:16:50
|
MyDynaWeb CVS committal Author : sukria Project : mydynaweb Module : htdocs Dir : mydynaweb/htdocs/templates/dynadot Added Files: gallery.html Log Message: The template for gallery browsing |
|
From: mdw c. <myd...@li...> - 2002-05-10 16:16:50
|
MyDynaWeb CVS committal Author : sukria Project : mydynaweb Module : htdocs Dir : mydynaweb/htdocs/templates/enlightened Added Files: gallery.html Log Message: The template for gallery browsing |
|
From: mdw c. <myd...@li...> - 2002-05-10 16:16:50
|
MyDynaWeb CVS committal Author : sukria Project : mydynaweb Module : htdocs Dir : mydynaweb/htdocs/templates/default Added Files: gallery.html Log Message: The template for gallery browsing |
|
From: mdw c. <myd...@li...> - 2002-05-10 16:16:50
|
MyDynaWeb CVS committal Author : sukria Project : mydynaweb Module : htdocs Dir : mydynaweb/htdocs/templates/smarty Added Files: gallery.html Log Message: The template for gallery browsing |
|
From: mdw c. <myd...@li...> - 2002-05-13 20:38:09
|
MyDynaWeb CVS committal
Author : sukria
Project : mydynaweb
Module : htdocs
Dir : mydynaweb/htdocs
Modified Files:
show_stats.php
Log Message:
Bon, suite au mail de benoit a propos des stats :
Le bug benait du fait que par défaut le programme cherche des stats pour le mois de decembre 2001... pas terrible je vous l'accorde :)
Donc après une correction mineure, la date du mois par défaut est le mois en cours.
De plus j'ai ajouté un champ pour rentrer le mois a regarder (au format YYYY-MM).
Cependant, je pense que vu l'état d'avancement de cette fonctionnalité, il est préférable de l'enlever de la version "stable".
Je pense que ben sera d'accord sur ce point :)
En fait, les module de stats fait beaucoup de choses (il compte bien visites, visiteurs et pages vues, il stocke les URL référantes, place des cookies unique afin de différencier les visiteurs... bref, il fait le minimum mais son gros problème : l'interface, je n'ai rien fait de _correct_ sur ce point
A priori, a enlever de la version stable donc.
===================================================================
RCS file: /cvsroot/mydynaweb/mydynaweb/htdocs/show_stats.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- show_stats.php 23 Jan 2002 09:50:04 -0000 1.10
+++ show_stats.php 13 May 2002 20:38:09 -0000 1.11
@@ -5,7 +5,7 @@
if (!strlen($mode)) {
$mode = 'MONTH';
- $month='2001-12';
+ $month=date("%Y-%m");
}
$DBH=new db();
@@ -17,7 +17,16 @@
{
case 'MONTH':
- $PAGE .= "<table width='90%' align='center'>
+ $PAGE .= "
+ <table align=center><tr><td>
+ <form action='$PHP_SELF' method=POST>
+ <input type='text' name='MONTH' value='$MONTH'><br>
+ <i>".translate('YOU_CAN_CHANGE_THE_MONTH', $DBH)."</i>
+ </form>
+ </table>
+ <p>
+
+ <table width='90%' align='center'>
<tr><td><b>Day</b></td>
<td><b>Pages Viewed</b></td>
<td><b>Visits</b></td>
|
|
From: mdw c. <myd...@li...> - 2002-05-14 10:41:03
|
MyDynaWeb CVS committal
Author : sukria
Project : mydynaweb
Module : htdocs
Dir : mydynaweb/htdocs/galleries
Modified Files:
index.php
Log Message:
Petite mise a jour dans la boîte des topics.
La liste des topics est désormais affichée triée par ordre alphabétique.
===================================================================
RCS file: /cvsroot/mydynaweb/mydynaweb/htdocs/galleries/index.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- index.php 10 May 2002 16:15:35 -0000 1.8
+++ index.php 14 May 2002 10:40:32 -0000 1.9
@@ -182,7 +182,7 @@
$up = preg_replace('/\/\w+$/', '', $parse);
if (!strlen($up)) $upname = 'Galleries';
else $upname = $up;
- return "<center><a href='".SITE_ROOT."/galleries/?parse=$up'><img src='".SITE_ROOT."/images/folder-back.png' border='0' alt='Back'></a><br>[$upname]</center><br>";
+ return "<center><a href='#' onclick=\"window.open('".SITE_ROOT."/galleries/?mode=popup&parse=$up&img=content', 'popup', 'width=800,height=600,locationbar=1');return(false);\"><img src='".SITE_ROOT."/images/folder-back.png' border='0' alt='Back'></a><br>[$upname]</center><br>";
}
}
|
|
From: mdw c. <myd...@li...> - 2002-05-14 10:41:03
|
MyDynaWeb CVS committal
Author : sukria
Project : mydynaweb
Module : htdocs
Dir : mydynaweb/htdocs/include
Modified Files:
gui.inc.php
Log Message:
Petite mise a jour dans la boîte des topics.
La liste des topics est désormais affichée triée par ordre alphabétique.
===================================================================
RCS file: /cvsroot/mydynaweb/mydynaweb/htdocs/include/gui.inc.php,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -3 -r1.52 -r1.53
--- gui.inc.php 10 May 2002 13:00:02 -0000 1.52
+++ gui.inc.php 14 May 2002 10:40:32 -0000 1.53
@@ -263,7 +263,7 @@
$VALUES['TITLE'] = translate("TOPICS",$DBH);
$form = get_hash_template($BOX_HASH_TEMPLATE["HEAD"], $VALUES);
- $sql = "select titre, num_topic from topic where lang_id='".USER_LANG."'";
+ $sql = "select titre, num_topic from topic where lang_id='".USER_LANG."' order by titre";
$rqt = new query($DBH);
$rqt->query($DBH, $sql) or send_sql_error($PHP_SELF, $sql, $rqt->error());
|
|
From: mdw c. <myd...@li...> - 2002-05-15 08:27:06
|
MyDynaWeb CVS committal
Author : sukria
Project : mydynaweb
Module : htdocs
Dir : mydynaweb/htdocs/include
Modified Files:
default.ini.php
Log Message:
Correstion de la définition automatique de DYNA_ROOT.
Un slash est ajouté à la fin pour éviter tout problème de PATH dans les inclusions.
Cela a été relevé lors de la chasse aux bugs par Xavier.
===================================================================
RCS file: /cvsroot/mydynaweb/mydynaweb/htdocs/include/default.ini.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- default.ini.php 9 Dec 2001 15:43:36 -0000 1.3
+++ default.ini.php 15 May 2002 08:26:35 -0000 1.4
@@ -19,7 +19,7 @@
// the root directory of mydynaweb
// this is where your htdocs is located on the HD
-define("DYNA_ROOT", '/home/gandalf/mydynaweb/htdocs');
+define("DYNA_ROOT", '/home/gandalf/mydynaweb/htdocs/');
/******************************************
|
|
From: mdw c. <myd...@li...> - 2002-05-15 08:27:06
|
MyDynaWeb CVS committal
Author : sukria
Project : mydynaweb
Module : htdocs
Dir : mydynaweb/htdocs/galleries
Modified Files:
index.php
Log Message:
Correstion de la définition automatique de DYNA_ROOT.
Un slash est ajouté à la fin pour éviter tout problème de PATH dans les inclusions.
Cela a été relevé lors de la chasse aux bugs par Xavier.
===================================================================
RCS file: /cvsroot/mydynaweb/mydynaweb/htdocs/galleries/index.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- index.php 14 May 2002 10:40:32 -0000 1.9
+++ index.php 15 May 2002 08:26:35 -0000 1.10
@@ -28,9 +28,90 @@
include('../include/mydynaweb.init.php');
include(DYNA_ROOT . '/include/mydynaweb.libs.php');
+define("REACT", translate('REACT', $DBH));
+define("BASE_URL", ($PHP_SELF . "?" . $QUERY_STRING));
+
$DBH=new db();
$DBH->open($dbName, $dbServer, $dbUser, $dbPass);
+////////////////////////////////////////////////////////////////////////
+// the comments related to that gallery
+
+// Step 1 : init stuff
+$msg_infos = read_messages($DBH, $news, $orderby);
+$get_message = $msg_infos[0];
+$get_parents = $msg_infos[1];
+$get_children = $msg_infos[2];
+
+///////////////
+// Threshold
+if (!isset($threshold)) {
+ $threshold = 0;
+}
+
+// The navbar
+$PAGE .= "<center>
+<p>
+<hr>
+<table bgcolor='#eeeeee' align='center' width='100%'>
+<tr>
+ <td align='center'>
+ <font size='-1'>
+ <form action='add_comment.php'>
+ <input type='hidden' name='num_news' value='$news'>
+ <input type='submit' value='".translate("NEW_THREAD",$DBH)."'>
+ </font>
+ </form>
+ </td>
+</tr>
+<tr>
+ <td align='center'>
+ <form action='comment.php'>
+ <font size='-1'>
+ <input type='hidden' name='news' value='$news'>
+ <select name='threshold'>
+ <option value='-1'>".translate("SHOW_ALL_MESSAGES", $DBH)."</option>
+ <option value='0' selected>".translate("ONLY_THREADS", $DBH)."</option>
+ </select>
+
+ <select name='orderby'>
+ <option value='desc'>".translate("NEWEST_FIRST", $DBH)."</option>
+ <option value=''>".translate("OLDEST_FIRST", $DBH)."</option>
+ </select>
+ <input type='submit' value='OK'>
+ </font>
+ </form>
+ </td>
+
+</tr>
+</table>
+</center>
+<hr>
+<p>
+";
+
+
+$PAGE .= "<table width='100%'>";
+
+if (sizeof($get_parents)) {
+ $PAGE .= "<tr><td><b>$num_comments " . translate("COMMENTS", $DBH). " / ".sizeof($get_parents)." ". translate('THREADS', $DBH)." </b></td></tr>";
+}
+
+// Step 2 : print out the threads
+if ($num_comments) {
+ foreach ($get_parents as $thread) {
+ $PAGE .= print_message($thread, 0, $threshold, $get_message, $get_children, $template);
+ }
+}
+
+$PAGE .= "</table>";
+
+$VALUES["COMMENT"] = $PAGE;
+
+////////////////////////////////////////////////////////////////////////
+
+
+
$root = 'galleries';
$cols = 5;
@@ -182,7 +263,7 @@
$up = preg_replace('/\/\w+$/', '', $parse);
if (!strlen($up)) $upname = 'Galleries';
else $upname = $up;
- return "<center><a href='#' onclick=\"window.open('".SITE_ROOT."/galleries/?mode=popup&parse=$up&img=content', 'popup', 'width=800,height=600,locationbar=1');return(false);\"><img src='".SITE_ROOT."/images/folder-back.png' border='0' alt='Back'></a><br>[$upname]</center><br>";
+ return "<center><a href='#' onclick=\"window.open('".SITE_ROOT."/galleries/?mode=popup&parse=$up&img=content', 'popup', 'width=800,height=600,toolbar=1,resizable=1');return(false);\"><img src='".SITE_ROOT."/images/folder-back.png' border='0' alt='Back'></a><br>[$upname]</center><br>";
}
}
@@ -190,7 +271,7 @@
function print_folder ($file, $parse)
// prints out a folder icon with a link to the folder
{
- return "<a href='#' onclick=\"window.open('".SITE_ROOT."/galleries/?mode=popup&parse=$parse/$file&img=content', 'popup', 'width=800,height=600,menubar=1,statusbar=1');return(false);\"><img src='".SITE_ROOT."/images/folder.png' border='0'></a><br>$file";
+ return "<a href='#' onclick=\"window.open('".SITE_ROOT."/galleries/?mode=popup&parse=$parse/$file&img=content', 'popup', 'width=800,height=600,toolbar=1,resizable=1');return(false);\"><img src='".SITE_ROOT."/images/folder.png' border='0'></a><br>$file";
}
function print_file ($file, $parse) {
@@ -221,5 +302,99 @@
return $html;
}
+
+
+/*
+ Great news : comments are recursive !
+ Now people can answer to comment like
+ in every forum ...
+ So we need a recursive function which
+ can draw messages and their children...
+*/
+
+function print_message ($num_cmt, $level, $threshold, $get_message, $get_children, $template)
+{
+
+ $HTML = "";
+
+ $get_message[$num_cmt]['REACT'] = REACT;
+ $get_message[$num_cmt]['SIZE'] = 100;
+
+ // the limit of the identation : 5
+ if ($level > 5) $level = 5;
+
+ for ($i=0; $i<$level; $i++) {
+ $get_message[$num_cmt]['SIZE'] -= 5;
+ }
+
+ // a new thread
+ if ($level == 0) {
+ $HTML .= "<tr><td><p> </p></td></tr>
+ <tr><td>" . get_hash_template($template["thread"], $get_message[$num_cmt]) . "</td></tr>";
+ }
+
+ // a comment fully displayed (under threshold)
+ else if (($threshold == -1) or ($threshold >= $level)) {
+ $pere = $get_message[$num_cmt]['pere'];
+ $get_message[$num_cmt]['desc'] = ("<a href='".BASE_URL."#$pere'>".$get_message[$pere]['title']."</a>");
+ $HTML .= "<tr><td>" . get_hash_template($template["comment"], $get_message[$num_cmt]) . "</td></tr>";
+ }
+
+ // a comment under the threshold : only the title
+ else {
+ $get_message[$num_cmt]['threshold'] = $level;
+ $HTML .= "<tr><td>". get_hash_template($template["title"], $get_message[$num_cmt])."</td></tr>";
+ }
+
+ if (sizeof($get_children[$num_cmt])) {
+ foreach ($get_children[$num_cmt] as $child) {
+ $HTML .= print_message($child, $level+1, $threshold, $get_message, $get_children, $template);
+ }
+ }
+
+ return $HTML;
+}
+
+/*
+ To increase speed, we do only one query to the DB :
+ get every comments posted to that piece of news and
+ put it into a hashtable $message[num] => [FIELD] => content
+ for instance
+ $message[12][TITLE] send me the title of the #12 comment
+*/
+function read_messages($dbh, $num_news, $orderby)
+{
+ // the hashtable with the info of the messages
+ $get_message = Array();
+
+ // return an array of children
+ $get_children = Array();
+
+ $sql = "select num_cmt, title, content, user_name, user_mail, date_ins, pere, _num_news
+ from comments
+ where _gallery = '$parse'
+ order by num_cmt $orderby";
+ $rqt = new query($dbh);
+ $rqt->query($dbh, $sql) or send_sql_error($PHP_SELF, $sql, $rqt->error());
+
+ // fetching the message and filling the hash with infos...
+ while ($row = $rqt->getrow()) {
+ $get_message[$row[0]] = $row;
+
+ // if this message has a parent, say it !
+ if ($row['pere']) {
+ // push the numcmt to the table of children of the parent
+ $get_children[$row['pere']][sizeof($get_children[$row['pere']])] = $row['num_cmt'];
+ }
+ else {
+ // this message begins a new thread, lets say it !
+ $get_parents[sizeof($get_parents)] = $row['num_cmt'];
+ }
+ }
+
+ return Array ($get_message, $get_parents, $get_children);
+}
+
+
?>
|
|
From: mdw c. <myd...@li...> - 2002-05-15 08:36:39
|
MyDynaWeb CVS committal Author : sukria Project : mydynaweb Module : htdocs Dir : mydynaweb/htdocs/templates/gnome Modified Files: comment.html Log Message: Ajout des masques des commentaires pour les themes qui n'étaient pas à jour. =================================================================== RCS file: /cvsroot/mydynaweb/mydynaweb/htdocs/templates/gnome/comment.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- comment.html 20 Sep 2001 21:23:47 -0000 1.2 +++ comment.html 15 May 2002 08:36:38 -0000 1.3 @@ -1,16 +1,57 @@ - <HR width="480"> +<!-- BLOCK:comment --> +<table width='~SIZE~%' align='right' cellpadding="0" cellspacing="0" border="0" bgcolor="#eeeeee"> + <tr bgcolor="#eeeeee"> + <td align='left'> + <a name="~num_cmt~"></a> + <i><font size="-1">[~desc~]</font></i> <b>~title~</b> (<a href="mailto:~user_mail~">~user_name~</a>, ~date_ins~) + </td> + <td align='right' valign="top"> + <a href='add_comment.php?num_news=~_num_news~&pere=~num_cmt~'><font size="-1">~REACT~</font></a> + </td> + </tr> + + <tr bgcolor="#ffffff"> + <td colspan='2' valign="top" align="left"> + ~content~ + <br><br> + </td> + </tr> +</table> + +<!-- BLOCK:title --> +<table width='~SIZE~%' align='right' cellpadding="0" cellspacing="0" border="0"> + <tr> + <td align='left'> + <b>>> <a href="comment.php?news=~_num_news~&threshold=~threshold~#~num_cmt~">~title~</a></b> (<a href="mailto:~user_mail~">~user_name~</a>, ~date_ins~) + </td> + <td align='right' valign="top"> + <a href='add_comment.php?num_news=~_num_news~&pere=~num_cmt~'><font size="-1">~REACT~</font></a> + </td> + </tr> +</table> + + + +<!-- BLOCK:thread --> + +<table width='~SIZE~%' align='right' cellpadding="0" cellspacing="0" border="0"> + <tr bgcolor='#dddddd'> + <td align='left'> + <a name="~num_cmt~"></a> + <b>~title~</b> (<a href="mailto:~user_mail~">~user_name~</a>, ~date_ins~) + </td> + <td align='right'> + <a href='add_comment.php?num_news=~_num_news~&pere=~num_cmt~'><font size="-1">~REACT~</font></a> + </td> + </tr> + + <tr> + <td colspan='2' valign="top" align="left"> + ~content~ + <br><br> + </td> + </tr> +</table> + - <table width="480" border="0" cellpadding="0" cellspacing="3" ><tr> - - <td align="left" > - - <font color="#770000"><b>~title~</b> (posted by <a href="mailto:~user_mail~">~user_name~</a>, ~date_ins~)</font><br><br> - - ~content~ - - </td> - </tr> - </table> - - <p> |
|
From: mdw c. <myd...@li...> - 2002-05-15 08:37:09
|
MyDynaWeb CVS committal Author : sukria Project : mydynaweb Module : htdocs Dir : mydynaweb/htdocs/templates/basic Modified Files: comment.html Log Message: Ajout des masques des commentaires pour les themes qui n'étaient pas à jour. =================================================================== RCS file: /cvsroot/mydynaweb/mydynaweb/htdocs/templates/basic/comment.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- comment.html 18 Feb 2002 23:51:28 -0000 1.3 +++ comment.html 15 May 2002 08:36:38 -0000 1.4 @@ -1,12 +1,47 @@ +<!-- BLOCK:comment --> +<table width='~SIZE~%' align='right' cellpadding="0" cellspacing="0" border="0" bgcolor="#eeeeee"> + <tr bgcolor="#eeeeee"> + <td align='left'> + <a name="~num_cmt~"></a> + <i><font size="-1">[~desc~]</font></i> <b>~title~</b> (<a href="mailto:~user_mail~">~user_name~</a>, ~date_ins~) + </td> + <td align='right' valign="top"> + <a href='add_comment.php?num_news=~_num_news~&pere=~num_cmt~'><font size="-1">~REACT~</font></a> + </td> + </tr> + + <tr bgcolor="#ffffff"> + <td colspan='2' valign="top" align="left"> + ~content~ + <br><br> + </td> + </tr> +</table> - -<table width='~SIZE~%' align='right'> +<!-- BLOCK:title --> +<table width='~SIZE~%' align='right' cellpadding="0" cellspacing="0" border="0"> <tr> - <td bgcolor='#dddddd' align='left' width='90%'> - <b>~title~</b> (<a href="mailto:~user_mail~">~user_name~</a>, ~date_ins~) + <td align='left'> + <b>>> <a href="comment.php?news=~_num_news~&threshold=~threshold~#~num_cmt~">~title~</a></b> (<a href="mailto:~user_mail~">~user_name~</a>, ~date_ins~) </td> <td align='right' valign="top"> - <a href='add_comment.php?num_news=~_num_news~&pere=~num_cmt~'><font size="-1"><SUP>~REACT~</SUP></a> </font><a href='add_comment.php?num_news=~_num_news~&pere=~num_cmt~'><img border='0' src='images/answer.gif'></a> + <a href='add_comment.php?num_news=~_num_news~&pere=~num_cmt~'><font size="-1">~REACT~</font></a> + </td> + </tr> +</table> + + + +<!-- BLOCK:thread --> + +<table width='~SIZE~%' align='right' cellpadding="0" cellspacing="0" border="0"> + <tr bgcolor='#dddddd'> + <td align='left'> + <a name="~num_cmt~"></a> + <b>~title~</b> (<a href="mailto:~user_mail~">~user_name~</a>, ~date_ins~) + </td> + <td align='right'> + <a href='add_comment.php?num_news=~_num_news~&pere=~num_cmt~'><font size="-1">~REACT~</font></a> </td> </tr> @@ -17,3 +52,6 @@ </td> </tr> </table> + + + |
|
From: mdw c. <myd...@li...> - 2002-05-15 08:37:09
|
MyDynaWeb CVS committal Author : sukria Project : mydynaweb Module : htdocs Dir : mydynaweb/htdocs/templates/default Modified Files: comment.html Log Message: Ajout des masques des commentaires pour les themes qui n'étaient pas à jour. =================================================================== RCS file: /cvsroot/mydynaweb/mydynaweb/htdocs/templates/default/comment.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- comment.html 20 Sep 2001 21:23:47 -0000 1.2 +++ comment.html 15 May 2002 08:36:38 -0000 1.3 @@ -1,20 +1,57 @@ +<!-- BLOCK:comment --> +<table width='~SIZE~%' align='right' cellpadding="0" cellspacing="0" border="0" bgcolor="#eeeeee"> + <tr bgcolor="#eeeeee"> + <td align='left'> + <a name="~num_cmt~"></a> + <i><font size="-1">[~desc~]</font></i> <b>~title~</b> (<a href="mailto:~user_mail~">~user_name~</a>, ~date_ins~) + </td> + <td align='right' valign="top"> + <a href='add_comment.php?num_news=~_num_news~&pere=~num_cmt~'><font size="-1">~REACT~</font></a> + </td> + </tr> + + <tr bgcolor="#ffffff"> + <td colspan='2' valign="top" align="left"> + ~content~ + <br><br> + </td> + </tr> +</table> + +<!-- BLOCK:title --> +<table width='~SIZE~%' align='right' cellpadding="0" cellspacing="0" border="0"> + <tr> + <td align='left'> + <b>>> <a href="comment.php?news=~_num_news~&threshold=~threshold~#~num_cmt~">~title~</a></b> (<a href="mailto:~user_mail~">~user_name~</a>, ~date_ins~) + </td> + <td align='right' valign="top"> + <a href='add_comment.php?num_news=~_num_news~&pere=~num_cmt~'><font size="-1">~REACT~</font></a> + </td> + </tr> +</table> + + + +<!-- BLOCK:thread --> + +<table width='~SIZE~%' align='right' cellpadding="0" cellspacing="0" border="0"> + <tr bgcolor='#dddddd'> + <td align='left'> + <a name="~num_cmt~"></a> + <b>~title~</b> (<a href="mailto:~user_mail~">~user_name~</a>, ~date_ins~) + </td> + <td align='right'> + <a href='add_comment.php?num_news=~_num_news~&pere=~num_cmt~'><font size="-1">~REACT~</font></a> + </td> + </tr> + + <tr> + <td colspan='2' valign="top" align="left"> + ~content~ + <br><br> + </td> + </tr> +</table> - <table width="480" border="0" cellpadding="1" cellspacing="0" bgcolor="#6A749D"><tr><td> - <table width="480" border="0" cellpadding="0" cellspacing="0" bgcolor="#EEEEEE"><tr><td> - <table width="480" border="0" cellpadding="0" cellspacing="3" bgcolor="#EEEEEE"><tr> - - <td align="left" bgcolor="#EEEEEE"> - - <font color="#6A749D"><b>~title~</b> (posted by <a href="mailto:~user_mail~">~user_name~</a>, ~date_ins~)</font><br><br> - - ~content~ - - </td> - </tr> - </table> - - </td></tr></table> - </td></tr></table> - <p> |
|
From: mdw c. <myd...@li...> - 2002-05-15 08:37:09
|
MyDynaWeb CVS committal Author : sukria Project : mydynaweb Module : htdocs Dir : mydynaweb/htdocs/templates/enlightened Modified Files: comment.html Log Message: Ajout des masques des commentaires pour les themes qui n'étaient pas à jour. =================================================================== RCS file: /cvsroot/mydynaweb/mydynaweb/htdocs/templates/enlightened/comment.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- comment.html 22 Feb 2002 09:15:10 -0000 1.4 +++ comment.html 15 May 2002 08:36:38 -0000 1.5 @@ -1,6 +1,6 @@ <!-- BLOCK:comment --> -<table width='~SIZE~%' align='right' cellpadding="0" cellspacing="0" border="0"> - <tr> +<table width='~SIZE~%' align='right' cellpadding="0" cellspacing="0" border="0" bgcolor="#eeeeee"> + <tr bgcolor="#eeeeee"> <td align='left'> <a name="~num_cmt~"></a> <i><font size="-1">[~desc~]</font></i> <b>~title~</b> (<a href="mailto:~user_mail~">~user_name~</a>, ~date_ins~) @@ -10,7 +10,7 @@ </td> </tr> - <tr> + <tr bgcolor="#ffffff"> <td colspan='2' valign="top" align="left"> ~content~ <br><br> @@ -35,7 +35,7 @@ <!-- BLOCK:thread --> <table width='~SIZE~%' align='right' cellpadding="0" cellspacing="0" border="0"> - <tr > + <tr bgcolor='#dddddd'> <td align='left'> <a name="~num_cmt~"></a> <b>~title~</b> (<a href="mailto:~user_mail~">~user_name~</a>, ~date_ins~) |
|
From: mdw c. <myd...@li...> - 2002-05-15 10:42:39
|
MyDynaWeb CVS committal
Author : sukria
Project : mydynaweb
Module : htdocs
Dir : mydynaweb/htdocs/galleries
Modified Files:
index.php
Added Files:
add_comment.php comment.html
Log Message:
Ca avance....
===================================================================
RCS file: /cvsroot/mydynaweb/mydynaweb/htdocs/galleries/index.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- index.php 15 May 2002 08:26:35 -0000 1.10
+++ index.php 15 May 2002 10:42:39 -0000 1.11
@@ -34,83 +34,6 @@
$DBH=new db();
$DBH->open($dbName, $dbServer, $dbUser, $dbPass);
-////////////////////////////////////////////////////////////////////////
-// the comments related to that gallery
-
-// Step 1 : init stuff
-$msg_infos = read_messages($DBH, $news, $orderby);
-$get_message = $msg_infos[0];
-$get_parents = $msg_infos[1];
-$get_children = $msg_infos[2];
-
-///////////////
-// Threshold
-if (!isset($threshold)) {
- $threshold = 0;
-}
-
-// The navbar
-$PAGE .= "<center>
-<p>
-<hr>
-<table bgcolor='#eeeeee' align='center' width='100%'>
-<tr>
- <td align='center'>
- <font size='-1'>
- <form action='add_comment.php'>
- <input type='hidden' name='num_news' value='$news'>
- <input type='submit' value='".translate("NEW_THREAD",$DBH)."'>
- </font>
- </form>
- </td>
-</tr>
-<tr>
- <td align='center'>
- <form action='comment.php'>
- <font size='-1'>
- <input type='hidden' name='news' value='$news'>
- <select name='threshold'>
- <option value='-1'>".translate("SHOW_ALL_MESSAGES", $DBH)."</option>
- <option value='0' selected>".translate("ONLY_THREADS", $DBH)."</option>
- </select>
-
- <select name='orderby'>
- <option value='desc'>".translate("NEWEST_FIRST", $DBH)."</option>
- <option value=''>".translate("OLDEST_FIRST", $DBH)."</option>
- </select>
- <input type='submit' value='OK'>
- </font>
- </form>
- </td>
-
-</tr>
-</table>
-</center>
-<hr>
-<p>
-";
-
-
-$PAGE .= "<table width='100%'>";
-
-if (sizeof($get_parents)) {
- $PAGE .= "<tr><td><b>$num_comments " . translate("COMMENTS", $DBH). " / ".sizeof($get_parents)." ". translate('THREADS', $DBH)." </b></td></tr>";
-}
-
-// Step 2 : print out the threads
-if ($num_comments) {
- foreach ($get_parents as $thread) {
- $PAGE .= print_message($thread, 0, $threshold, $get_message, $get_children, $template);
- }
-}
-
-$PAGE .= "</table>";
-
-$VALUES["COMMENT"] = $PAGE;
-
-////////////////////////////////////////////////////////////////////////
-
-
$root = 'galleries';
$cols = 5;
@@ -159,7 +82,8 @@
$chapeau = get_text_from_file($file, $parse);
continue;
}
-
+
+
// from here we are displaying an item.
@@ -242,6 +166,95 @@
$BIG_PATH = SITE_ROOT."/galleries/$parse/$file";
$VALUES["CONTENT"] = "<a href='$BIG_PATH'><img border='0' src='".SITE_ROOT."/galleries/$parse/pics_640x480/$file'></a>";
+ ////////////////////////////////////////////////////////////////////////
+ // the comments related to that gallery
+
+ //template init
+ $template = read_template(DYNA_ROOT."/galleries/comment.html");
+
+ // Step 1 : init stuff
+ $msg_infos = read_messages($DBH, $news, $orderby, $parse, $file);
+ $get_message = $msg_infos[0];
+ $get_parents = $msg_infos[1];
+ $get_children = $msg_infos[2];
+
+ $sql = "select count(*) from comments where _gallery = '$parse' and _imgname = '$file'";
+ $rqt2 = new query($DBH);
+ $rqt2->query($DBH, $sql);
+ $row2 = $rqt2->getrow();
+ $num_comments = $row2[0];
+
+
+ ///////////////
+ // Threshold
+ if (!isset($threshold)) {
+ $threshold = 0;
+ }
+
+ // The navbar
+ $PAGE .= "<center>
+ <p>
+ <hr>
+ <table bgcolor='#eeeeee' align='center' width='100%'>
+ <tr>
+ <td align='center'>
+ <font size='-1'>
+ <form action='add_comment.php'>
+ <input type='hidden' name='gallery' value='$parse'>
+ <input type='hidden' name='file' value='$file'>
+ <input type='submit' value='".translate("NEW_THREAD",$DBH)."'>
+ </font>
+ </form>
+ </td>
+ </tr>
+ <tr>
+ <td align='center'>
+ <form action='$PHP_SELF'>
+ <input type='hidden' name='gallery' value='$parse'>
+ <input type='hidden' name='file' value='$file'>
+ <font size='-1'>
+ <select name='threshold'>
+ <option value='-1'>".translate("SHOW_ALL_MESSAGES", $DBH)."</option>
+ <option value='0' selected>".translate("ONLY_THREADS", $DBH)."</option>
+ </select>
+
+ <select name='orderby'>
+ <option value='desc'>".translate("NEWEST_FIRST", $DBH)."</option>
+ <option value=''>".translate("OLDEST_FIRST", $DBH)."</option>
+ </select>
+ <input type='submit' value='OK'>
+ </font>
+ </form>
+ </td>
+
+ </tr>
+ </table>
+ </center>
+ <hr>
+ <p>
+ ";
+
+
+ $PAGE .= "<table width='100%'>";
+
+ if (sizeof($get_parents)) {
+ $PAGE .= "<tr><td><b>$num_comments " . translate("COMMENTS", $DBH). " / ".sizeof($get_parents)." ". translate('THREADS', $DBH)." </b></td></tr>";
+ }
+
+ // Step 2 : print out the threads
+ if ($num_comments) {
+
+ foreach ($get_parents as $thread) {
+ $PAGE .= print_message($thread, 0, $threshold, $get_message, $get_children, $template, $file, $parse);
+ }
+ }
+
+ $PAGE .= "</table>";
+
+ $VALUES["COMMENT"] = $PAGE;
+
+ ////////////////////////////////////////////////////////////////////////
+
$TEMPLATE = read_template(THEMES_PATH . "/gallery.html");
$HTML = get_hash_template($TEMPLATE["ALL"], $VALUES);
@@ -312,13 +325,15 @@
can draw messages and their children...
*/
-function print_message ($num_cmt, $level, $threshold, $get_message, $get_children, $template)
+function print_message ($num_cmt, $level, $threshold, $get_message, $get_children, $template, $file, $parse)
{
$HTML = "";
$get_message[$num_cmt]['REACT'] = REACT;
$get_message[$num_cmt]['SIZE'] = 100;
+ $get_message[$num_cmt]['file'] = $file;
+ $get_message[$num_cmt]['gallery'] = $parse;
// the limit of the identation : 5
if ($level > 5) $level = 5;
@@ -348,7 +363,7 @@
if (sizeof($get_children[$num_cmt])) {
foreach ($get_children[$num_cmt] as $child) {
- $HTML .= print_message($child, $level+1, $threshold, $get_message, $get_children, $template);
+ $HTML .= print_message($child, $level+1, $threshold, $get_message, $get_children, $template, $file, $parse);
}
}
@@ -362,7 +377,7 @@
for instance
$message[12][TITLE] send me the title of the #12 comment
*/
-function read_messages($dbh, $num_news, $orderby)
+function read_messages($dbh, $num_news, $orderby, $parse, $img)
{
// the hashtable with the info of the messages
$get_message = Array();
@@ -373,10 +388,12 @@
$sql = "select num_cmt, title, content, user_name, user_mail, date_ins, pere, _num_news
from comments
where _gallery = '$parse'
+ and _imgname = '$img'
order by num_cmt $orderby";
$rqt = new query($dbh);
$rqt->query($dbh, $sql) or send_sql_error($PHP_SELF, $sql, $rqt->error());
-
+
+
// fetching the message and filling the hash with infos...
while ($row = $rqt->getrow()) {
$get_message[$row[0]] = $row;
|
|
From: mdw c. <myd...@li...> - 2002-05-15 15:05:09
|
MyDynaWeb CVS committal
Author : sukria
Project : mydynaweb
Module : htdocs
Dir : mydynaweb/htdocs/galleries
Modified Files:
index.php
Added Files:
save_coment.php
Log Message:
Bon, j'y arrive progeressivement !
Maintenant le forum est greffé aux galleries d'images !
Il est possible de lier des commentaires aux images.
Je suis content car on va pouvoir intégré cela dans MDW 0.5 !
C'est cool :)
===================================================================
RCS file: /cvsroot/mydynaweb/mydynaweb/htdocs/galleries/index.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- index.php 15 May 2002 10:42:39 -0000 1.11
+++ index.php 15 May 2002 15:05:06 -0000 1.12
@@ -66,6 +66,16 @@
continue;
}
+ // do not display sh files (*.html)
+ if (preg_match('/^.+\.html$/', $file)) {
+ continue;
+ }
+
+ // do not display php files (*.php)
+ if (preg_match('/^.+\.php$/', $file)) {
+ continue;
+ }
+
// do not display sh files (*.sh)
if (preg_match('/^.+\.sh$/', $file)) {
continue;
@@ -202,27 +212,25 @@
<form action='add_comment.php'>
<input type='hidden' name='gallery' value='$parse'>
<input type='hidden' name='file' value='$file'>
- <input type='submit' value='".translate("NEW_THREAD",$DBH)."'>
+ <input style='font-size: 8px;' type='submit' value='".translate('COMMENT_PICTURE', $DBH)."'>
</font>
</form>
</td>
- </tr>
- <tr>
<td align='center'>
- <form action='$PHP_SELF'>
+ <form action='index.php'>
<input type='hidden' name='gallery' value='$parse'>
<input type='hidden' name='file' value='$file'>
<font size='-1'>
- <select name='threshold'>
+ <select style='font-size: 8px;' name='threshold'>
<option value='-1'>".translate("SHOW_ALL_MESSAGES", $DBH)."</option>
<option value='0' selected>".translate("ONLY_THREADS", $DBH)."</option>
</select>
- <select name='orderby'>
+ <select style='font-size: 8px;' name='orderby'>
<option value='desc'>".translate("NEWEST_FIRST", $DBH)."</option>
<option value=''>".translate("OLDEST_FIRST", $DBH)."</option>
</select>
- <input type='submit' value='OK'>
+ <input type='submit' style='font-size: 8px;' value='OK'>
</font>
</form>
</td>
|
|
From: mdw c. <myd...@li...> - 2002-05-15 21:49:24
|
MyDynaWeb CVS committal
Author : sukria
Project : mydynaweb
Module : htdocs
Dir : mydynaweb/htdocs/galleries
Modified Files:
index.php
Log Message:
Quelques corrections :
Les galleries s'ouvrent dans le site
Les affichage des 'meds' se font danbs une popup 'med'
LEs affichages tailles réeelles se font dans une popup 'full'
===================================================================
RCS file: /cvsroot/mydynaweb/mydynaweb/htdocs/galleries/index.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- index.php 15 May 2002 15:05:06 -0000 1.12
+++ index.php 15 May 2002 21:49:24 -0000 1.13
@@ -146,7 +146,7 @@
if ($mode=='popup') {
if ($img == "content") {
- $VALUES["GALLERYNAME"] = "<a href='".SITE_ROOT."/galleries/?mode=popup&img=content&parse=$parse'>$parse</a>";
+ $VALUES["GALLERYNAME"] = "<a href='".SITE_ROOT."/galleries/?&img=content&parse=$parse'>$parse</a>";
$VALUES["IMAGENAME"] = $file;
$VALUES["CONTENT"] = $browse;
@@ -161,12 +161,12 @@
$file = $img_ids[$i];
- if ($i==1) $VALUES["links"] = "<a href='?parse=$parse&img=$file&mode=popup'><<</a> ";
+ if ($i==1) $VALUES["links"] = "<a href='?parse=$parse&img=$file'><<</a> ";
- if ($i != $img_id) $VALUES["links"] .= "<a href='?parse=$parse&img=$file&mode=popup'>$i</a> ";
- else $VALUES["links"] .= "<a href='?parse=$parse&img=$file&mode=popup'><b>$i</b></a> ";
+ if ($i != $img_id) $VALUES["links"] .= "<a href='?parse=$parse&img=$file'>$i</a> ";
+ else $VALUES["links"] .= "<a href='?parse=$parse&img=$file'><b>$i</b></a> ";
- if ($i==$count) $VALUES["links"] .= "<a href='?parse=$parse&img=$file&mode=popup'>>></a> ";
+ if ($i==$count) $VALUES["links"] .= "<a href='?parse=$parse&img=$file'>>></a> ";
}
$file = $img;
@@ -284,7 +284,7 @@
$up = preg_replace('/\/\w+$/', '', $parse);
if (!strlen($up)) $upname = 'Galleries';
else $upname = $up;
- return "<center><a href='#' onclick=\"window.open('".SITE_ROOT."/galleries/?mode=popup&parse=$up&img=content', 'popup', 'width=800,height=600,toolbar=1,resizable=1');return(false);\"><img src='".SITE_ROOT."/images/folder-back.png' border='0' alt='Back'></a><br>[$upname]</center><br>";
+ return "<center><a href='".SITE_ROOT."/galleries/?parse=$up&img=content'><img src='".SITE_ROOT."/images/folder-back.png' border='0' alt='Back'></a><br>[$upname]</center><br>";
}
}
@@ -292,7 +292,7 @@
function print_folder ($file, $parse)
// prints out a folder icon with a link to the folder
{
- return "<a href='#' onclick=\"window.open('".SITE_ROOT."/galleries/?mode=popup&parse=$parse/$file&img=content', 'popup', 'width=800,height=600,toolbar=1,resizable=1');return(false);\"><img src='".SITE_ROOT."/images/folder.png' border='0'></a><br>$file";
+ return "<a href='".SITE_ROOT."/galleries/?parse=$parse/$file&img=content'><img src='".SITE_ROOT."/images/folder.png' border='0'></a><br>$file";
}
function print_file ($file, $parse) {
@@ -300,10 +300,18 @@
if (preg_match('/.*\.jpg/i', $file)) {
if (file_exists(DYNA_ROOT . "/galleries/$parse/pics_640x480/$file")) {
- return "<a href='".SITE_ROOT."/galleries/$parse/$file'><img src='".SITE_ROOT."/galleries/$parse/thumbs/$file' border='0'></a><br> <a href='".SITE_ROOT."/galleries/?mode=popup&parse=$parse&img=$file'>Med</a> | <a href='".SITE_ROOT."/galleries/$parse/$file'>Full</a>";
+ return "<a href='#' onclick=\"window.open('".SITE_ROOT."/galleries/$parse/$file', 'full', 'toolbar=yes,resizeable=yes');return(false);\"><img src='".SITE_ROOT."/galleries/$parse/thumbs/$file' border='0'></a>
+
+ <br>
+
+ <a href='#' onclick=\"window.open('".SITE_ROOT."/galleries/?mode=popup&parse=$parse&img=$file', 'med', 'resizeable=yes,toolbar=yes');return(false);\">Med</a>
+
+ |
+
+ <a href='#' onclick=\"window.open('".SITE_ROOT."/galleries/$parse/$file', 'full', 'toolbar=yes,resizeable=yes');return(false);\">Full</a>";
}
else {
- return "<a href='".SITE_ROOT."/galleries/$parse/$file'><img src='".SITE_ROOT."/galleries/$parse/thumbs/$file' border='0'></a><br><a href='".SITE_ROOT."/galleries/$parse/$file'>Full</a>";
+ return "<a href='#' onclick=\"window.open('".SITE_ROOT."/galleries/$parse/$file'', popup', 'menubar=false,resizable=yes');return(false);\"><img src='".SITE_ROOT."/galleries/$parse/thumbs/$file' border='0'></a><br><a href='".SITE_ROOT."/galleries/$parse/$file'>Full</a>";
}
}
else {
|
|
From: mdw c. <myd...@li...> - 2002-05-15 22:28:44
|
MyDynaWeb CVS committal
Author : sukria
Project : mydynaweb
Module : htdocs
Dir : mydynaweb/htdocs/galleries
Modified Files:
index.php
Log Message:
Yes !!!
Le bug des cases manquantes lors de l'afficgae de la gallerie est réglé.
Désormais, chaque ligne contient autant de case que $cols
===================================================================
RCS file: /cvsroot/mydynaweb/mydynaweb/htdocs/galleries/index.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- index.php 15 May 2002 21:49:24 -0000 1.13
+++ index.php 15 May 2002 22:28:44 -0000 1.14
@@ -44,11 +44,13 @@
if ($handle = opendir(DYNA_ROOT . "/$root/" . $parse)) {
$count = 0;
+ $jpeg_files = array();
// we start the parsing of the folder $parse
while (false !== ($file = readdir($handle))) {
-
-
+
+ $jpeg_files[sizeof($jpeg_files)] = $file;
+
// some exceptions ....
if ($file == '.' or
@@ -129,8 +131,12 @@
}
+ for ($i=$count%$cols; $i<$cols; $i++) {
+ $browse .= "\t<td> </td>\n";
+ }
+
$browse .= "</tr>\n";
- closedir($handle);
+ closedir($handle);
}
$browse = "<table align=center>\n$browse</table>\n";
|
|
From: mdw c. <myd...@li...> - 2002-05-15 22:35:39
|
MyDynaWeb CVS committal
Author : sukria
Project : mydynaweb
Module : htdocs
Dir : mydynaweb/htdocs/galleries
Modified Files:
index.php
Log Message:
Les espaces dans les nom de fichiers devraient etre regles.
===================================================================
RCS file: /cvsroot/mydynaweb/mydynaweb/htdocs/galleries/index.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- index.php 15 May 2002 22:28:44 -0000 1.14
+++ index.php 15 May 2002 22:35:36 -0000 1.15
@@ -163,6 +163,9 @@
}
else {
+
+ $img = str_replace(' ', '\ ', $img);
+
for ($i=1; $i<=$count; $i++) {
$file = $img_ids[$i];
|