Short Urls for Embedded G2
|
valiant
Joined: 2003-01-04
Posts: 32506 |
Posted: Sat, 2005-03-26 15:39
|
|
The goal of this discussion is to bring back Short Url Support for embedded G2. I hope to have feedback from the authors of the different integration to see if they see more/other problems/solutions. The authors of the original and the new G2 short url approach should also participate to find a new solution for short urls in embedded G2. Problem: With the old GalleryUrlGenerator one could dynamically set the baseFile for each request and all urls, even the short format were based on this baseFile. That's still possible for non short urls, but not for short urls with the new approach. Solutions: 2. Have another GalleryUrlGenerator class, similar to the old short url style with PathInfo. If G2 is in embedded context, use the EmbeddedGalleryUrlGenerator. This should be straight forward. 3. Have a GalleryUrlGenerator for each integration, perhaps all integrations are too different to try to solve it with just a single approach. |
|
| Login or register to post comments |

Posts: 389
Solution 1:
I think the rewrite module easily could be modified to fit the needs of an embeded Gallery installation. As it is now, Rewrite does not take the relative path in consideration, but do use baseFile. The htaccess file is created like this:
The htaccess file is installed in galleryDir. For an embeded environment the htaccess file probably shoud be installed in the CMS dir and look something like this:
Come to think of it, the htaccess file location should be configurable as I had it with some privious (never in CVS) versions of the Rewrite module. If this sounds reasonable I'm willing to bring it back.
With the new Rewrite module I'm working on users will be able to customize the rules quite alot, and hopefully be able to resolve any conflicts.
One could, for example, have a CMS in /cms/ with Gallery in /cms/mod/gallery/ and make /cms/gallery/album/item.jpg.html map to /cms/index.php?mod=gallery&path=/album/item.jpg.html