Photo Gallery
Started on the old forum in April 2008 · view the original in the archive · old links redirect here
TL;DR · summary of 53 replies
- - The max.php script is not working with the gallery script and needs to be replaced.
- - Users are facing issues viewing uploaded images on their mobile devices when using a form input type "file".
- - To resolve the image upload issue for mobile users, a different code snippet was provided by Guest: [code]
- - The solution involves adding specific PHP configuration settings in php.ini or global scope to allow all types of mobile phones to upload photos.
Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.
shouldn't u chmod 777 the directory where u upload the gallery images?
I can crate 1 directory???how I name ? gallery directory is create...but not upload images in this...External image (may be gone)
if like my post click:
khan u can update gallery script ???External image (may be gone)
if like my post click:
I can crate 1 directory???how I name ? gallery directory is create...but not upload images in this...External image (may be gone)
Don't mind me. I don't know much lol. i started learning just a couple weeks back
khan u can update gallery script ???External image (may be gone)
i will update the script soon....... but please use proper english users and myself finding it difficult to understand your language
eheh I'm italian External image (may be gone) lol
if like my post click:
eheh I'm italian External image (may be gone) lol
btw i am indian its ok (smiles)
File Updated
because i had done wrong html coding the script was not working also the biggest problem was max file was not creating image
the above max file also doesnt work for this gallery script anyways thanks for helping us (smiles)
max file from http://www.2wap.org/forums/index.php?showtopic=2390 this topic works
btw i am indian its ok (smiles) File Updated
because i had done wrong html coding the script was not working also the biggest problem was max file was not creating image
the above max file also doesnt work for this gallery script anyways thanks for helping us (smiles)
max file from http://www.2wap.org/forums/index.php?showtopic=2390 this topic works
change the max.php
<?php include("config.php"); include("core.php"); connectdb(); $pic = mysql_fetch_array(mysql_query("SELECT * FROM ibwf_gallery WHERE id ='".$id."'")); if($pic[3]!='') { $filename = "$pic[3]"; } else { $filename = "../images/nopic.jpg"; } $height= 100; $width= 100; // Content type header('Content-type: image/jpeg'); // Get new dimensions list($width_orig, $height_orig) = getimagesize($filename); if ($width && ($width_orig < $height_orig)) { $width = ($height / $height_orig) * $width_orig; } else { $height = ($width / $width_orig) * $height_orig; } // Resample $image_p = imagecreatetruecolor($width, $height); $image = imagecreatefromjpeg($filename); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig); // Output imagejpeg($image_p, null, 100); ImageDestroy ($image_p); ?>
You wanna say this max.php doesnot give thumbnail view of an image?
yeah that max script doesnt works on this script
this 1 does
<?php
$height= 100;
$width= 100;
// Content type
header('Content-type: image/jpeg');
if(!$filename)
$filename="./images/nopic.jpg";
// Get new dimensions
list($width_orig, $height_orig) = getimagesize($filename);
if ($width && ($width_orig < $height_orig)) {
$width = ($height / $height_orig) * $width_orig;
} else {
$height = ($width / $width_orig) * $height_orig;
}
// Resample
$image_p = imagecreatetruecolor($width, $height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);
// Output
imagejpeg($image_p, null, 100);
ImageDestroy ($image_p);
?>
yeah that max script doesnt works on this script
this 1 does
<?php $height= 100; $width= 100; // Content type header('Content-type: image/jpeg'); if(!$filename) $filename="./images/nopic.jpg"; // Get new dimensions list($width_orig, $height_orig) = getimagesize($filename); if ($width && ($width_orig < $height_orig)) { $width = ($height / $height_orig) * $width_orig; } else { $height = ($width / $width_orig) * $height_orig; } // Resample $image_p = imagecreatetruecolor($width, $height); $image = imagecreatefromjpeg($filename); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig); // Output imagejpeg($image_p, null, 100); ImageDestroy ($image_p); ?>
i dont think so
your professional coder you know better than me
anyways if it doesnt work just replace max.php but for me this works
and the last version not work External image (may be gone)
if like my post click:
my error...not view photo...only nopic images open 4 all External image (may be gone)
if like my post click:
problem my server???how I can fix this problem?? help
if like my post click:
when i click on add photo i got this error
I don't know how did you get into here, but there's nothing to show
0 Home
else if($action=="useav") { $gid = $_GET["gid"]; addonline(getuid_sid($sid),"Updating Avatar",""); echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; $getimg = mysql_fetch_array(mysql_query("SELECT itemurl FROM ibwf_gallery WHERE id='".$gid."'")); $avatar = $getimg[0]; $uid = getuid_sid($sid); $res = mysql_query("Update ibwf_users SET avatar='".$avatar."' WHERE id='".$uid."'"); if($res) { echo "Avatar was successfully updated
"; }else{ echo "Database Error!
"; } echo "
"; echo ""; echo "Home"; echo "
"; echo ""; } else if($action=="delgal") { $gid = $_GET["gid"]; addonline(getuid_sid($sid),"Deleting Gallery Photo",""); echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; $itemowner = mysql_fetch_array(mysql_query("SELECT uid FROM ibwf_gallery WHERE id='".$gid."'")); if(ismod(getuid_sid($sid))||getuid_sid($sid)==$itemowner[0]) { $res = mysql_query("DELETE FROM ibwf_gallery WHERE id='".$gid."'"); $res2 = mysql_query("DELETE FROM ibwf_galcomments WHERE pid='".$gid."'"); $res3 = mysql_query("DELETE FROM ibwf_prate WHERE pid='".$gid."'"); if($res||res2||res3) { echo "Photo Deleted From Gallery
"; }else{ echo "Database Error!
"; } }else{ echo "You can't delete this Photo"; } echo "
"; echo ""; echo "Home"; echo "
"; echo ""; } else if($action=="addgal") { $itemurl = $_POST["itemurl"]; $uid = getuid_sid($sid); $nopl = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$uid."'")); if($nopl[0]=='M') { $usex = "M"; }else if($nopl[0]=='F'){ $usex = "F"; }else{ $usex = "M"; } echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; $res = mysql_query("INSERT INTO ibwf_gallery SET uid='".$uid."', itemurl='".$itemurl."', sex='".$usex."'"); if($res) { echo "User Photo Added
"; }else{ echo "Database Error
"; } echo "User Gallery
"; echo ""; echo "Home"; echo "
"; echo ""; }else if($action=="commentadd") { $text = $_POST["text"]; $prate = $_POST["prate"]; $gid = $_GET["gid"]; addonline(getuid_sid($sid),"Adding Photo Comment",""); echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; $crdate = time(); $uid = getuid_sid($sid); $res = false; if(trim($text)!="") { $res = mysql_query("INSERT INTO ibwf_galcomments SET text='".$text."', byuser='".$uid."', time='".$crdate."', pid='".$gid."'"); } if($res) { echo "Comment Added Successfully
"; }else{ echo "Error Adding Comment"; } if($prate!="") { $res2 = mysql_query("INSERT INTO ibwf_prate SET uid='".$uid."', pid='".$gid."', prate='".$prate."'"); if($res2) { echo "Photo rated successfully
"; }else{ echo "Database Error!
"; } } echo "
"; echo ""; echo "Home"; echo "
"; echo ""; }
this version is 4 wapdesire...I think u use wizard version...
if like my post click:
i try to add upload option
its uploading picture in correct place but it dont show photo?
echo "<form method="post" enctype="multipart/form-data" action="genproc.php?action=addgal&sid=$sid">"; echo "<input type="file" name="itemurl"> "; echo "<input type="Submit" name="uploadform" value="Upload">"; echo "</form>";
why???????????????????? guide me plssss