12 Replies Latest reply on May 28, 2007 11:20 AM by dcarter

    Customizing opensearch

      I'm having some trouble customizing opensearch. I found the freemarker template and included a custom version for top level space, but it's not being recognized. I thought it might be one of those "above the main space" things, like the login page, but installing it at the URL level locks up the system.

       

      Any ideas on this?

        • Re: Customizing opensearch

          Can you post the customization you did and what URL you mapped it to?

           

          Cheers,

           

          AJ

            • Re: Customizing opensearch

              I think I found the problem and a way to correct it. Towards the end of the file, there are two lines:

               

              <Image height="48" width="48" type="image/png">$/favicon.png</Image>   <Image height="16" width="16" type="image/vnd.microsoft.icon">$/favicon.ico</Image>

               

              I'd like to replace the image locations, pointing into jiveHome/themes/images, as I was told to do with other site customizations. I had removed the $, but now realize that's wrong. The URL should look like this:  $/themes/images/favicon.ico.

               

              I was mapping it to the URL ./., but I know see that is also wrong. It should be mapped to the top level space.

               

              I will try this again on 1.1, after I fix all of my broken freemarker templates, since 1.1 changed directory names.

               

              Thanks,

              Doug

                • Re: Customizing opensearch

                  hi Doug,

                   

                  First, sorry for not documenting the change to the freemarker locations. In hindsight, we probably should have written an upgrade task that looked for custom themes and moved them for you. We'll do that if we ever change the directory names again.

                   

                  Second, check out the new global theme functionality in the theming section. Use the global theme in place of any instance where you mapped a theme to the root community.

                   

                  Cheers,

                   

                  AJ

                    • Re: Customizing opensearch

                      Hey AJ,

                       

                      I tried the global theme in 1.0.4, with mixed results, but will try again in 1.1.

                       

                      Just so I understand it, is "global" really "global"? (site-wide) Or is it still restricted to the top level space? Because I have a private site, I've had to create templates for the login page, which is not part of the top level space. (they're actually "above" the top level space)

                       

                      Thanks,

                      Doug

                        • Re: Customizing opensearch

                          hey Doug,

                           

                          Global really is global, it's not tied to any community / space.

                           

                          Cheers,

                           

                          AJ

                            • Re: Customizing opensearch

                              AJ,

                               

                              I've tried creating a custom opensearch.ftl with a new "ShortName" and "Description", as well as updating the Image tags to point to my themes/images directory. I've tried adding the template to the global theme and to a standalone theme that maps to the top level space. Regardless of configuration, it retains the default setting. If I hit /opensearch.jspa it shows my new values. If I edit the system opensearch.ftl it works, I just can't get the theme/mapping to override the system default.

                               

                              Any ideas?

                               

                              Thanks,

                              Doug

                                • Re: Customizing opensearch

                                  hi Doug,

                                   

                                  If I hit /opensearch.jspa it shows my new values.

                                  So I tried this out on my local install (editing /template/global/opensearch.ftl and setting the theme as the global theme) and I was able to see the new values when I hit /opensearch.jspa as well. Tell me if I'm wrong, but I think the problem you're facing right now is that the values aren't updating in the search drop down menu in your browser. Is that right?  If so, I'd suggest killing / disabling your browser cache (the web developer toolbar in Firefox has an option for disabling caching).  Does that help?

                                   

                                  Cheers,

                                   

                                  AJ

                                    • Re: Customizing opensearch

                                      AJ,

                                       

                                      I'll take another pass at this after I upgrade to 1.1.

                                       

                                      Thanks a lot for your reply.

                                       

                                      Doug

                                        • Re: Customizing opensearch

                                          AJ,

                                           

                                          I've taken another pass at this in 1.1.1, with no success. I tried every possible combination I could, only with mixed results. I can get the "Add Clearspace" in the pulldown, but when I add it, the icon doesn't display. I've tried messing with the opensearch.ftl and header template syntax, clearing caches, restarting tomcat, you name it, I've tried it.

                                           

                                          Is there any good info on web about debugging this opensearch stuff?

                                           

                                          Thanks,

                                          Doug

                                            • Re: Customizing opensearch

                                              So it sounds like the main problem you're having is that the icon isn't showing up, is that right? 

                                               

                                              So if you view the /opensearch.jspa, do a view source on that, you should end up with something like this for the images:

                                               

                                                <Image height="48" width="48" type="image/png">http://example.com/favicon.png</Image>

                                                <Image height="16" width="16" type="image/vnd.microsoft.icon">http://example.com/favicon.ico</Image>

                                               

                                              Is that what you have (assuming example.com is your domain)?

                                               

                                              If you grab the url from the <Image> element above and pop it into your browser, does the image / icon show up then?

                                               

                                              If so, have you tried removing the Clearspace search engine from Firefox and then readding it?  I'm assuming you're using Firefox.. is this IE 7?

                                               

                                              Cheers,

                                               

                                              AJ

                                                • Re: Customizing opensearch

                                                  More specifically, the icon doesn't show up after I've added the site to the search engines. I do see the icon when it's prompting me to add the search engine.

                                                   

                                                  Running /opensearch.jspa shows me exactly what you describe.

                                                   

                                                  Loading either the png or the ico shows me an image.

                                                   

                                                  I've tried removing the search engine from Firefox, clearing cache, etc. I've tried this in IE7, and adding the search engine works. However, the IE7 design doesn't include icons for their search engines.

                                                   

                                                  This is a tough one to debug...

                                                   

                                                  Thanks,

                                                  Doug

                                                    • Re: Customizing opensearch

                                                      AJ,

                                                       

                                                      I found the problem. As you may (or may not) know an icon file can contain several different resolutions of the same icon image. I built and have been using an icon that contains 64x64, 32x32 and 16x16 icon images in the same file. The advantage is that I can use the same file for any application and the application is suppose to choose the correct resolution. Apparently, Firefox can't handle this multi-image icon file. When I created a 16x16 only icon file, the image shows up correctly in the search dialog in Firefox.

                                                       

                                                      Thanks a lot for your time and patience with this.

                                                       

                                                      Doug