WordPress.org

Forums

Image Resizing/Thumbnail Generation Plugin (53 posts)

  1. nathanmo
    Member
    Posted 9 years ago #

    Here is a plugin that I've been working on. It powers my photo gallery and it automatically creates thumbnails for images with IMG tags WIDTH's and HEIGHT's that are smaller than the actual image's height and width.

    http://www.nathanm.com/index.php/code/

  2. Orin
    Member
    Posted 9 years ago #

    Well that sounds kinda neat... a way to choose the thumbnails on a case by case (or page by page) basis if you want. The wording threw me a little, though. Let it be known: this plugin actually creates new images and caches them, and doesn't just alter the sizing values or existing ones. Gotcha.

    Question: does it take the sizing values directly from the <img> tag, or if I had a table with, say height="120px" would that work?

  3. nathanmo
    Member
    Posted 9 years ago #

    It takes the sizing values from the <img> tag.

    Specifically width and height. If you have only width or only height, it will resize the width or height to the value you specify and the other attribute will be resized in proportion.

    It also allows for a size attribute..

    <img src='myphoto.jpg' size='70%'>

    And this would create a new image that is 70% of the size of the original. And links the new image into url code automatically.

  4. carbontwelve
    Member
    Posted 9 years ago #

    i just want the image gallery the rest of the functionality is useless to me...

  5. carbontwelve
    Member
    Posted 9 years ago #

    plus the gallery doesnt accept the http://www.website.com/photography/galleryname/photoname arcetecture and just seems to try and go to http://www.website.com/?gallery_id=1 even when im calling from http://www.website.com/photography and where it should revert to http://www.website.com/photography/?gallery_id=1 at the very least. It would be better if it went for http://www.website.com/photography/1/ at the very least.

    I shall try to fix the other issues im facing appart from the /photography/galleryname/imagename as im not sure how to work that. I shall also probably include some form of admin panel for changing the values so editing the php file isnt needed.

    I really like the plugin, if the above where fixed and it didnt mess up the css of all my pages by putting boxes around all my images |: bad naughty plugin, then this would be perfect.

  6. carbontwelve
    Member
    Posted 9 years ago #

    Bugs: ".$_SERVER['SERVER_NAME'].$_SERVER['ORIG_PATH_INFO']." Wouldnt work on my server for the Plugin_UrlBuild function. I had to enter my url manualy. Has this been written for php5?

    Found out how to turn off the thing that phased all my pages and put borders around my smiles by turning off the thing commenting out last line.
    //add_filter('the_content', 'Plugin_Image');
    Because I dont need it...

  7. RobotDan
    Member
    Posted 9 years ago #

    I'm getting the following error appearing in the post:

    Warning: filesize() [function.filesize]: stat failed

    What CHMOD value should the folders be set to?

  8. RobotDan
    Member
    Posted 9 years ago #

    OK, here's some more feedback on a possible bug. The plugin seems to work when specifying a smaller width (width="100"), but doesn't work for the 'reduce originals' function. I've created the folders (777) for the photos and cache, and changed these values in the plugin:

    $ReduceOriginals = TRUE;
    $ReduceOriginalsWidth = 450;

    Here's the errors that appear in the post if the image is larger than 450 pixels:

    Warning: filesize() [function.filesize]: stat failed for http://www.mydomainname.com/wp-content/uploads/2006/01/largetest.jpg in /home/root/public_html/wp-content/plugins/nathan-gallery.php on line 464

    Warning: imagejpeg() [function.imagejpeg]: Unable to open 'http://www.mydomainname.com/wp-content/uploads/2006/01/largetest.jpg.tmp' for writing in /home/root/public_html/wp-content/plugins/nathan-gallery.php on line 537

    Warning: unlink() [function.unlink]: HTTP does not allow unlinking in /home/root/public_html/wp-content/plugins/nathan-gallery.php on line 475

    Warning: copy(http://www.mydomainname.com/wp-content/uploads/2006/01/largetest.jpg.tmp) [function.copy]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/root/public_html/wp-content/plugins/nathan-gallery.php on line 476

    Warning: unlink() [function.unlink]: HTTP does not allow unlinking in /home/root/public_html/wp-content/plugins/nathan-gallery.php on line 477

    Here's the errors that appear in the post if the image is smaller than 450 pixels:

    Warning: filesize() [function.filesize]: stat failed for http://www.mydomainname.com/wp-content/uploads/2006/01/smalltest.jpg in /home/root/public_html/wp-content/plugins/nathan-gallery.php on line 464

  9. nathanmo
    Member
    Posted 9 years ago #

    These issues should be all resolved in the latest version 0.1.4. It has an admin panel now, etc and you can change the styling there etc.

  10. brayabbitt
    Member
    Posted 9 years ago #

    After setting up PixGallery, I can see the thumbnails for the folders, but am not able to drill down any further.

    The gallery is located at: http://brayabbitt.com/pictures/

    Any thoughts?

  11. Greenartist
    Member
    Posted 9 years ago #

    Hiya,

    I uploaded this cool plugin and when I actived it, the error came out:

    Warning: array_keys(): The first argument should be an array in /hsphere/local/home/greenartist/xxxxxxxxxxx.com/bog/wp-content/plugins/pixgallery.php on line 876

    Warning: Cannot modify header information - headers already sent by (output started at /hsphere/local/home/greenartist/xxxxxxxxxxx.com/bog/wp-content/plugins/pixgallery.php:876) in /hsphere/local/home/greenartist/xxxxxxxxxxx.com/bog/wp-admin/plugins.php on line 16

    Any idea why it couldn't go any further after I activated the plugin? I looked up plugins.php and the "line 16" looks fine. Here it is:

    header('Location: plugins.php?activate=true');

    Help?

  12. Greenartist
    Member
    Posted 9 years ago #

    Oh by the way, I'm using WP 2.0.1..

  13. jfowler
    Member
    Posted 9 years ago #

    I am getting the same thing as Greenartist.

  14. brduke
    Member
    Posted 9 years ago #

    I'm also getting the same error as green artist:

    Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/...../wp-content/plugins/pixgallery.php on line 876

  15. clunybrown
    Member
    Posted 9 years ago #

    Hi,

    I'm using WordPress 2.0.1. I've installed the plugin and added it to a page and I'm getting the following error message:

    Error: Photos path is invalid!
    Error: Photos path should contain subfolders to store each photo gallery!
    Error: Not a valid directory (/home/clunybr/public_html/images/photos/)

    Warning: Division by zero in /home/clunybr/public_html/wp-content/plugins/pixgallery Folder/pixgallery.php on line 205

    Warning: Division by zero in /home/clunybr/public_html/wp-content/plugins/pixgallery Folder/pixgallery.php on line 206

    Warning: Division by zero in /home/clunybr/public_html/wp-content/plugins/pixgallery Folder/pixgallery.php on line 259

    I can see that the path contains an incorrect backslash, but I can't figure out where to fix it.

    Any help would be appreciated.

    Edited: I don't know why, but the incorrect backslash disappeared when I posted my question. It was in the line:

    Error: Not a valid directory (/home/clunybr/public_html\/images/photos/)

    I've surrounded it with backticks, maybe it'll show in this one.

  16. jwurster
    Member
    Posted 9 years ago #

    This backslash has also occurred with me. In addition, I had to delete the entire plugin because my error log file was getting extremely large with divide by zero errors.
    By the way, I'm using wp 1.5.2.

  17. ronny001
    Member
    Posted 9 years ago #

    I have the same backslash error.
    Appearantly, the php script is configured for "windows" directories and it doesn't run on linux boxes. Could that be possible?
    Anyway, if in the file I change the $pixglobal_rootwebsite variable to concatenate '//' instead of '\\' it doesn't crash anymore. However it still doesn't seem to find my pics...
    Any ideas???? Someone????

    Here's what I did (I'm not a programmer - just trial and error using echos and print statements)

    function PixGallery_DeterminePaths()
    {
    global $PixGlobal_Url, $PixGlobal_RootWebsite;

    $ScriptFile = $_SERVER['SCRIPT_FILENAME'];

    if (isset($_SERVER['DOCUMENT_ROOT']))
    $PixGlobal_RootWebsite = $_SERVER['DOCUMENT_ROOT'];
    else
    $PixGlobal_RootWebsite = substr($ScriptFile, 0 , (strlen($ScriptFile) - strlen($_SERVER['PHP_SELF'])) + 1);

    if ($PixGlobal_RootWebsite[strlen($PixGlobal_RootWebsite) - 1] != "//")
    $PixGlobal_RootWebsite .= "//";

    if (isset($_SERVER['REQUEST_URI']))
    $PixGlobal_Url = PixGallery_UrlGetPath($_SERVER['REQUEST_URI']);
    else
    $PixGlobal_Url = PixGallery_UrlGetPath($_SERVER['PHP_SELF']);
    }

  18. jwurster
    Member
    Posted 9 years ago #

    I made the same changes to get rid of the backslash and eliminated all the errors. Unfortunately, it doesn't find any images or folders. I sure hope the plugin author can help as this is a very cool and simple plugin (providing it works). I would be happy to be a test site for the author to help make this a really great plugin. Just let me know.

  19. clunybrown
    Member
    Posted 9 years ago #

    Ok, I've downloaded and installed the new version. I've changed the \\ to //.

    And now I'm getting this:

    Warning: getimagesize(/images/photos/Hesperia House/Hesperia House - 20.jpg): failed to open stream: No such file or directory in /home/clunybr/public_html/wp-content/plugins/pixgallery Folder/pixgallery.php on line 197

    Warning: Division by zero in /home/clunybr/public_html/wp-content/plugins/pixgallery Folder/pixgallery.php on line 205

    Warning: Division by zero in /home/clunybr/public_html/wp-content/plugins/pixgallery Folder/pixgallery.php on line 206

    Warning: Division by zero in /home/clunybr/public_html/wp-content/plugins/pixgallery Folder/pixgallery.php on line 259

    After that error message, it does load a preview for the first gallery -- and I can click through to see the thumbnails -- but none of the thumbnails are resized. And the second gallery doesn't show up at all.

    Anybody got anything?

  20. clunybrown
    Member
    Posted 9 years ago #

    Thanks, nathanmo, for the new version. I installed it, changed the \\ to //, and it works great now.

  21. JETC
    Member
    Posted 9 years ago #

    I got it to work after a few editing with just the part where you input the root directory and such. Although after I made a new post, the page would not display my post and the sidebar too. The only thing that would show up is the title of the most recent post. Any idea what would be wrong? If I take off,

    add_filter('the_content', 'PixGallery_PhotoGallery');
    add_filter('the_content', 'PixGallery_Image');

    it will work again but it just as if I deactivated the plugin.

  22. JETC
    Member
    Posted 9 years ago #

    ah, I found the problem. I made a " :) " in my post and WordPress converted it to a smiley face picture and that broke the script or something. I took off the smiley and everything works again. Although my new problem is that it doesn't resize nor popup a layer or new window for the images in my posts. I don't mind this much since I have been without that feature and doing fine but I would like it to work anyway :)

  23. ronny001
    Member
    Posted 9 years ago #

    Hi:
    Installed the latest version, changed the \\ to // and indeed it works.
    Unfortunately, the layer does not resize the way it should. And because my pictures are BIG, that is somewhat a problem...any ideas?
    BTW: thanks for the new version, except for the layers it works great!

  24. jwurster
    Member
    Posted 9 years ago #

    The new 0.1.9 version does seem to work quite well after you change the "\\" to "//" and comment out the add_filter(the_content,pixgallery_image) as mentioned above.

    I like the flexibility of changing the location of your galleries folders. I've tested a lot of photo gallery album plugins and php scripts and wanted to see if I could use the existing folders each one of my tests created. There seems to be a problem with folders the begin with "_" (underscore). Would there be a way to exclude certain folders from your plugin?

    Thank you for the work you've done on the plugin.

  25. lkauderer
    Member
    Posted 9 years ago #

    Thanks nathanmo for the latest version 0.2.0. Had to change the \\ to // in the determine paths for my server. The pics get displayed as groups, but when you select a specific one, the picture does not get displayed in either a layer or new page. In detail, after selecting the pic, a new page is loaded but only shows the top half of the page with no picture or sidebars. Its almost like the page did not fully load.

    Anyone have any thoughts?

  26. lkauderer
    Member
    Posted 9 years ago #

    In regards to my previous post, another plugin was conflicting with pixgallery. I deactivated the plugin and everthing is working fine.

    Thanks for the excellent work nathan.

  27. J-LO
    Member
    Posted 9 years ago #

    Could someone please write a short readme with info on how to setup this plugin? I do not know any PHP, so i have no clue how to tweek things and make it work that way.

    Does not seem like nathanmo will release any official install notes?

    No matter what i do i keep getting the same error:

    --
    Error: Photos path is invalid!
    Error: Photos path should contain subfolders to store each photo gallery!
    --

    I have been trying diff. locations, CHMOD's, edited the php file, updated the Pixgallery setup in the admin aection - still nothing...

    Also been reading the prev. posts here, but it did not help;(

    I am on a UNIX server. (Also tried thanging the \\ to //)

  28. horizens
    Member
    Posted 9 years ago #

    i'm getting the same path invalid error. a readme would be much appreciated!

    http://www.wendyj.net/tempsite/?page_id=33

    is this correct?

    $PixGallery_RootPhotos = "/gallery/33/";
    $PixGallery_RootCache = "/gallery/cache/";

    $PixGlobal_Url = "http://www.wendyj.net/tempsite/";
    $PixGlobal_RootWebsite = "www/htdocs/tempsite/";

    my photos are in www/htdocs/tempsite/gallery/33/
    the cache folder is at www/htdocs/tempsite/cache/

  29. mrainwater
    Member
    Posted 9 years ago #

    ditto. Having many problems. Error shown.
    --
    Error: Photos path is invalid!
    Error: Photos path should contain subfolders to store each photo gallery!
    --

  30. jennifre
    Member
    Posted 9 years ago #

    Ok, I'm assuming that I'm just a dumbass.

    I'm getting the same error as the few last people:
    --
    Error: Photos path is invalid!
    Error: Photos path should contain subfolders to store each photo gallery!
    --

    Am I supposed to do more than put the two files in the plug in folder, create the directory and set all that up and upload folders?

    Sorry for the stupidity.

Topic Closed

This topic has been closed to new replies.

About this Topic