Search the web
Sign In
New User? Sign Up
vanilla-pudding · Vanilla is a simple hypertext system which subscribes to the Wiki philosophy.
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
image attachments display   Message List  
Reply | Forward Message #923 of 980 |
Re: image attachments display


Tuesday, February 6, 2007, 5:42:55 AM, John wrote:

> I would be interested in looking it over but only if you feel like
> reviewing the code or just want to post it in the group or something
> where it could be beneficial to all.

I've attached the gallery dynasnips as they are in use at
sock.strain.at. The basic idea of the gallery is as follows:

You have a web-accessible directory where you store all your image
galleries. Within this directory, each gallery is store in it's own
subdirectory. Within each gallery subdirectory reside the files for
your full-sized images; within a small/ subdirectory reside the
according thumbnail files.

So for example, let's say you have all your galleries in
/home/user/public_html/gallery/ and you have two galleries
"uk2005" and "nz2006" then your directory structure would look like
the following:

/home/user/public_html/gallery/
uk2005/
img001.jpg
img002.jpg
small/
img001.jpg
img002.jpg
nz2006/
foo.jpg
bar.jpg
small/
foo.jpg
bar.jpg

If you use the same name for thumbnail files and fullsize files, you
are settled. You need not to, though - it's sufficient if the
thumbnail and fullsize file are at the same position in their
respective sorted list of files.

To display a gallery, create a snip and call the gallery dyna
appropriately. Eg. to display a image gallery for the "nz2006" folder
above, create a "gallery-nz2006" snip and enter {!gallery:nz2006/}.

The gallery is currently designed to run in a popup window, so the
"gallery-nz2006" snip created above needs to be displayed in a popup
window. To ease this, there is the glink dyna which creates some <a
parameters. Ie. to link to the gallery we created before, simply write
eg. <a {!glink:gallery-nz2006}>New Zealand 2006</a> in some snip. For
this to work, you must also include popup.js in your main template.

To get the gallery to work, you need to adapt the gallery dyna a bit
to your needs:

- you MUST adapt the file-prefix and url-prefix variables in
%gallery.r; file-prefix points to the root directory where your
gallery files are stored. url-prefix is the absolute url that allows
web access to this directory.

ie. if you place a "test.txt" in your gallery root, this file must
be at <file-prefix>test.txt in your file system and you must be able
to access it via http://<your-domain><url-prefix>test.txt

- you almost certainly have to adapt arr-left-url and arr-right-url to
point to the URL of some images that you want to use as
previous/next icons.

- once you have that stuff running, you most likely want to adapt the
template at the bottom to match your desired gallery design. Currently
there is no vanilla markup expansion done in this template.


This may now sound a bit elaborate, however, it's not that difficult
with some basic Vanilla experience. To sum things up:

- place the attached dynas in your apps/ folder
- place the attached popup.js in your res/ folder, include the
popup.js in your main template (vanilla-template)

- create the gallery folder structure
- adapt gallery.r to properly point to your gallery structure

- (x) upload fullsize and thumbnail images for a test gallery
- (y) create a gallery snip calling the gallery dyna
- (z) create a second snip calling glink to link to the gallery

If that works, go on and adapt the template inside gallery.r to your
needs. If all is nice and pleases you, the last three steps (labelled
x,y,z above) is what you'll repeat every time you add a new gallery.

So, I'll leave it at this already rather lengthy explanation. If
anyone still decides to give it a go, please do not hesitate to ask if
questions arise -- I'll be happy to help.


... earl walker out ...

Sat Feb 10, 2007 5:39 pm

lord_earl_wa...
Offline Offline
Send Email Send Email

Attachment
glink.r
Type:
application/octet-stream
Attachment
popup.js
Type:
application/octet-stream
Attachment
gallery.r
Type:
application/octet-stream
Forward
Message #923 of 980 |
Expand Messages Author Sort by Date

Hi, does anyone know of an image gallery type dynasnip? I've been looking into a way to display image file attachments via a template but !attach.xxxx stuff is...
John
cu2@...
Send Email
Feb 2, 2007
2:22 pm

... i've written a very simplistic one for http://sock.strain.at/ - i could dig it up again if you are interested. however, i don't exactly remeber how easy to...
Earl Walker
lord_earl_wa...
Offline Send Email
Feb 6, 2007
1:38 am

... I've attached the gallery dynasnips as they are in use at sock.strain.at. The basic idea of the gallery is as follows: You have a web-accessible directory...
Earl Walker
lord_earl_wa...
Offline Send Email
Feb 10, 2007
5:43 pm

... That's great, thanks! I'll work with it as time allows, it should help more for my understanding a bit more of how to interact with the vanilla framework. ...
John
cu2@...
Send Email
Feb 12, 2007
4:40 am

... Yes. And you'll have to play with the template/popup anyway, so that needs to match as well. I think sock.strain.at uses 600 pixel wide full images and no...
Earl Walker
lord_earl_wa...
Offline Send Email
Feb 13, 2007
1:24 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help