Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules
Author Message
amber222
Regular
Regular



Joined: Jun 09, 2004
Posts: 79

PostPosted: Thu Jun 24, 2004 9:36 pm Reply with quote

How to choose images from a dropdown list.
I followed the instructions laid out in: http://www.karakas-online.de/EN-Book/ section 18.4.2.
I pasted the code, but it won't work. Parse error.
Tried several times - same thing.

Could it be that the code is different for 7.0 or did I mess up a simple paste?

Here's the code from the instructions:

in the write_review function:

Replace this:

Code:
if(is_admin($admin)) { 

echo "
<b>"._RIMAGEFILE.":</b><br>
<input type="text" name="cover" size="40" maxlength="100"><br>
<i>"._RIMAGEFILEREQ."</i><br><br>
";
}


With this:

Code:
if(is_admin($admin)) { 

echo "
<b>"._RIMAGEFILE.":</b><br>";

echo "<select name="cover">";
$path1 = explode ("/", "images/reviews/");
$path = "$path1[0]/$path1[1]";
$handle=opendir($path);
while ($file = readdir($handle)) {
if ( (ereg("^([_0-9a-zA-Z]+)([.]{1})([_0-9a-zA-Z]{3})$",$file)) AND $file != "AllTopics.gif") {
$tlist .= "$file ";
}
}
closedir($handle);
$tlist = explode(" ", $tlist);
sort($tlist);
for ($i=0; $i < sizeof($tlist); $i++) {
if($tlist[$i]!="") {
if ($topicimage == $tlist[$i]) {
$sel = "selected";
} else {
$sel = "";
}
echo "<option name="cover" value="$tlist[$i]" $sel>$tlist[$i]n";
}
}
echo "</select><br>";
echo "<i>"._RIMAGEFILEREQ."</i><br><br>
";
}


Can someone tell me how to make this work?
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Fri Jun 25, 2004 9:35 pm Reply with quote

Can you post the exact error message?
 
View user's profile Send private message
amber222







PostPosted: Mon Jun 28, 2004 11:27 pm Reply with quote

Thanks for responding to my inquiry. I don't have the exact message anymore. Tried redoing this, but ran into some other stuff I need to deal with, so I'm putting this one on the back burner. Thanks again.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Modules

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©