[dev] Horde_UI_Pager question

Michael Rubinsky mrubinsk at horde.org
Sun Jan 27 18:16:37 UTC 2008


I'm trying to improve the api of Ansel.  I'm in the process of adding  
a 'renderGallery()' method that will render the specified gallery's  
thumbnails and pager...basically, the Gallery_View without the actions  
or tags etc...

The whole point of this, obviously is to make it easy to embed a  
gallery in another application/website. I've added a new "simple"  
gallery view to render it, and a url can be passed to it as a  
parameter, with %g being replaced with the gallery id (similar to how  
you can provide custom article urls in Jonah).

The problem is that Horde_UI_Pager generates the links using  
Horde::applicationUrl() which makes sense considering it's normal use.  
In this case, however, since it's being called within Ansel's scope  
during the api call, the urls it generates are useless. The URL it  
generates is something like  
http://example.com/horde/ansel/http://mysite.com/photos/view

I'm looking for some guidance on how to overcome this. I'm thinking of  
maybe adding a check in Horde_UI_Pager, that if a full url is passed  
to it, then just use it as is, instead of passing it to  
applicationUrl() but I honestly don't know for sure if this would be a  
"Bad Thing" as far as BC or security goes...


Thanks,
mike

--
The Horde Project (www.horde.org)
mrubinsk at horde.org

"Time just hates me. That's why it made me an adult." - Josh Joplin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 2200 bytes
Desc: PGP Public Key
Url : http://lists.horde.org/archives/dev/attachments/20080127/2d22d8b1/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: PGP Digital Signature
Url : http://lists.horde.org/archives/dev/attachments/20080127/2d22d8b1/attachment-0001.bin 


More information about the dev mailing list