Photo Gallery
Version: 1.0.0 Category: Other useful scripts
Description: lavalair xhtml ver---photo comments---rate photos---upload photos---male nd female photo category---admin can delete photos nd comments
Started on the old forum in April 2008 · view the original in the archive · old links redirect here
Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.
Photo Gallery
Version: 1.0.0 Category: Other useful scripts
Description: lavalair xhtml ver---photo comments---rate photos---upload photos---male nd female photo category---admin can delete photos nd comments
yes....but I use wapdesire version of lavalair...External image (may be gone)
if like my post click:
I install this gallery but not open photos...External image (may be gone)
if like my post click:
I have a problem at this script External image (may be gone)
if like my post click:
I upload the photo but I view the gallery photo not open...External image (may be gone)
if like my post click:
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);
?>
and code for the random image for this gallery script is
$sql=mysql_fetch_array(mysql_query("SELECT uid, itemurl FROM ibwf_gallery ORDER BY RAND() LIMIT 1"));
$nick = getnick_uid($sql[0]);
echo "<img src=\"$sql[1]\" alt=\"$sql[0]\"/><a href=\"index.php?action=viewuser&who=$sql[0]&sid=$sid\">$nick</a>";
I retry now External image (may be gone)
if like my post click:
not work... if I click at images upload this is the link of images:
if like my post click:
not work... if I click at images upload this is the link of images:
upload the nopic.jpg in you image folder
but I upload the image and not work...not view images correct...only nopic.jpg appars...External image (may be gone)
if like my post click:
but I upload the image and not work...not view images correct...only nopic.jpg appars...External image (may be gone) goto phpmyadmin.then put this SQL query
DROP TABLE IF EXISTS `ibwf_gallery`;
CREATE TABLE `ibwf_gallery` (
`id` int(100) NOT NULL auto_increment,
`uid` int(100) NOT NULL,
`sex` varchar(255) NOT NULL,
`itemurl` varchar(255) NOT NULL,
`file` varchar(250) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`itemurl`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3;
INSERT INTO `ibwf_gallery` VALUES (1, '1', 'M', '[url]http://coolbd.wen.ru/anim/1.jpg','a'[/url]);
INSERT INTO `ibwf_gallery` VALUES (2, '1', 'M', '[url]http://coolbd.wen.ru/anim/2.jpg','b'[/url]);
it doesnt work bcoz of my bad coding anyways thanks 4the correct SQL
after using above SQL file pic is showing
that means u need to add file > a
there seems to be problem with this code
echo "<form action=\"genproc.php?action=addgal&sid=$sid\" method=\"post\">";
echo "Image URL: <input name=\"itemurl\" type=\"file\" value=\"\"/>
";
echo "
<input type=\"submit\" value=\"Add Photo\"/>";
echo "</form>";
by using itemurl user can only add http image links so i added file option
just checked my SQL it was correct the problem is with the above code
goto phpmyadmin.then put this SQL query
DROP TABLE IF EXISTS `ibwf_gallery`; CREATE TABLE `ibwf_gallery` ( `id` int(100) NOT NULL auto_increment, `uid` int(100) NOT NULL, `sex` varchar(255) NOT NULL, `itemurl` varchar(255) NOT NULL, `file` varchar(250) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `name` (`itemurl`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3; INSERT INTO `ibwf_gallery` VALUES (1, '1', 'M', 'http://coolbd.wen.ru/anim/1.jpg','a'); INSERT INTO `ibwf_gallery` VALUES (2, '1', 'M', 'http://coolbd.wen.ru/anim/2.jpg','b');
but if upload this code works upload gallery or not???
if like my post click:
but I upload the image and not work...not view images correct...only nopic.jpg appars...External image (may be gone)
shouldn't u chmod 777 the directory where u upload the gallery images?
it doesnt work bcoz of my bad coding anyways thanks 4the correct SQL
after using above SQL file pic is showing
that means u need to add file > a
there seems to be problem with this code
echo "<form action=\"genproc.php?action=addgal&sid=$sid\" method=\"post\">"; echo "Image URL: <input name=\"itemurl\" type=\"file\" value=\"\"/> "; echo " <input type=\"submit\" value=\"Add Photo\"/>"; echo "</form>";by using itemurl user can only add http image links so i added file option just checked my SQL it was correct the problem is with the above code
If you use file as input type you have to use file uploader but if you use previous script you need to put photo URLs using the admin.php then everything is ok for the previous script.while you are adding urls with admin.php,the admproc.php INSERTs itemurl in ibwf_gallery sql table for the code in admproc.php
mysql_query("INSERT INTO ibwf_gallery SET uid='".$uid."', itemurl='".$itemurl."', sex='".$usex."'");