Image Resizing/Thumbnail Generation Plugin
-
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.
-
To solve the “division by zero” crap, remove folders with no images in, or simply add an image. There is no function to say “if folder contains nothing, don’t do anything” so to speak.
On your admin panel nuder options, then PixGallery, you will find at the bottom a place to choose your folder for pictures and cached images. Change this to whatever but make sure you have them, if not, create them via FTP. It’s quite simple using a program like SmartFTP etc. Then add subfolders for different categories, or simply add photos to the photos folder. You do not need to touch the cache folder at all.
Final note: When using layers, if there is any other javascript which can overlap the image, it will appear on top. An example of this can be found here: No, I meant here really!. Just click the image, should show up the SPURL image on the right as it uses javascript
URL above has changed, but you can browse through and get the idea with the bigger images. Will probably use “new window” function though later on
I am also having the problem with:
Error: Photos path is invalid!
Error: Photos path should contain subfolders to store each photo gallery!The folders exist in the root of my my site, does anyone have any advice?
Have you checked the admin page, where you can change the link to your photos folder? Make sure you have a folder for images to be cached in too ??
I can’t seem to get this to produce any thumbnails. I have looked at the HTML and it is looking for the thumbs in the correct place but it is not generating any thumbs. I am sure this is a path problem, permissions on the folders are 777 and as I said it is writing the HTML to the folder correctly but just not outputting the images to that folder. Any ideas?
OK, fixed it. It was having problems determining my path using the funtion:
PixGallery_DeterminePaths()
Since I host my site on blog.stephencarr.org the actual directory structure is:
/root
/web
/public
/blogSo when it was determining the root of my web space it just returned
/root/web/public
This is because my subdomain is running out of a folder on my main domain’s docroot.
I fixed this by hardcoding the correct docroot and commenting out line 54: PixGallery_DeterminePaths(); so that the determinepath function does not get called. I am pretty sure the path to your WP installation is a global WP variable anyway, you should be able to use that. Don’t ask me how, I just hack things about.
The correct fix for monkeynotes’ issue would be some sort of platform or delimiter detection. Had it already written and working and was going to submit it but after downloading the newest version today I accidentally overwrote my changes :0/
Perhaps this is something that could be added in a maintenance release? If I have the time I’ll post the code up here myself…
I’m not sure I’m seeing the same thing. I’m not seeing any error messages when I activate the plugin. I am running this on a hosted site (running some flavor of Unix). I installed it ‘plain jane’ – no changes and saw no error messages BUT nothing seemed to work (put <pixgallery></pixgallery> in a page and saw nothing including no error messages). When I view page source, I do see that the plugin puts some formatting pieces in place but that is it.
Based on that, I figured it’s not finding that paths so I tried monkeynotes fix but got nothing different.
Given the samples, this looks like it could be a great plugin but at this point I can’t get it to do anything. Any ideas why?
P.S. Other note: my site is similar to monkeynotes in that it is in a directory off of the main site so the ‘/images/photos’ and ‘/images/cache’ directories are off of the subdirectory where my WP install is not the root website.
I’ve been at this for a bit longer and tried some more including playing around with the plugin itself.
First, I found a naive mistake (at least I think this was the correct fix). What should have been in my page instead of what you show on your site ( you show just <pixgallery></pixgallery> ) is the following:
<?php PixGallery_PhotoGallery(‘<pixgallery></pixgallery>’);
I only figured that out after looking at the plugin though I guess in a way it was obvious that there was no function call so where would the pixgallery calls be read in by?Anyway, the heart of this post is on the plugin:
Line 47, shouldn’t it be something like:
$PixGlobal_Url = get_bloginfo(‘wpurl’).”some additional path”;
Note: the some additional path in your original plugin was equal to “index.php/photos/”. What should this be?Line 48, shouldn’t it be something like:
$PixGlobal_RootWebsite = ABSPATH;
Note: I think this gives exactly what you need here if I understand the plugin.Now, I’ve modified the <form></form> in the plugin so it will show both of these variables and let me change them. I’ve tried many permutations to no avail.
Last note:
I have a web site: https://www.kathyandglenn.com
My blog lives down a directory though at:
http:/www.kathyandglenn.com/gt-blog/
I put the storage for the images below that (which was what I thought the intent was in your almost non-existent set up instructions).
https://www.kathyandglenn.com/gt-blog/images/photos and
https://www.kathyandglenn.com/gt-blog/images/cacheSo the core variables ought to be:
PixGallery_RootPhotos = /images/photos/
PixGallery_RootCache = /images/cache/
PixGlobal_Url = get_bloginfo(‘wpurl’).”/images/photos/” /* though this doesn’t work so what would */
PixGlobal_RootWebsite = ABSPATH /* provides proper path which in my case is big long unix path */I know I’m being thick but it’s hard sometimes to sort through others code (especially since php really is new to me!). From your site, it really does look like a great plugin and that is why I’m willing to do all this effort so I’m looking forward to getting this to work.
I really like the look of this plug-in and would love to get it to work, however…after setting it up I’m not getting any images. Please see my problem here…
https://www.thechecks.net/test/wordpress/?page_id=82
Any tips would be welcome!One question – should
<pixgallery path=”/images/photos/”></pixgallery>be
<?php PixGallery_PhotoGallery(‘<pixgallery></pixgallery>’);
?>as Glennth mentioned above?
Yours,
confused
I am having really big problems with this it says path is not secure or does not exsist. Can someone please help me out with this maybe chat im or something to walk me through it I will make it worth your while. Thanks
Can someone help me
I am getting this error Fatal error: Call to undefined function: get_option() in /home/candi4/public_html/wordpress/wp-content/plugins/pixgallery.php on line 871 at https://www.candidvoyeurism.com/wordpress/wp-content/plugins/pixgallery.php
*sigh* Is there anything comparable to this plugin? I just spent the past 4 hours trying to get it running with every hack suggested in this thread and few of my own to no avail.
i wish this worked on my linux server, but i also cannot get it to work
i settled on https://www.wildbits.de/mygallery/
its a good replacement, and fool proof ??
- The topic ‘Image Resizing/Thumbnail Generation Plugin’ is closed to new replies.