WordPress.org

Ready to get started?Download WordPress

Forums

image upload>thumbnail hack + odher improvements (27 posts)

  1. migon
    Member
    Posted 10 years ago #

    I made new hack on b2upload.php file because any hacks from this forum not working mutch well. Hack is based on old B2 upload hack and has lot of improvements.
    + No imagemagic (GD only)
    + Truecolor thumbnail image creation
    + Ratio image (thumbnail) resize. Images wider or higher than $MAX_SIZE will be resized
    + Script use low quality functions if high quality functions not supported
    + Small additions in stat part and litle thumbnail is shown on upload form page
    + openwin.js file added (JS to open new window thumb.php)
    + File thumb.php added. File show fullsize images as JS popup window.
    Window automatically resize to image size
    Download WordPress b2upload.php hack

  2. Anonymous
    Unregistered
    Posted 10 years ago #

    "+ No imagemagic (GD only)"
    could you explain that to me? i've been wanting something like this but i want to make sure that it will work.

  3. NuclearMoose
    Member
    Posted 10 years ago #

    Migon,
    Do you have a URL where we could see a page created with the hack?
    Thanks.
    Craig.

  4. migon
    Member
    Posted 10 years ago #

    >"+ No imagemagic (GD only)"
    >
    >could you explain that to me? i've been wanting something like this but i want to
    > make sure that it will work.
    Script use PHP functions for images, this functions is available only on hosting systems where is installed GD extension for PHP ( see phpinfo(); on your hosting ). This extension is standart part of PHP package. More at ww.php.net or search more information on google.
    BTW:Imagemagic is standalone tool for image manipulating and isn't available everywhere
    --------------
    TO: NuclearMoose
    At this time unfortunately not, but in short time I start new blog and than you can see hack in action. But why do you donĀ“t make some tests of this hack. Installation / uninstallation is very simple
    ----
    Sorry for my english :-D

  5. Nimil
    Member
    Posted 10 years ago #

    thank you very much! (i finally registered!) now i know what the heck gd is and i figured out that i do infact have it :D

  6. Nimil
    Member
    Posted 10 years ago #

    there's something wrong with your hack :/
    when i went to upload a picture i ended up with this after it uploaded:
    Warning: move_uploaded_file(/public_html/blog/junk/stripes5.jpg): failed to open stream: No such file or directory in /home/nimil/public_html/blog/wp-admin/b2upload.php on line 232
    Warning: move_uploaded_file(): Unable to move '/tmp/phpHA07HC' to '/public_html/blog/junk/stripes5.jpg' in /home/nimil/public_html/blog/wp-admin/b2upload.php on line 232
    Warning: copy(/public_html/blog/junk/stripes5.jpg): failed to open stream: No such file or directory in /home/nimil/public_html/blog/wp-admin/b2upload.php on line 235
    Couldn't Upload Your File to /public_html/blog/junk/stripes5.jpg.
    i have no idea what the heck it's talking about, and my uploads worked just fine until i installed this hack :(

  7. macewan
    Member
    Posted 10 years ago #

    really like the idea behind this. i'm working on incorporating a simple copy right message to be automaticly added to an image. using gd also.
    http://www.macewan.org/wordpress/index.php is a quick and dirty example - minus my work - of the above *.zip file. i created an image directory on under this working wordpress directory to store the images. also a edit is made the the thumbs.php file to reflect where the image is stored. (erased the ./data/ portion)

  8. mulinux
    Member
    Posted 10 years ago #

    Migon,
    I'm using your hack. It's great - but I had to make some changes to get it working. There were some hardcoded paths and some javascript issues. Most of the trouble was with thumb.php
    My website is hosted in a virtual host environment, so there are many restrictions regarding how I can browse the filesystem. I think most of my problems weren't the fault of your hack, rather the original b2upload.php
    My site is simple, only for my personal use. You can check it out http://yunt.net
    Thanks for the hack.
    Sean

  9. mulinux
    Member
    Posted 10 years ago #

    oh one more thing - the "move" feature which renames duplicate files is completely broken. :(
    I got the same issues as Nimil. If I get around to fixing this, I'll post it here.

  10. macewan
    Member
    Posted 10 years ago #

    I'm going to use this hack (mod'd a little) for projects on sourceforge. Will add more options in the b2upload window. Like multi image upload, a button that takes you back to upload option once current image thumb is displayed. This will be useful for screenshots on projects.
    :)

  11. migon
    Member
    Posted 10 years ago #

    oh ok and sorry for the bugs (and thanks foracknowledgements :-D ) I attempt to fix the bugs and make some changes and then I post a new version
    TO:Nimil
    I think, you have something wrong with realpath
    or the upload directory - do you have write permission for this directory set on your server?
    or you have very hard restrictions on your hosting server.
    ----
    Sorry for my english :-D

  12. Nimil
    Member
    Posted 10 years ago #

    it might be the permissions, i'll check, but as i said, i was able to upload to that directory before with no problem..so i dunno. but i will double check things.

  13. migon
    Member
    Posted 10 years ago #

    Nimil test this:
    set your upload path to ../junk/
    and in thumb.php set path to ./junk/
    i work now on improvements please stay tuned :-D

  14. Nimil
    Member
    Posted 10 years ago #

    still recieving the error.

  15. migon
    Member
    Posted 10 years ago #

    Done, I made new version of my hack, check this linkShow me hack page. On page is few screenshots of this hack and link to download.
    To see hack in action see my blog at blog.openheads.org(in czech only)
    New freatures:
    + detailed information about upload environment for better debug
    + upload_path check (if dir exists / is dir writable?)
    and more
    for complete list of changes see the history file from zip archive

  16. IcEr5K
    Member
    Posted 10 years ago #

    Here is the info I get with the environment debug:
    Upload environment
    Upload path: /homepages/42/d88930152/htdocs/ono/x/
    Directory is OK!
    Max w or h
    150 px (you might edit this on line 25 in b2upload.php file)
    File Types:
    GIF - GIF98 OK! - supported
    JPG - JPG OK! - supported
    PNG - PNG OK! - supported
    PHP environment:
    openbase_dir - Something is wrong
    EXIF - EXIF OK! - supported
    Quality - LowQuality only is supported
    GDlib - (empty)
    Any idea?

  17. migon
    Member
    Posted 10 years ago #

    * openbase_dir - Something is wrong - hosting provider (blocked for security reasons)
    * EXIF - EXIF NOT! supported see - see at google for info about this
    this is OK, but tell me where you have root directory of your blog? (I mean directory)
    in my opinion is all your problems in wrong paht

  18. Anonymous
    Unregistered
    Posted 10 years ago #

    sorry i havne't gotten back to you, i've been busy...
    "but tell me where you have root directory of your blog?"
    what do you mean by the root directory? do you mean /home/nimil/public_html/blog/? or something else?

  19. migon
    Member
    Posted 10 years ago #

    root directory is a directory where is index.php etc.
    /home/nimil/public_html/blog/ is absolute path on your server
    I mean that, your blog files is installed in blog/directory. Is that not so?
    junk directory is directory where you store images for spots?
    I consult you problem with my friends and your problem is probably bad path.

  20. BAKSHI
    Member
    Posted 10 years ago #

    /home/nimil/public_html/blog/ yep thaty is exactly what you have to do. yunt, i would like to ask you how did you get the newsfeeds on your blog? and i would also further say I think you need to change the permissions and do the public patch. i used to have this problem in the beginning until i did that. thanks

  21. Nimil
    Member
    Posted 10 years ago #

    i got it to work! i think maybe i just forgot to put something in the path..
    sorry about all this! and thanks for sticking with me :)

  22. Anonymous
    Unregistered
    Posted 10 years ago #

    I know this is kind of old, but I did everything the readme for the new file said to do, and now I'm getting this error:
    Warning: imagecreatetruecolor(): requires GD 2.0 or later in /home/www/www/photoblog/wp-admin/b2upload.php on line 392
    Warning: imagecopyresampled(): requires GD 2.0 or later in /home/www/www/photoblog/wp-admin/b2upload.php on line 408
    Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/www/www/photoblog/wp-admin/b2upload.php on line 429
    Could someone help me figure this out? How do I know I have gd installed on my server? What is the command I need to type? Thanks for all your help.

  23. Matt Mullenweg
    Troublemaker
    Posted 10 years ago #

    Anonymous, you probably need a newer version of PHP that has the new GD bundled in.

  24. migon
    Member
    Posted 10 years ago #

    use "show me info" link and post me what this page return
    I mean something is wrong with your GD lib on server

  25. kayaker
    Member
    Posted 10 years ago #

    Anyone still tracking this thread?
    The file upload works fine, but and thumbnail creation or insertion into my posts is not. No errors or any indication that I installed (or tried to) the hack. The only way I know I did something is that the image upload works, where before the hack, it did not.
    I went to Migon's site and was impressed by the nested thumbnail graphics and am assuming that this hack does this very thing. Upload graphics, thumbnails them, inserts them into post text, and allows for thumbnail linked full image pop ups.
    I've been snooping and found a "require once" call to b2header.php. Am I supposed to have this file? (yes, obviously) If so where should have it come from, and where do I get it?

  26. kayaker
    Member
    Posted 10 years ago #

    Cold thread? I posted a new one to see if I could get some action...
    http://wordpress.org/support/index.php?action=vthread&forum=10&topic=3196#post-1

  27. Cena
    Member
    Posted 10 years ago #

    See other thread for an attempt at helping. :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.