From: damien l. <da...@ba...> - 2003-03-05 22:31:17
|
Here are some ideas about a gallery module for OI. I. content-providing interface A.features php gallery (gallery.sf.net) may be a useful model: - uploading 1 or more images consecutively, including captions - editing captions - repositioning images within the list - removing images - automatic thumbnail creation, and detection of dimensions (requires a new perl lib) B.future features - image rotation - viewing and editing permissions on sets of images - viewing preferences such as size (normal vs. full) - viewing stats (no. of times viewed) C. implementation Database can hold the image attributes: ID (why not have this be the path?) caption height width thumb dimensions, unless we want to store in a auto-generated path like imgAA-90x100.jpg viewing stats? .. II.viewing interface A.features The viewing interface might be a few methods such as the following. Parameters would be supported in the method call and otherwise in the url query string. 1. generating a spread of thumbnails: Params include: offset: which img to start with. default 0 count: how many thumbs to show. default 9 or so image: which image is "current" -- the thumbnail is not an active link. also, a different template would be used; e.g. thumbnail_current versus thumbnail_normal 2. displaying the "current" image at normal size: Params include: image: identifier for the image (i suppose it's possible to support params for the attributes of the image (height,width,caption) if we want to minimize the number of database queries. but then what do you do when you are sent a screen shot of your site containing some ludicrous caption that a user has manually inserted?) B.future features - slideshow - email this photo C. example usage ---------------------------------------- <fullsize photo> _previous photo_ _next photo_ <thumb> <thumb> <thumb> <thumb> <(thumb)> <thumb> <thumb> <thumb> <thumb> _previous page_ _next page_ --------------------------------------- Note that the center thumb is "current". Each of the other thumbs is linked to a page where it is current and the fullsize version appears at the top. D. implementation I am very new to OI but i'm guessing that this involves writing the functions in perl so that they can be called with PROCESS wherever the admin wants to insert the content. in the example there is first a call to gallery.image and then to gallery.thumbnails. The html will hopefull stay in templates. What will be needed? so far i have: thumbnail_current thumbnail_normal thumbnail_row thumbnails (the outer table holding the rows) image E. caching Since most galleries have only hundreds of images and each image has rather small attributes, i'd say this is good ground for caching. any comments appreciated damien On Sat, Mar 01, 2003 at 10:15:22AM -0500, Chris Winters wrote: > damien leri wrote: > > I'd like some image gallery functionality in OI, so let me know if something's > > been done already... > > Not yet as far as I know. Do you have any existing programs you'd > like to model a gallery after? > > Chris > > -- > Chris Winters (ch...@cw...) > Building enterprise-capable snack solutions since 1988. > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > openinteract-dev mailing list > ope...@li... > https://lists.sourceforge.net/lists/listinfo/openinteract-dev -- http://babelguides.com/ <<world literature in translation>> |