Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-03-11 14:48:13

feragnoli
Member
From: the hague
Registered: 2005-02-10
Posts: 150

make an article-related gallery of images with numeric list?

using upm_image I’m trying to output a number of images per article.
how can I output a navigation/paging through the images of the kind < 1 / 10 > (where the umers are current and total number of images and the arrows links to prev/next)?
I thought there was an easy way to do this…
thank you


what was that again…?

Offline

#2 2008-03-11 19:29:19

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: make an article-related gallery of images with numeric list?

The plugin does’t support that kind of thing, so you’ll have to come up with some sort of JavaScript solution.

Offline

#3 2008-03-11 20:50:10

feragnoli
Member
From: the hague
Registered: 2005-02-10
Posts: 150

Re: make an article-related gallery of images with numeric list?

at the moment I could output a list of thumbnails to make them link to their full-size image.
how could I output a list of numbers to place in the link instead?
like: get the array of images in the article image field, count their amount, and then start numbering them from 1 up before outputting them?


what was that again…?

Offline

#4 2008-03-11 20:54:18

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,449
Website GitHub

Re: make an article-related gallery of images with numeric list?

feragnoli wrote:

how could I output a list of numbers to place in the link instead?

Have you tried wrapping your brain around smd_gallery? It might do what you want and has ob1_pagination-style paging support built in.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#5 2008-03-11 21:13:19

feragnoli
Member
From: the hague
Registered: 2005-02-10
Posts: 150

Re: make an article-related gallery of images with numeric list?

yes, I was taking a look at it…
it is not completely clear to me if it is able to output the total number of ‘pages’ (images).
… is it?

Last edited by feragnoli (2008-03-11 21:16:21)


what was that again…?

Offline

#6 2008-03-11 21:33:01

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,449
Website GitHub

Re: make an article-related gallery of images with numeric list?

feragnoli wrote:

it is not completely clear to me if it is able to output the total number of ‘pages’ (images).

Ummm, it’s in the unreleased version 0.3. Not that it’s much use to you right now! Tell you what, I’m about ready to release the plugin officially anyway so give me, what, about an hour to tidy up the help a bit. Then check the official plugin repository for a version that should sort you out.

EDIT: aww crap, found a small edge-case bug that I gotta squash first :-(

Last edited by Bloke (2008-03-11 22:10:39)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#7 2008-03-11 22:09:35

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: make an article-related gallery of images with numeric list?

feragnoli wrote:

get the array of images in the article image field, count their amount, and then start numbering them from 1 up before outputting them?

bos_image_display does output a numeric navigation for images, but I’m not sure whether it works with article images, no problem with image categories though.

Offline

#8 2008-03-11 22:13:06

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: make an article-related gallery of images with numeric list?

Bloke wrote:

Ummm, it’s in the unreleased version 0.3.

Mmm, I have a feeling smd_gallery might become my sole gallery solution, exciting! :-)

Offline

#9 2008-03-11 22:31:38

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

Re: make an article-related gallery of images with numeric list?

I did this with some javascript magic in my “portfolio site”: http://www.monolinea.com/portfolio/icon-design/shiny-icons

With upm image i output all the images with a div, and then use the jquery cycle plugin with the pager option to automatically make the numbers and show/hide functionality


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

#10 2008-03-11 22:56:19

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,449
Website GitHub

Re: make an article-related gallery of images with numeric list?

kemie wrote:

With upm image i output all the images with a div, and then use the jquery cycle plugin with the pager option to automatically make the numbers and show/hide functionality

Hey, that’s pretty cool. Nice idea kemie.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#11 2008-03-12 07:46:46

feragnoli
Member
From: the hague
Registered: 2005-02-10
Posts: 150

Re: make an article-related gallery of images with numeric list?

mmm I did use the cycle plugin on other sites. but that way the page size blows up too much: all full size images have to be loaded… on a page with, say, five images that’s a disaster.

@ Bloke: hey, Bloke, thank you.

Last edited by feragnoli (2008-03-12 07:47:21)


what was that again…?

Offline

#12 2008-03-12 11:11:39

feragnoli
Member
From: the hague
Registered: 2005-02-10
Posts: 150

Re: make an article-related gallery of images with numeric list?

stef, thanks very much.

I think in the future your conditional plugin and the gallery one might become the only ones one really needs…
This stuff should come in the core installation of Txp.

anyway.

at the moment I am not sure of the configuration I’m using. I’m just using the standard article image field filled by a comma-separeted list of images.

on my article page the article tag is:

<txp:article form="default" pgonly="0" searchall="0" sort="Posted asc" /></div>

the default article form is:

<txp:smd_gallery category="?article_image"
  form="full_image" pageform="gallery_nav"
  limit="2" debug="2" />

<txp:body />

the full image form is:

<img class="animage" src="{url}" alt="{alt}" />

the gallery_nav form is:

 {navprev} {navthis} / {totalimages} {navnext}

yet, I get no output and this from debug:

++ INCLUDED/EXCLUDED IDs AND CATs ++<pre>
array (
)
</pre>
<pre>
array (
)
</pre>
<pre>
array (
  0 =&gt; '\'2\'',
)
</pre>
<pre>
array (
)
</pre>
++ WHERE CLAUSE ++<pre>
1=1 AND category IN ('2') ORDER BY category asc
</pre>
++ COMBOs ++<pre>
array (
)
</pre>

what do I do wrong?


what was that again…?

Offline

Board footer

Powered by FluxBB