Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-08-15 13:46:37

cnolle
Archived Plugin Author
Registered: 2004-03-21
Posts: 87
Website

[plugin] [ORPHAN] cno_gallery

Here’s a slight rework of jmr_gallery. Most of the original code is left untouched,
but its changed slightly so that it now generates two image maps, splitting
the image in two and using the two halves as back and next buttons. Then
it adds a bit of javascript and css taken from Eliot Shepard’s Admiral system:

http://www.slower.net/slowerlog/2005/08/admiral.php

to enable buttons appearing on mouseover. The image maps adjust itself according
to the size of the image.

Make sure to upload image arrows to the textpattern image folder. Their size is hardcoded at the moment.

There is room for lots and lots of improvements. I am trying to make somekind of system whereby you can configure the plugin.

Credits must go to Justin Rhoades for the original plugin and Eliot Shepard for the javascript and css for the rollover.

Anyway, here’s the download link

http://cnolle.com/file_download/5

Update 1: Added argument sort, such as <code><txp:cno_gallery category=“imagecategory” sort=“desc” /></code>. Sort can be ascending (asc) or descending (desc). So now newly added image will appear at the front.

Last edited by cnolle (2005-08-15 16:40:41)

Offline

#2 2005-08-15 14:19:13

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: [plugin] [ORPHAN] cno_gallery

This is really great! Nice and Simple!


“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”

— Albert Einstein

Offline

#3 2005-08-15 15:05:18

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: [plugin] [ORPHAN] cno_gallery

Very nice.

One improvement could possibly be making it pick up the category name automatically by using the article id as the category name.

Offline

#4 2005-08-15 15:27:18

cnolle
Archived Plugin Author
Registered: 2004-03-21
Posts: 87
Website

Re: [plugin] [ORPHAN] cno_gallery

That could be done. However, you might find occations where the id is different from the category. I’ll see if I can make it to default to id if there is no category given, so <code>category=“imagecategory”</code> becomes optional.

Offline

#5 2005-08-15 16:02:06

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: [plugin] [ORPHAN] cno_gallery

> cnolle wrote:

> That could be done. However, you might find occations where the id is different from the category.

Wondering how that could be when the image category name is created manually.

Let’s say my article id is 23. I’d create my image category and call it 23. Then put <code><txp:cno_gallery /></code> in an article or form.

Last edited by lee (2005-08-15 16:02:35)

Offline

#6 2005-08-15 16:27:23

cnolle
Archived Plugin Author
Registered: 2004-03-21
Posts: 87
Website

Re: [plugin] [ORPHAN] cno_gallery

Hi Lee

The idea is that the plugin would pick up not the image category name, but the article id (its unique url) antipicating that the two are the same. I.e that http://www.yourwebsite.com/section/title that title would also be the same as the name of your image category, but only if the <code>category=“xx”</code> was left out.

Offline

#7 2005-08-15 16:41:18

cnolle
Archived Plugin Author
Registered: 2004-03-21
Posts: 87
Website

Re: [plugin] [ORPHAN] cno_gallery

Updated. Please see the first post.

Offline

Board footer

Powered by FluxBB