Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
[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.
- usage: <code><txp:cno_gallery category=“imagecategory” /></code>
- Example: http://www.cnolle.com/series/waving/
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
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
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
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
Re: [plugin] [ORPHAN] cno_gallery
Updated. Please see the first post.
Offline
Pages: 1