Return-Path: Delivered-To: apmail-incubator-jspwiki-user-archive@minotaur.apache.org Received: (qmail 6019 invoked from network); 7 Aug 2010 16:08:26 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Aug 2010 16:08:26 -0000 Received: (qmail 41962 invoked by uid 500); 7 Aug 2010 16:08:26 -0000 Delivered-To: apmail-incubator-jspwiki-user-archive@incubator.apache.org Received: (qmail 41893 invoked by uid 500); 7 Aug 2010 16:08:25 -0000 Mailing-List: contact jspwiki-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jspwiki-user@incubator.apache.org Delivered-To: mailing list jspwiki-user@incubator.apache.org Received: (qmail 41885 invoked by uid 99); 7 Aug 2010 16:08:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Aug 2010 16:08:24 +0000 X-ASF-Spam-Status: No, hits=1.0 required=10.0 tests=SPF_HELO_PASS,SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of Brian@pingtoo.com does not designate 217.154.193.216 as permitted sender) Received: from [217.154.193.216] (HELO mail2.pingtoo.com) (217.154.193.216) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Aug 2010 16:08:19 +0000 Received: from [10.1.252.200] (schizo.pingtoo.com [10.1.252.200]) by mail.pingtoo.com (Postfix) with ESMTPA id DA93E150002 for ; Sat, 7 Aug 2010 17:07:56 +0100 (BST) Message-ID: <4C5D84D8.1060103@PingToo.com> Date: Sat, 07 Aug 2010 17:07:52 +0100 From: Brian Burch User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6 MIME-Version: 1.0 To: jspwiki-user@incubator.apache.org Subject: Re: Photo Collection plugin References: <033e01cb32c8$d87b0520$89710f60$@com> In-Reply-To: <033e01cb32c8$d87b0520$89710f60$@com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 03/08/10 06:00, Fritz Schneider wrote: > I'm trying to set up a wiki for my Church at http://www.peacham.com/ccla in > order to organize the collections of pictures that people have. I am running > JSP Wiki 2.8.3 under Tomcat under Windows/XP. Since we are trying to > organize photographs and scanned documents, I found the Photo Collection > Plugin to be extremely valuable. > > I had some problems with installation, but, being a newbie, I wanted to run > my solutions past the list before I update the wiki pages. > > 1. The wiki documentation for thumbs refers to > "jspwiki.default.thumbspath" and "jspwiki.default.thumbspfx", but the first > qualifier should be "photoCollection". Oops! It is just as you said, so the plugin documentation was wrong. I have now updated it on the jspwiki site. Thanks! > 2. When editing Header.jsp you need to also define the taglib. I > ended up extracting photocollection.tld from photocollection.jar and > putting it in \Tomcat\webapps\ccla\WEB-INF so I could reference it: > <%@ taglib uri="/WEB-INF/photocollection.tld" prefix="photo" %> No, I think this is not necessary. The handling of taglibs is quite idiosyncratic and I spent a long time reading specifications and doing experiments before I got it working properly. Then I forgot everything and so had to research it all again to answer you with any degree of confidence! The photocollection.jar contains a META-INF directory. The META-INF/MANIFEST.MF file contains several extra attributes that define my taglib class. In particular... Name: com/pingtoo/jspwiki/tags/PhotoPageNameTag.class .. causes my class (using the correct java package within the jar) to be searched for tags. The only detail I'm hazy about is this - my instructions to make your own Header.jsp say to update with this line:
... so how does the servlet container know it should call PhotoPageNameTag.doWikiStartTag() ??? I currently have a debugger break point stopped at my code, so I know the method really is invoked (after all, the page name is definitely prettified on my own wiki). I suspect there is a simple naming convention at work, i.e. code photo:PhotoPageName to invoke PhotoPageNameTag. Of course, this doesn't matter to you. I still think you did not need to update the taglib uri in Header.jsp to make the tag work - the class should be loaded from within the jar. In other words, your unpacked /WEB-INF/photocollection.tld is not being used. However, while looking at the code I saw some embarrassing TODO comments. In particular, it hard-codes the photo collection base as "FilesPictures" and replaces it with the alias "Photos" in the visible page title. I need to sort that out soon, because it probably isn't working for you! > I notice that my thumbs directory shows up as a link on my photo collection > page. Is there some way to suppress this? Yes, I can see what you mean on your page: http://www.peacham.com/ccla/Wiki.jsp?page=FilesPicturesInstallation1-Preparation I've checked the following: a) the first picture on the page really is a thumbnail, so your thumbs path navigation properties appear to be correct. b) when I click on the thumbnail image, I get a higher resolution version of the image, so the image path navigation seems OK too. c) the current page source is trivial - just the plugin invocation automatically generated by my code, i.e. [{INSERT PhotoCollectionPlugin photodir='/installation/1-Preparation'}] I looked at my own photo wiki and noticed that it is generating the equivalent of: [{INSERT PhotoCollectionPlugin photodir='installation/1-Preparation'}] ... so why don't you try manually editing that individual existing page to remove your leading forward_slash and see what happens? If it works, you need to review the values you coded in your properties. If not, we need to review all your properties... could you tell me exactly what you have coded, and also the absolute paths to both the image and the corresponding thumbnail. Your symptoms imply that the plugin is finding a subdirectory containing images whose name does not EXACTLY correspond to the name of the indicated thumbnail directory. Perhaps you have multiple thumbnail subdirectories? If not, perhaps there is confusion because tomcat, java, jspwiki and my plugin all expect case-sensitive urls and paths, but windows paths are case-insensitive? Regards, Brian