Need help on artmedic's Diashow mod

PHP, Ajax, CSS, HTML, Javascript
Eben für die wirklich Harten, die alles selber machen.
Antworten
Ross
Beiträge: 2
Registriert: So 11.Dez, 2005 16:56
Wohnort: Warren, MI. USA
Kontaktdaten:

Need help on artmedic's Diashow mod

Beitrag von Ross »

HI, if this is inappropriate to post here, please delete. Sorry I only speak English.

I am using artmedic's Diashow mod and the Smilies Album 1.3.4 mod by OXPUS to create a slide show in my header. The Smilies Album mod works great for uploading pictures for this slide show.

The slide show can be viewed here: http://www.ross-soderberg.com/phpBB2/portal.php
Here is where pictures are uploaded: http://ross-soderberg.com/phpBB2/smilies.php

My only problem is that I would like the slides shown in reverse order. I have tried contacting artmedic for a solution and received no help or response. See code of slide show below. Is there anyone that can help me change code to show pictures in reverse order? Your help would be greatly appreciated. Yes, I can download pictures & reupload them in reverse order, but that has to be done every time someone adds a picture.

Code: Alles auswählen

<?php 
//Geben Sie hier den Titel der Diashow ein
$titel = "Best of MTH Finds Slide Show Listings
";
//Ab hier nichts mehr ändern
$id = $_GET['id'];
if(!isset($id))
{
$id = "0";
$verz = opendir('.');
while($file = readdir($verz)) 
{  
$info = @getimagesize($file);  
if($file != "." && $file != ".." && $file!="navigation.gif" && $file!="close.gif"  &&  !is_dir($file) && $info[2] == "1" || $info[2] == "2" || $info[2] == "3" || $info[2] == "4" ) 
{
$b .= "$file\n";
}
}
closedir($verz); 
$b1 = @fopen("diashow.txt", "w");
flock($b1,2);
fputs($b1, $b);
flock($b1,3);
fclose($b1);
}
$daten = "diashow.txt";
$bilder = file($daten);
$ende1 = count($bilder);
$ende = "$ende1"-"1";
$no = $id;
$bild = $bilder[$no];
$bild = chop($bild);
$anzeige = "$no"+"1";

//$preload = file_get_contents($daten);
$pre = fopen($daten, "r");
$preload = fread($pre, filesize($daten));
fclose($pre);

$preload = chop($preload);
$preload = ereg_replace("\n", "','", $preload);
$preload = "'"."$preload"."'";
?>
<html>
<head>
<title><?php echo $titel ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function tmt_winControl(id,c){ 
	var d=eval(id)==null||eval(id+".closed");
	if(!d){eval(id+"."+c);}
}
//-->
</script>
<!--  
artmedic diashow 1.0, Copyright Ellen Baitinger 2003, artmedic webdesign, http://www.artmedic.de
Dieses Programm ist Freeware und kann kostenlos für kommerzielle und private Zwecke 
verwendet und adaptiert werden, solange die Links auf artmedic webdesign und die Hinweise auf die Autorenschaft und das Copyright intakt bleiben.
Dieses Programm darf nicht gegen Geld veräußert oder anderweitig zu Geld gemacht werden.
-->
</head>
<body bgcolor="#000000" leftmargin="14" topmargin="0" marginwidth="0" marginheight="0"  onLoad="MM_preloadImages(<?php echo $preload ?>)">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
      <td align="center" valign="top"><font color="#CCCCCC" size="2" face="Arial, Helvetica, sans-serif"><?php echo $titel ?></font><br>
<a href="http://www.artmedic.de" target="_blank"><font color="#666666" size="1" face="Arial, Helvetica, sans-serif">(artmedic slideshow) script
          by artmedic webdesign</font></a><a href="javascript:;" onClick="tmt_winControl('self','close()')"><br>
</td>
  </tr>
  <tr>
    <td colspan="2" align="center"><table border="0" cellspacing="0" cellpadding="0">
      <tr>
    <td colspan="2"><p><img src="controls\leftnavigation.gif" width="75" height="49" border="0" usemap="#Map"></p>
        <td>
		<?php 
		$size= getimagesize($bild);
		$width = $size[0];
		$height = $size[1];  
		echo "<img src=\"$bild\" width=\"$width\" height=\"$height\" border=\"0\">";
		?>
</td>



    <td colspan="2"><p><img src="controls\navigation.gif" width="75" height="49" border="0" usemap="#Map2"></p>
    </td>
  </tr>
</table>
<map name="Map">
<area shape="circle" coords="26,24,13" href="index.php?id=0" alt="Start">
<area shape="circle" coords="59,25,14" href="index.php?id=<?php 
		if($no > 0){$id = "$no"-"1";}
		else{$id="0";}
		echo $id;?> " alt="Previous">
</map>
<map name="Map2">
<area shape="circle" coords="26,24,13" href="index.php?id=<?php 
if($no<$ende){$id = "$no"+"1";}
		else{$id = $ende;}
		echo $id;?> " alt="Next">
<area shape="circle" coords="59,25,14" href="index.php?id=<?php echo $ende;?>" alt="End">
</map>
</body>
</html>
Zuletzt geändert von Ross am So 11.Dez, 2005 17:07, insgesamt 1-mal geändert.
Benutzeravatar
cbrkiter
Beiträge: 170
Registriert: Fr 26.Nov, 2004 01:30
Kontaktdaten:

Beitrag von cbrkiter »

I don't know this script and I'm not sure that my idea is right, but you could try this:

In Line 28 you have the array: $bilder = file($daten);

After add: $bilder = array_reverse($bilder);

I don't know the contents of the file "diashow.txt", but after this line is no other array which will be open or sort or anything else.
1. 'Man muss das Unm?gliche versuchen, um das M?gliche zu erreichen!' (Hermann Hesse)
2. 'The best way to learn something is to get your hands dirty and do it!' (keine Ahnung))
3. http://www.thw-kamen-bergkamen.de
Ross
Beiträge: 2
Registriert: So 11.Dez, 2005 16:56
Wohnort: Warren, MI. USA
Kontaktdaten:

Beitrag von Ross »

A Big Thank You goes out to cbrkiter for helping me on this problem.
It worked great. I have been working on this project for over a year now.
This code you provided me was the last piece of the puzzle.
Thanks again,
Ross
Antworten