Exhibit 1.0c Photo Gallery Plugin
-
My Exhibit photo gallery plugin for WordPress has reached version 1.0c!
New features:- Image upload
- Directory creation
- Paginated thumbnails
- Add single images
- Resample uploaded full-sized images
It retains features of the prior versions, including:
- Automatic thumbnail creation
- Popup full-sized images
- Per-post override display settings
- Other good stuff
-
To get your preview images to display differently for different posts, use the exhibit post comment:
< !--exhibit:preview_class=someclass-->
You must define .someclass in your exhibit.css file so that the image appears differently than the default. For example, if your default styling displays small thumbnails, then .someclass should set the style so that the preview images are large.
The bottom line is that you need to tweak the CSS in exhibit.css to your liking.
welsper: Exhibit could fill the height/width tags for the image, but the server-side processing required would be dependent on how you wanted to implement it. If you simply wanted a static setting of height and width, that’s pretty easy. If you wanted it to look at the file and fill in the actual dimensions of the image, that takes a little more doing.
Either way, you would need to change Exhibit source code (and not mere configurations) to accomplish this.Anonymous<str>ringmaster</str>— I’m running in a Ensim hosted environment. Running Linux, Apache, etc. Ensim ver 3.7 I believe.
After installing this release of Exhibit I have a problem that continues… Whne I click the links: [Create Directory], [Upload], or [rebuild all] I get in return a Not Found error in the window. Looking closer I noticed that the path to the exhibit10.php file was wrong in the link that was created by Exhibit. I was bummed.
The fix?
Replace all references of ‘SCRIPT_NAME’ with ‘SCRIPT_URL’ in the file exhibit10.php. All seems to be working like it shoudl now.
BTW – Groovy program!>> If you wanted it to look at the file and fill in the actual dimensions of the image, that takes a little more doing.
Ok, I wanted the width and height tags for when I show the full image inline. I ended up doing this:
Right before
$imagetag = preg_replace('|IMGSRC|', $imageurl, $exc->full_image_display);
Add
$image_size = getimagesize($imageurl);
$imagetag = preg_replace('|IMGWIDTH|', $image_size[0], $imagetag);
$imagetag = preg_replace('|IMGHEIGHT|', $image_size[1], $imagetag);
Then you have available the two tags for full_image_display.AnonymousI downloaded Exhibit 1.0c. I have 1.2 WP. I followed instructions in the exhibit10.php file:
I changed the value of changeme.
I copied exhibit10.php, exhibitimg directory, exhibit10.cfg to the wp-content/plugins folder.
I copied exhibit.css and exhibit_full.php to wp directory (not the plugins folder).
I verified my server has gd loaded.
I added the do_action() line to wp-admin/edit-form-advanced.php
I enabled the Exhibit plugin (I have other plugins running just fine).
I have a folder in wp called images and a subfolder called t. The results:
When I click on anything from the drop-down, it adds the comments. Three images I uploaded into /images just sit there. Nothing happens. I tried several different browsers. Here’s a screen shot.
For the heck of it, I clicked create directory, which prompts a JS popup in which I enter a name. It gives me the following:
Warning: mkdir(/home/meryland/public_html/wp/images/test): Permission denied in /home/site/public_html/wp/wp-content/plugins/exhibit10.php on line 1459
When clicking upload:
Warning: copy(/home/site/public_html/wp/images/wp-exhibit.gif): failed to open stream: Permission denied in /home/site/public_html/wp/wp-content/plugins/exhibit10.php on line 1576
The above two don’t surprise me as it is probably a chmod issue… but I already have an existing folder with images in it, which is what the above screen shot is based on.
When clicking make – nothing happens.
Did I forget something else?
Best and TIA,
MerylAnon, you need to click on the images themselves or the “ADD CURRENT DIRECTORY” button to add the images. The drop down is just how to display those in your post.
I would set the chmod correctly in your .cfg file though. I set it incorrectly at first (forgot the first 0), then had a fun time recovering the permissions.Anonymouswelsper, thanks for the quick reply. The chmod is set to 0644. Thumbnails set to 1. I went into the control panel and set the image and t folders to 755 even since 644 didn’t seem to be working. Can’t click on the image file names or icon at all. This is the latest error:
Warning: is_dir(): Stat failed for /home/site/public_html/wp/images/IMG_1500.JPG (errno=13 – Permission denied) in /home/site/public_html/wp/wp-content/plugins/exhibit10.php on line 876
Warning: is_file(): Stat failed for /home/site/public_html/wp/images/t/IMG_1500.JPG (errno=13 – Permission denied) in /home/site/public_html/wp/wp-content/plugins/exhibit10.php on line 893
Warning: is_file(): Stat failed for /home/site/public_html/wp/images/thumb-IMG_1500.JPG (errno=13 – Permission denied) in /home/site/public_html/wp/wp-content/plugins/exhibit10.php on line 897AnonymousFinally got it! Got the answer from one of the responses above. Saw the image and t folders needed to be 777 not 755 or 644. Changed those and ta-da. Thank you. You guys are awesome especially the plugin creator. Kudos.
777 probably isn’t the best permission setting security-wise. You might try 664 instead of 644. There is no reason to give execute permissions to your image directories, especially since you’re letting the web server write uploaded files there.
The important number to set is the middle one, which controls group permissions. You want your group permissions (which would include the web server and ftp users) to be read+write.
Man, I remember my Linux/Ensim days… I’m glad those are over, even if I look back on them fondly.
Cool beans, welsper. I might add that and the EXIF functions to the next release. (I really dig your anime/manga site, BTW!)ring, thanks for visiting my site. ?? Also have another question: I noticed that when I add an entire directory, the images don’t get added alphabetically. What determines the ordering of images?
muff, you need root access to reclaim permissions. Login as root and use chown. If you don’t have root access, you have to ask someone who does to do this for you. Exhibit works as user httpd, not under your user. So with permission 755, you have the “5” and not the “7”.yea, I know I have to ask my host to remove the pictures but for the future, it’d be better if the script could just give “me” enough permissions for deleting as well since lots of people don’t have root access and would have to get help from their webhost everytime something was to be deleted. I know this is possible to do (through a search on google) with a php script but I don’t know enough php to fix it.
Might it be helpful to change the group of the directory when it’s created? You could add a chgrp command to Exhibit to enable this.
Somewhere around line 1474 in the make_thumbnails function is the chmod command for the ‘t’ folder. If you added a chgrp command there to set the permissions to the appropriate group, you might have better luck deleting the directory.
If you get it to work, let me know how you did it, and I’ll be sure to include it as a configuration option in the next release.The images are ordered in the order they are added. If you add individual images (click the little picture next to the filename), you can control this to some extent. I think that the directory listing function sorts the files by filename, but when it adds them to the database table, it uses the natural file order. This might be by date. Not exactly sure. There currently isn’t a method in exhibit to re-order the images. Maybe next release, since a couple of folks have now asked about it.
AnonymousI agree — I don’t like 777 as the permissions for the /image and /t folders. I went to play with them further. 644 and 664 don’t work. 755, however, does work. That’s the lowest setting I can make it work.
Merylok, I DID IT ??
around line 1472 before the @mkdir – added umask(0000);
line 1453 before $abspath – added umask(0000);
this gives me permissions 777 on created subdir’s & t-folders. doesn’t have to be 777 of course, this was just a test to see if it was possible. it was! I can now delete created folders heh.
this also works:
@mkdir(“{$path}/t”,0777);After installing WordPress 1.2 and Exhibit 1.0c, everything seems to work fine, except that I get an error message in the Exhibit box on the edit page that says:
Fatal error: Call to undefined function: add_action() in [my site root]/wp-content/plugins/exhibit10.php(227) : eval()'d code on line 1
I’ve seen other people post this error, but no one’s ever responded with a solution. Any ideas?
- The topic ‘Exhibit 1.0c Photo Gallery Plugin’ is closed to new replies.