Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-11-18 15:33:00

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

Manual Image sorting

Is there a plugin that allows for manual image sorting?
(ie. a drag and drop interface or simply something that allows you to swap two image ids…)

Offline

#2 2008-11-18 20:02:57

nabrown78
Member
From: Northampton, MA, USA
Registered: 2006-10-04
Posts: 294
Website

Re: Manual Image sorting

Do you want to sort in the admin interface only, or in the output?

Offline

#3 2008-11-18 20:08:53

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

Re: Manual Image sorting

In the output. But I need to be able to do it via the admin interface. So really both.

Offline

#4 2008-11-18 20:28:34

nabrown78
Member
From: Northampton, MA, USA
Registered: 2006-10-04
Posts: 294
Website

Re: Manual Image sorting

Hi dl33,

Fairly hacky way to do this I guess, but I had to create a list of thumbnails in a specified order for an artist’s site. I use several plugins to achieve it – wet_for_each_image, upm_image, and asy_wondertag. The wet_for_each_image does my sorting, as you can see in the code below, and I’ve named each image so they appear in the desired order (alphanumerically). asy_wondertag I’m using to output only a specific category of images, and upm_image outputs the actual image form. To help on the admin side I used the truly awesome JQuery table sorter plugin – requires some editing of /lib/txplib_head.php and /include/txp_image.php to get tablesorter working.

<ul id="thumbnails">
<txp:asy_wondertag><txp:wet_for_each_image category="<txp:article_url_title />" sort="name asc" limit="999">
<txp:upm_image image_id="{id}" form="img_thumb" />
</txp:wet_for_each_image></txp:asy_wondertag>
</ul>

Offline

#5 2008-11-18 20:35:05

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

Re: Manual Image sorting

Thanks nabrown78. Does this allow me to sort the images in any way (manually) or am I limited to sorting by some property. I am thinking of something like stm_article_order for images.

Offline

#6 2008-11-18 20:53:29

nabrown78
Member
From: Northampton, MA, USA
Registered: 2006-10-04
Posts: 294
Website

Re: Manual Image sorting

Wow – I didn’t know about stm_article_order. No, the method I used requires you to sort by a property, in my case the names, which I manipulated so the images fall into the correct order. Maybe you can get the stm_ creators to make a plugin for images – that would be wonderful!

Offline

#7 2008-11-18 23:01:02

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 809
Website

Re: Manual Image sorting

Maybe you can get the stm_ creators to make a plugin for images – that would be wonderful!

Yes, that would be great … :)

Offline

#8 2008-11-19 00:02:02

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: Manual Image sorting

+2 on stm_image_order :)

Offline

#9 2008-11-19 01:19:01

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: Manual Image sorting

Yep. I’m on board for this too. There are some drag/drop plugins for jQuery – not sure how to hook into the database once you set your order…but that’s what all these amazing plugin developers are for. :)

Offline

#10 2008-11-19 12:55:19

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

Re: Manual Image sorting

Just send the developer of stm_article_order and email: Turns out that he no longer develops textpattern plugins… Anyone up for the Job?

(I’ll put something up in a Plugin Request section if there is such a thing.)

Offline

#11 2008-11-19 14:26:29

nabrown78
Member
From: Northampton, MA, USA
Registered: 2006-10-04
Posts: 294
Website

Re: Manual Image sorting

I wish I had the knowledge/confidence to take it on…I’d be willing to contribute testing/ransom funds though.

Offline

#12 2008-11-19 16:12:00

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

Re: Manual Image sorting

As I said, I posted a Plugin Request. If you guys hop over there and say that you are interested, I am sure that one of the other developers will give it a go.

Offline

Board footer

Powered by FluxBB