Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-01-24 23:39:57

fowler
Member
Registered: 2007-02-12
Posts: 79

[request] Article Images on the Articles Tab

Please oh please make this a reality. Trying to organize a photo site is nearly impossible.

Offline

#2 2011-01-24 23:54:23

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

Re: [request] Article Images on the Articles Tab

Kinda tricky on the Articles panel because there are no dedicated callbacks on that list (yet) so plugins can only run stuff above / below the list. It’s not outside the realms of possibility to do it with jQuery, just a little slow.

Alternatively, can you alter your site workflow so you make more use of the new Image tags and do most of your work on the Images tab, letting a few skeleton articles control what you see on the public site? Look at Jeff’s demo and see if it inspires you at all.

It of course largely depends on what you are using the articles for. Is it for additional custom field data that you display alongside the images? For the body / excerpt to explain about each image or to introduce each gallery? For categorising the images into portfolios? For tagging?

I’m not saying you should have to move away from articles — it may not be possible to realise your admin workflow any other way — but if you can give us a hint on what it is you’re trying to achieve it might spark the imagination a little more than your above plea.

Last edited by Bloke (2011-01-24 23:55:58)


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

Online

#3 2011-01-25 16:08:27

fowler
Member
Registered: 2007-02-12
Posts: 79

Re: [request] Article Images on the Articles Tab

I’m designing a site for a photographer at the moment. I’ve been considering the Article vs. Gallery Plugin workflow, but ended up going with Articles because it’d give me more flexibility in ordering the photos in the future. I’ve had a tricky time in the past trying to put images in a specific order using your gallery plugin, so I figured that’d be the best solution. Does that make sense?

Offline

#4 2011-01-25 16:12:26

fowler
Member
Registered: 2007-02-12
Posts: 79

Re: [request] Article Images on the Articles Tab

The key thing that I should mention is that I’m trying to find an easy solution for the photographer that would allow him to manage the site in the future without getting super confused as to which photo belongs to which article, etc.

Offline

#5 2011-01-25 16:21:54

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

Re: [request] Article Images on the Articles Tab

fowler

With the lack of sorting ability and limited meta data available to current TXP images that makes perfect sense. One further question: have you considered something like smd_tags? They can work with images and can even be linked to category so you can offer context-sensitive tagging.

If that sort of thing sounds interesting I have a version that I’m tinkering on which gives much more power to the administration of the tags (think multi-edits). If you tagged your images cleverly, that might open up the options to sort by tag further down the line, and tagging images is quite logical for photographers.

One other thing I’m considering is to extend smd_write_cats to the other tabs. That would allow you to add categories on the fly directly in the Image Edit area, instead of visiting the Categories tab and flicking back. Again, a simple workflow enhancement but it might help ease things.

If none of that sounds the business I’m sure we could look into showing the article image (assuming there’s only one, or you only want to show the first) on the Articles tab via jQuery. I’m pretty sure it’ll work, it just might be a bit slow as it’d probably have to grab each image independently and inject it into the page. Let me know what you think.


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

Online

#6 2011-01-25 16:46:06

fowler
Member
Registered: 2007-02-12
Posts: 79

Re: [request] Article Images on the Articles Tab

The first option would basically translate to adding a tag, say “1”, “2”, etc to different photos and sorting by those tags, correct?

Can you explain how the jquery article image (yeah, there’s only one) process would work?

Offline

#7 2011-01-25 21:31:37

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

Re: [request] Article Images on the Articles Tab

fowler wrote:

Can you explain how the jquery article image (yeah, there’s only one) process would work?

Certainly.

  1. A plugin hooks into the Articles list — probably at the end of the page since we’ve got no useful hooks in the list itself
  2. Once the DOM is loaded, the plugin loops over each article and send off an AJAX query to retrieve the article image of the current article
  3. On successful return of the image ID, it constructs an <img> tag with the appropriate src attribute (probably to the thumbnail?)
  4. It then injects that into the markup, maybe as a new second column after the ID?

Job done. The downsides:

  1. The images aren’t there immediately and will appear after the list has been displayed
  2. You’re sending off a heap of requests on page load — one per article. This could I suppose be minimised if the jQuery was to grab all the article IDs first, package them up into a single request, retireve all the article image IDs ad then go over the list again, matching the right image with the correct article. It’s a bit more work, but it’s more network friendly. Perhaps faster too, but still with the delay between the article list appearing and the images being displayed

That’s the gist of it. No idea if it’ll work in practice but it seems doable off the top of my head.


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

Online

#8 2011-01-26 07:55:07

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

Re: [request] Article Images on the Articles Tab

would atb_image_pulldown help?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#9 2011-01-26 09:10:48

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

Re: [request] Article Images on the Articles Tab

colak wrote:

would atb_image_pulldown help?

On the individual article page, yes things like that are a great help for usability. But fowler is talking about listing the images inline with the rest of the details on the Articles list page so that someone can just see at a glance which article image is assigned to which article, then click the image to be taken to the Write tab.


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

Online

#10 2011-01-26 09:39:39

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

Re: [request] Article Images on the Articles Tab

Bloke wrote:

colak wrote:

On the individual article page, yes things like that are a great help for usability. But fowler is talking about listing the images inline with the rest of the details on the Articles list page so that someone can just see at a glance which article image is assigned to which article, then click the image to be taken to the Write tab.

fowler

What if you create a section which is inhabited by an article list and their article images, then use rss_article_edit to go to the write tab of the article.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#11 2011-01-26 09:44:38

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

Re: [request] Article Images on the Articles Tab

colak wrote:

What if you create a section which is inhabited by an article list and their article images, then use rss_article_edit to go to the write tab of the article.

Hey, that could work. And it’s better than a plugin. I like your thinking.


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

Online

#12 2011-01-26 10:29:59

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: [request] Article Images on the Articles Tab

Just to add noise to the noise:
I understand your choice of one-article-per-image is dictated mainly to gain “more flexibility in ordering the photos in the future” rather than to use “additional custom field data that you display alongside the images” or “For the body / excerpt to explain about each image or to introduce each gallery”.
If this assumption is correct I suggest you have a look at bot_image_upload.
While this plugin works at article level (one article for multiple images) it is aimed just at gallery management for non tech savvy users.
Keep in mind – if you are not in a rush – that for the next release I plan to include drag and drop ordering capability. Furthermore the plugin operates only at a “cosmetic” level since – under the hood – it stores image ids in a custom field. This lets you use any standard txp plugin (above all smd_gallery) to display images in that specific order on the public side.

Offline

Board footer

Powered by FluxBB