SitePoint Sponsor

User Tag List

Page 12 of 31 FirstFirst ... 2891011121314151622 ... LastLast
Results 276 to 300 of 767
  1. #276
    SitePoint Member
    Join Date
    Dec 2004
    Location
    Finland
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Infizi
    "<a target='_blank' href='$images_dir.$row[2]'."'><img src='".$images_dir."/tb_".$row[2]."' border='0' alt='".$row[1]."' /><br />".$row[1]."</a>";
    Thanks, it works now, but i fixed the code:
    "<a target='_blank' href='$images_dir/".$row[2]."'><img src='".$images_dir."/tb_".$row[2]."' border='0' alt='".$row[1]."' /><br />".$row[1]."</a>";

  2. #277
    Obsessive designer Infizi's Avatar
    Join Date
    May 2004
    Location
    North Pole
    Posts
    450
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    remember to remove /tb_ from both sides

    PHP Code:
    echo "<a target='_blank' href='$images_dir/".$row[2]."'><img src='".$images_dir."/".$row[2]."' border='0' alt='".$row[1]."' /><br />".$row[1]."</a>"
    Quote Originally Posted by duris
    Thanks, it works now, but i fixed the code:
    "<a target='_blank' href='$images_dir/".$row[2]."'><img src='".$images_dir."/tb_".$row[2]."' border='0' alt='".$row[1]."' /><br />".$row[1]."</a>";

  3. #278
    SitePoint Member nickthibert's Avatar
    Join Date
    May 2004
    Location
    Ottawa
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is there a way to make the filenames generated to be non-repeating non-sequential? (using numeric and alpha characters)

  4. #279
    tweetie
    SitePoint Community Guest
    I want to upload an entire folder in 1 time, is that also possible?

  5. #280
    Obsessive designer Infizi's Avatar
    Join Date
    May 2004
    Location
    North Pole
    Posts
    450
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by tweetie
    I want to upload an entire folder in 1 time, is that also possible?
    hmm, youd have to use a readir() and fopen() loop. Not sure it is possible but hope this pointer helps
    New Design - PHP Slowly flowing in!

    Infizi Studio's

  6. #281
    Obsessive designer Infizi's Avatar
    Join Date
    May 2004
    Location
    North Pole
    Posts
    450
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by nickthibert
    is there a way to make the filenames generated to be non-repeating non-sequential? (using numeric and alpha characters)
    i use
    PHP Code:
    $filename md5(md5($photo['tmp_name'].time()).time());
    $filename substr($filename010).".".$known_photo_types[$photo['type']]; 
    New Design - PHP Slowly flowing in!

    Infizi Studio's

  7. #282
    SitePoint Zealot soart's Avatar
    Join Date
    Nov 2003
    Location
    Norwich UK
    Posts
    134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    this bit isn't working?

    Warning: getimagesize: Unable to open 'rsname/125.jpg' for reading. on line 98


    line 98 is

    PHP Code:
    $size GetImageSize('rsname/' $filename); 
    rsname is name of directory where previously moved images are placed referenced by $images_dir = 'rsname/';

    block of code
    PHP Code:
    $resultthumb=mysql_query("select filename from resale1 where id ='$id'");
        
    $fileresult=mysql_fetch_array($resultthumb);
        
    $filename=$fileresult['filename'];
        
        
    $size GetImageSize('rsname/' $filename); 
        if(
    $size[0] > $size[1]){
        
    $new_width 100;
        
    $new_height = (int)(100 $size[1]/$size[0]);
        }
        else{
        
    $new_width = (int)(100 $size[0]/$size[1]);
        
    $new_height 100;
        }
        
        
    exec("$imagemagickPath/convert -geometry " "{$new_width}x{$new_height} " "$images_dir/$filename $images_dir/tb_$filename"); 
    trying to get resized image to display as

    <?php $img = "<td align center><img src=rsname/tb_$filename></td>/n"

  8. #283
    Chief Procrastinator arano's Avatar
    Join Date
    Mar 2003
    Location
    Australia
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My host does not support copy functions as there is a restriction on open_basedir, does anyone know how I can change this code to use the move uploaded files function rather that the code below.

    PHP Code:
    copy($photos_uploaded['tmp_name'][$counter], $images_dir."/".$filename); 
    The above code is making the script spit out errors

  9. #284
    Obsessive designer Infizi's Avatar
    Join Date
    May 2004
    Location
    North Pole
    Posts
    450
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by arano
    My host does not support copy functions as there is a restriction on open_basedir, does anyone know how I can change this code to use the move uploaded files function rather that the code below.

    PHP Code:
    copy($photos_uploaded['tmp_name'][$counter], $images_dir."/".$filename); 
    The above code is making the script spit out errors
    your images dir will need to be a full path, ie /home/user/path
    New Design - PHP Slowly flowing in!

    Infizi Studio's

  10. #285
    SitePoint Member
    Join Date
    Dec 2004
    Location
    sando
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    error image create from

    hello

    i have tried the script as it is from the original files,
    i have changed my config file with correct details

    when i submit a photo,

    error comes up

    Fatal error: Call to undefined function ImageCreateFromJPEG() in /web/kahmad/ftpaccess/pub/upload.php on line 73


    the server has got GD installed so what can it be?
    i cant think of anything what could it be?

    please help!

  11. #286
    Knudo
    SitePoint Community Guest
    well I just had some other errors when I uploaded, but making a directory called "photos" in the gallery folder seemed to solve the problem.
    Now I am trying to find out how to manage the categories from the browser...any tips?

    Knud

  12. #287
    Obsessive designer Infizi's Avatar
    Join Date
    May 2004
    Location
    North Pole
    Posts
    450
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try this:
    1 - give a fully qualified path "/home/user/public_html/rsname/"
    2 - make the current path relative "/rsname/"

    if they both fail then check that GDLib is installed properly.


    Quote Originally Posted by soart
    Warning: getimagesize: Unable to open 'rsname/125.jpg' for reading. on line 98


    line 98 is

    PHP Code:
    $size GetImageSize('rsname/' $filename); 
    rsname is name of directory where previously moved images are placed referenced by $images_dir = 'rsname/';

    block of code
    PHP Code:
    $resultthumb=mysql_query("select filename from resale1 where id ='$id'");
        
    $fileresult=mysql_fetch_array($resultthumb);
        
    $filename=$fileresult['filename'];
     
        
    $size GetImageSize('rsname/' $filename); 
        if(
    $size[0] > $size[1]){
        
    $new_width 100;
        
    $new_height = (int)(100 $size[1]/$size[0]);
        }
        else{
        
    $new_width = (int)(100 $size[0]/$size[1]);
        
    $new_height 100;
        }
     
    exec("$imagemagickPath/convert -geometry " "{$new_width}x{$new_height} " "$images_dir/$filename $images_dir/tb_$filename"); 
    trying to get resized image to display as

    <?php $img = "<td align center><img src=rsname/tb_$filename></td>/n"
    New Design - PHP Slowly flowing in!

    Infizi Studio's

  13. #288
    knudo
    SitePoint Community Guest
    What does this error mean...no I did not upload more than 8 mb of photos

    Knudo

  14. #289
    Obsessive designer Infizi's Avatar
    Join Date
    May 2004
    Location
    North Pole
    Posts
    450
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Knudo,
    I dont quite understand what you want, but i can see that originally you didnt have the folder there, so it could not copy the files to a folder that dosent exist.
    Please tell us the error and we can help!!!!!!!


    Quote Originally Posted by knudo
    What does this error mean...no I did not upload more than 8 mb of photos

    Knudo
    New Design - PHP Slowly flowing in!

    Infizi Studio's

  15. #290
    Obsessive designer Infizi's Avatar
    Join Date
    May 2004
    Location
    North Pole
    Posts
    450
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Youll need to create a PHP front end for the database backend!!! Its very simple, if you cant do it then show me your website and current scripts and i will make something for you to get you going!!!

    Have a great new year everyone!!!


    Quote Originally Posted by Knudo
    well I just had some other errors when I uploaded, but making a directory called "photos" in the gallery folder seemed to solve the problem.
    Now I am trying to find out how to manage the categories from the browser...any tips?

    Knud
    New Design - PHP Slowly flowing in!

    Infizi Studio's

  16. #291
    SitePoint Member
    Join Date
    Jan 2005
    Location
    England
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am having a problem with uploading files because the copy function (and others) are trying to write to /tmp

    Here is one of the errors I am getting:

    Warning: copy(): open_basedir restriction in effect. File(/tmp/php1Va9tH) is not within the allowed path(s): (/home/fatpigeonuk/public_html) in /home/fatpigeonuk/public_html/gallery/upload.php on line 51

    How can I fix this?

    Thanks,
    Ludders

  17. #292
    SitePoint Guru
    Join Date
    Aug 2004
    Location
    Earth
    Posts
    737
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey people,

    This has been great reading .. Thumbs up to you all ..

    Drew .. Yer the man .. I tired your DrewsVersionOfMayanksPhotoGallery.zip .. works great ..

    Couple of thoughts I have ..

    I cant find the max file upload size .. It seems it set to 2097152 Bytes ..

    Maybe a few addons ..

    A signup form for public photo submissions .. with intergrated sessions so only admin can delete / rename photos & catagories etc .. public can only upload images and create catagories .. Also rights so when they first signup they are given say 1 .. So they cant actually upload untill admin gives them 2 ..?

    and ..

    allow sub catagories to be added .. would be a great option to have

    Also ..

    Allow an admin option to have the large images opened in new window .. using javascript so browser resizes to image size ..

    and maybe ..

    Another method on the index page so the way the images are displayed in tables/borders etc can easliy edited by noobies .. ?

    Anyway .. great job guys .. This is exactly what I am after .. the Coppermine Photo Gallery etc are to tedius and have very bad admin panel in the rsepect of u cant turn off latest editions .. top 10 .. bla bla .. I like simple like you guys have created ..

    Great Job!
    Last edited by _matrix_; Jan 4, 2005 at 23:03.

  18. #293
    Chief Procrastinator arano's Avatar
    Join Date
    Mar 2003
    Location
    Australia
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ludders
    I am having a problem with uploading files because the copy function (and others) are trying to write to /tmp

    Here is one of the errors I am getting:

    Warning: copy(): open_basedir restriction in effect. File(/tmp/php1Va9tH) is not within the allowed path(s): (/home/fatpigeonuk/public_html) in /home/fatpigeonuk/public_html/gallery/upload.php on line 51
    use move_uploaded_files instead of using copy and use the full pathname to your directory like this:
    PHP Code:
    move_uploaded_file($photos_uploaded['tmp_name'][$counter], "/home/fatpigeonuk/public_html/gallery".$filename); 
    That is roughly it but ive changed my script a little so not exactly the same.
    Aaron

  19. #294
    SitePoint Member
    Join Date
    Jan 2005
    Location
    England
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cheers! That worked. Also, is there any way I can make the image dir one outside of the same site. I have loads of space on my ntlworld account and would like to upload the images there instead of on my site (i am running out of space).

    Thanks,
    Ludders

  20. #295
    Obsessive designer Infizi's Avatar
    Join Date
    May 2004
    Location
    North Pole
    Posts
    450
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb

    I finnaly got round to looking at Drews Gallery Version.

    I have done quite a lot more with the gallery including making a user area so users can manage photos to, private gallerys only available to registered users, public gallerys available to all etc etc etc, plus standard admin stuff, and sub categorys, user login expration, etc etc etc.
    Plus its fully customisable via a clever template system

    Is anyone wanting this more advanced version? If people do i can get it all working properly. I have some spare time, so if people want other stuff added in too then let me know, please PM with subject "Wanted Features" and just list your ideas. Credits will be given to anyone who helps/inputs good ideas that are used of course too!!!
    New Design - PHP Slowly flowing in!

    Infizi Studio's

  21. #296
    Chief Procrastinator arano's Avatar
    Join Date
    Mar 2003
    Location
    Australia
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am getting a memory error when I am uploading photos.

    The filesize of the image is only 800kb and my php.ini setting on my web host states that the memory_limit is 8388608, how can my script be throwing errors when the allowed memory limit is 9 times the size of the image. The max upload size is 6097152 so its not that either. Anybody got an idea what is going on?

    edit- I read somewhere that this might be due to image resolution problems rather than filesize as the image is converted to bitmap on upload and hence a bigger res image makes a bigger file size in bmp format- can anyone confirm this??

    Aaron
    Last edited by arano; Jan 6, 2005 at 06:38.

  22. #297
    SitePoint Guru
    Join Date
    Aug 2004
    Location
    Earth
    Posts
    737
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Infizi,

    I am very interested in getting more advanced features into this gallery ..

    The only ideas I have at the moment are the ones posted a few posts up .. Also an installer could be good as well .. This script with the features you spoke about would be perfect!

    I have Drews Gallery Version working like a charm in themed sites ..

    Great job guys

  23. #298
    Chief Procrastinator arano's Avatar
    Join Date
    Mar 2003
    Location
    Australia
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In regards to my earlier post I have changed a few settings to make it work, it anyone is interested. I read that it is down to imagecreatefromjpeg using up all the memory it can, but i used ini_set() to double the memory in my php.ini file and the upload worked.

    The function memory_get_usage() showed that the memory used to create the file was nearly at the new limit set which it a lot !!

    Temporarly setting the memory should be fine, as its only when the image is uploaded then it will be reset.
    Aaron

  24. #299
    Obsessive designer Infizi's Avatar
    Join Date
    May 2004
    Location
    North Pole
    Posts
    450
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by _matrix_

    I cant find the max file upload size .. It seems it set to 2097152 Bytes ..

    A signup form for public photo submissions ..

    only admin can delete / rename photos & catagories etc ..

    public can only upload images and create catagories ..

    Also rights so when they first signup they are given say 1 .. So they cant actually upload untill admin gives them 2 ..?

    allow sub catagories to be added .. would be a great option to have

    Allow an admin option to have the large images opened in new window .. using javascript so browser resizes to image size ..

    Another method on the index page so the way the images are displayed in tables/borders etc can easliy edited by noobies .. ?
    All those ideas will be taken into thought when making my version, also the installer package seems a good idea!!!!!

    I will start work tonight, get a simple site up and post updates on it etc,
    New Design - PHP Slowly flowing in!

    Infizi Studio's

  25. #300
    SitePoint Enthusiast drewf's Avatar
    Join Date
    Mar 2002
    Location
    Calgary, AB
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well you should post your code here to the forum in a zip file like I did with ALL the advanced features. The PM method does not make it very easy to attain the code. My code was posted so long ago that it's not even funny any more. Remember the code that I posted was a collaboration effort by lots of people including myself.

    I am glad someone finally took this to another level. This was the idea right from the start. Now hopefully others will post their code here too. This tutorial was supposed to be a learning process and a starting point for something bigger and better so lets see your products people!

    Quote Originally Posted by Infizi
    I finnaly got round to looking at Drews Gallery Version.

    I have done quite a lot more with the gallery including making a user area so users can manage photos to, private gallerys only available to registered users, public gallerys available to all etc etc etc, plus standard admin stuff, and sub categorys, user login expration, etc etc etc.
    Plus its fully customisable via a clever template system

    Is anyone wanting this more advanced version? If people do i can get it all working properly. I have some spare time, so if people want other stuff added in too then let me know, please PM with subject "Wanted Features" and just list your ideas. Credits will be given to anyone who helps/inputs good ideas that are used of course too!!!
    Drew

    "The town where I grew up has a zip code of E-I-E-I-O."


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •