I have a problem, my knowledge’s about PHP is limited.
I use the 2.1 version of the Updownload module on PN .750 gold (http://www.petzi-juist.de/)
The module shows screenshots next to the downloads on the right site. I managed to move the screenshot to the left side with success. The only problem is if there is no images available it show noting. I traced down the piece of code responsible for this. Look at the following code:
File name: dl-util.php
//
//shows the screenshot
//thanks to: Luis Carlos Bethancourt
//
function get_screenshot($lid)
{
include("modules/UpDownload/includes/config.php");
echo "
| <center>"; if($screenshotlink =="") { $screenshotlink = "modules/UpDownload/shots"; } while($ext = current($screenshot_extensions)) { if(file_exists($screenshotlink."/thumbs/$lid".$ext)) { $fp = @fopen($screenshotlink."/thumbs/$lid".$ext,"r"); $small_ext = $ext; } if(file_exists($screenshotlink."/$lid".$ext)) { $fp = @fopen($screenshotlink."/thumbs/$lid".$ext,"r"); $large_ext = $ext; } next($screenshot_extensions); } if ($fp) { if(file_exists($screenshotlink."/$lid".$large_ext)) { // echo " /* else { echo _NOPICTURE." "._AVAILABLE ; */ } echo"</center> |
}
As you can see there is a second ELSE structure!!
When I un command the following lines I get a parser error
else
{
echo _NOPICTURE."
"._AVAILABLE ;
}
What’s wrong? How can I nest a IF then ELSE structure like this?
I hope somebody can shine some light on this, so I and others can learn from this.
Any help is appreciated,
Michiel
