Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-06-02 00:56:53

richtestani
Plugin Author
Registered: 2009-11-08
Posts: 128

Image Article Selector

I have a working copy of a new plugin, I’d like to get some feed back. It’s another way to select images inside the write tab.
This particular plugin allows many images to be associated with an article, rather than a single image.
You’ll need to use the <images> tag to handle it of course.

The plugin is over at my gist page:
https://gist.github.com/richtestani/c062356b6a6411825db0

A few things to add would be ordering of images via drag & drop, and uploading here.
It’s a start for now, and works well for me right now.

I wonder if I should have created a modal overlay instead of an inline box though.
Suggestions?

Thanks
Rich

Below is the help file from the plugin

————————

What is Article Image Selector?

Article Image Selector allows you to choose images to attach to an article. Manage images for any article easily and efficiently from a single location.

How does it work?

Once installed, go to an article or new article. Scroll down to the Article Image field and click the ‘Add an Image’ button. This will expand a hidden box showing all of your uploaded images (done through the images tab). If you have many images, the page load time can take awhile and it is suggested to use thumbnails for your images, as Article Image Selector will look for those first. If the number of images take up more space the box generated, a scroll will allow you to move through all of your images within the box.

Click an image you’d like to associate with your article. The image will be removed from the box and moved above it where images associate with the article will appear.

Conversely, if you would like to remove an image, simply click any image associated with the article and it will no longer be associated with the article.

Remember to click Save!

Article Image Selector will maintain the individual image id’s for you, so you can visually manage your images.

How do I show them on my page?

Using TextPattern’s built-in tags, simply use <txp:images /> or <txp:article_image /> for a single image.

Last edited by richtestani (2014-06-02 14:59:31)

Offline

#2 2014-06-02 01:45:04

richtestani
Plugin Author
Registered: 2009-11-08
Posts: 128

Re: Image Article Selector

Updating this plugin tonight – will have an update in the morning.

-Noticed in the default theme clicking ‘add an image’ would click through. Needs to prevent default on click.
-Needs to be styled for many, many images

Offline

#3 2014-06-02 12:01:46

richtestani
Plugin Author
Registered: 2009-11-08
Posts: 128

Re: Image Article Selector

Modified the plugin to fix the above issues. Next I’ll write a proper help file and maybe those images aren’t so explanatory. I’ll work out new images that help explain better.

Offline

#4 2014-06-02 14:56:26

richtestani
Plugin Author
Registered: 2009-11-08
Posts: 128

Re: Image Article Selector

Added a help file, I will update the original post with that content.

Offline

#5 2014-06-02 16:06:39

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

Re: Image Article Selector

Nice, It’ll save some time in writing all the numbers down. It works as expected in my install.

One comment. I’d like the iframe to have a ‘close’ button. An “x” or something. At the moment the window closes with the ‘Add a new image’ button but it is slightly counter intuitive.


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

Offline

#6 2014-06-02 16:13:24

richtestani
Plugin Author
Registered: 2009-11-08
Posts: 128

Re: Image Article Selector

@colak
Thanks! True some close button will need to be added.
Do you think the box should float over the layout, or is intuitive enough in column 1?

Rich

Offline

#7 2014-06-02 16:16:38

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

Re: Image Article Selector

Hi Rich

I’d rather have it over the layout but this is just me. Do you know if it works wit mobile devices too?


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

Offline

#8 2014-06-02 16:22:26

richtestani
Plugin Author
Registered: 2009-11-08
Posts: 128

Re: Image Article Selector

I have not tested this on mobile devices, currently it sits within the sites structure so generally it would adhere to the formation of the admin page.

However, the heights of images are specified to 120px which would not change. I would need to workout a bit more flexible solution to truly accommodate this but logistically it probably would work without issue. I will take a look at it on my iPhone shortly.

Thanks very much for your feedback!

Rich

Offline

#9 2014-06-02 16:32:52

richtestani
Plugin Author
Registered: 2009-11-08
Posts: 128

Re: Image Article Selector

So it works just fine on my iPhone 4S running iOS 7.0.5, but the width grows wider than the screen, so it creates a larger width. I’ll work out some adjustments to keep the box more fluid.

The interactions otherwise work just fine and the same as desktop browser.
I don’t have any other mobile devices to test it out.

Rich

Offline

#10 2014-06-02 19:59:26

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: Image Article Selector

In my installation it doesn’t work. The image window opens and closes so fast, that I can’t view the photos.

And by the way: What is the difference between your plugin and mck_article_image (it works fine)?

Offline

#11 2014-06-02 19:59:54

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

Re: Image Article Selector

I was following your monologue today but didn’t have any spare time to try it out until now. I like it. Simple and effective. I’d echo colak’s comment about a close button: scratched my head a bit to figure out how to get rid of the picker.

Regarding the text over the images, I find it kind of gets in the way a bit, especially with the limited width of the grid. Plus, the images on my test server are primarily light backgrounds so the white text seems a bit lost. Would it be possible to perhaps only show the text (or other meta info) on demand? I was going to suggest hover with a subtle transparent background to make it easier to read, but hover’s not very mobile friendly so maybe it’s not possible (I don’t have a mobile device either so can’t test that part of it).

All in all a great addition to the Textpattern pluginverse. Many thanks!


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

#12 2014-06-03 12:14:01

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: Image Article Selector

In a second try, in an another installation, the plugin works. Both installations are Textpattern 4.5.5. I don’t know, why it didn’t work the first time. Sorry.

Offline

Board footer

Powered by FluxBB