|
Cookbook /
ImageSetsSummary: Create galleries that are not tied to a single wiki page
Version: 0.2
Prerequisites:
Status:
Maintainer:
Categories: Images
QuestionCan I create galleries that are not tied to a single wiki page (ie. the same gallery can be accessed from multiple pages), and also have more than one gallery per page? AnswerImageSets are a gallery system I made up because of my frustration with existing galleries. This page is my first module for pmwiki, so be gentle. It may have insecurities and may not comply 100% with the pmwiki conventions, I am working on this and would appreciate comments and suggestions to chojin at internode.on.net. Notes and CommentsCurrent Version: 0.2 InstructionsDownload imgset.phpΔ and copy it to cookbook/imgset.php Add the following link into your config.php: include_once("cookbook/imgset.php");
You may want to enable uploads and create a directory called /ImageSets/ inside your uploads directory, but the script *should* do this for you (this worked for me and I didn't need to create them, but if it doesn't, create them manually and chmod them to 777). This recipe bypasses the standard upload form and creates its own. This is because I found the original confusing and inefficient for grouping images together. To create a page, simply create a tag of (:imgset name:) where name is the name of your gallery (this can be anything). Then click 'Edit ImageSet' and upload as many images as you like. In this edit page you can also delete images. To create more than one gallery, simple create more than one tag in a page. To link to the one gallery, just create the tag again with the same name on other pages. The images are stored in /Uploads/ImageSets/Name/ where Uploads is your upload dir, and Name is the name of the gallery. The script might also help those wanting to create their own cookbook recipies, as I tried to comment as much as I could, I found the existing documentation to be pretty vague, especially when overwriting existing functionality such as the edit page.
ScreenshotsStep 1: Create the tags in your page (these galleries were made using (:imgset SetOne:) and (:imgset SetTwo:)). ![]() Step 2: Click the EditImageSet link in the pic above and upload images. ![]() Step 3: Main Page automatically creates thumbs and links to the larger image. ![]() ToDo
ContributorsRob Saunders (chojin at internode.on.net) Profiles January 21, 2005, at 20:13 Profiles October 25, 2005, at 05:55 AM Hi Jiri. The directory name is indeed ImageSets not ImgSets, probably just a typo. I changed it.
Just copying images to the directory doesn't work. The script relies on the presence of the generated thumbnails.
Without more details I can't see why uploading images didn't work for you. It worked for me. ;-) Do you have your WikiSandbox online?
--Su2, 19.11.2005
Jiri, could it be a thumbnailing issue? The script uses bilinear resizes, which only work on newer GD libraries.
Is your PHP install fairly recent? The other issue could be a permissions thing. Try chmodding your ImageSets directory
Or allowing the script to create the directories itself (which will automatically chmod them). The next version
will have more descriptive error messages and possibly a workaround for the GD issue above.
--Rob, 21.11.2005
Profiles February 15, 2005, at 22:09 22 March 2006 SAFE MODE restriction in effect?!?! i can upload the files no problem, but when it comes to deleteing it throws up user id #### cant access owner ##### also the file size has a similar problem. stealth at fireflyuk dot net I've added some code to this script so it will auto create the thumb images so you can just FTP your image files all at once to a imgset directory. Remember to chmod your new imgset directories. Just copy in the new file and upload your images. The first time you view the imgset page it will auto generate the tumb files. If you have a lot of images in one directory you may need to hit refresh a couple times due to timeouts. Download imgsetAutoThumbΔ and copy it to cookbook/imgset.php Jiri May 25, 2006, at 05:19 AM Warning: imagejpeg(): SAFE MODE Restriction in effect. The script whose uid is 12251 is not allowed to access /www/o/obutex/public_html/crm/uploads/ImageSets/Test owned by uid 33 in /www/o/obutex/public_html/crm/cookbook/imgset.php on line 343
Warning: imagejpeg(): Invalid filename in /www/o/obutex/public_html/crm/cookbook/imgset.php on line 343
This does not seem to allow groups. I noticed index.php?n=$pagename?... is hard coded in, which wont work for groups. -mason |