Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-07-01 21:22:11

Mobilizing Mouse
Member
From: Vancouver, BC, Canada
Registered: 2010-05-23
Posts: 22

Is there a limit on the number of images in an article or elsewhere?

Hi helpful people

I’m still at it, learning and creating here:

http://www.mobilizingmouse.com/mobilizingmouse/gallery/

Using Marie Poulin’s article here: http://fuelyourcoding.com/easy-to-update-thumbnail-gallery-using-textpattern-and-galleriffic/

I’ve been adding and fine tuning images, but now I’m stalled

If I add new images, I can upload them but when I add the image ID to the list on the ‘gallery’ article (which makes this technique so easy to use) and then hit ‘save’ it doesn’t.

I’m at 63 images – 10 screen of 6, plus three on the 11th page

The new image ID number just disappears/won’t take. I can still change the image IDs but I can’t get to more than 63

And I have a couple of hundred more to add bit by bit

I’ve looked through the relevant form, and page, for a ‘image_num_limit’ or something but can’t find anything obvious……

Is there a limit on the number of images to an article? If so can it be changed?

Thanks in advance!

Stephen


‘I can’t understand why people are frightened of new ideas. I’m frightened of the old ones.’
John Cage

Offline

#2 2010-07-01 22:08:35

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

Re: Is there a limit on the number of images in an article or elsewhere?

Mobilizing Mouse wrote:

Is there a limit on the number of images to an article? If so can it be changed?

No limit per se, but the maximum size of the article image field is 255 characters: this is the limit you’re hitting.

One thing you can do (I think upm_image allows this) is to assign all images in your gallery to a category. Then, instead of listing the ID numbers in the article image, give the category name and change your upm_image tag to read the category name. If upm_image can’t do that then soo_image or smd_gallery (among others) can.


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

#3 2010-07-01 22:09:23

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Is there a limit on the number of images in an article or elsewhere?

It’s because the article image field in the textpattern table is type VARCHAR which has a max. length of 255 characters. Depending on your MySQL version (you need 5.0.3 or higher) you can increase the maximum length (using phpMyAdmin).

Edit: I don’t know if doing this has downsides though. Stef?

Last edited by els (2010-07-01 22:10:43)

Offline

#4 2010-07-02 16:41:17

Mobilizing Mouse
Member
From: Vancouver, BC, Canada
Registered: 2010-05-23
Posts: 22

Re: Is there a limit on the number of images in an article or elsewhere?

Thanks for the ideas

Stef, if I tried the idea of assigning images to a category, and then displaying the category, do I have any say in the order in which they are displayed? How might I accomplish this? Or would they simply follow the image number order?

*** *** ***

Or I could simply create a new section ‘Gallery 2’ or something and then house the next 60 pictures there and so on and so on

I have contacted my host to find out what version of MySQL they are using and I might try that VARCHAR increase trick – what section’s VARCHAR would I be changing? Columns?

It does come back to a previous post about the numbering of images becoming non consecutive when images are deleted

Assuming commas are characters…

1-9=18

10-89=237

18+237=255

So if numbers are consecutive the maximum number of images using this method without altering the VARCHAR is 89

I’m at only 63 because of triple digit image numbers……

Thanks again for the speedy and knowledgeable help

Stephen


‘I can’t understand why people are frightened of new ideas. I’m frightened of the old ones.’
John Cage

Offline

#5 2010-07-02 17:16:47

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Is there a limit on the number of images in an article or elsewhere?

A string of ID numbers over 255 characters long is another way of saying “maintenance nightmare”. I would look at other solutions first.

With soo_image you can enter image ID’s as a range, or even as a comma-separated list of ranges. Doesn’t matter if the range includes non-existent images.

With any of the image plugins you should be able to sort on any image metadata field.


Code is topiary

Offline

#6 2010-07-02 18:36:50

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Is there a limit on the number of images in an article or elsewhere?

Looking at the tutorial on Fuel your coding once more, I don’t see a reason why you shouldn’t create more than one article in section ‘gallery’. You can even give them titles like ’1-10’, ’11-20’, etcetera, because you don’t need to display the titles. All you need for this section is an article list.

Edit: you only need to move the wraptag from the article form to the article tag.

Last edited by els (2010-07-02 18:39:34)

Offline

#7 2010-07-02 20:45:30

Mobilizing Mouse
Member
From: Vancouver, BC, Canada
Registered: 2010-05-23
Posts: 22

Re: Is there a limit on the number of images in an article or elsewhere?

Thanks again Els

Intriguing, but can you go a bit slower here……

So you are suggesting creating more than one article in the gallery section, OK

Say an article called ’1-10’ OK

and then adding images to the article (say 1 to 10!) OK

Then I get lost – how do I create the ‘article list’ you mention?

And ‘you only need to move the wraptag from the article form to the article tag.’

I don’t understand this I’m afraid

I can see that each article say 1-10, 11-20 etc would need to be called, but don’t quite see how

Could you give a little more detail step by step?

Thanks!

Stephen


‘I can’t understand why people are frightened of new ideas. I’m frightened of the old ones.’
John Cage

Offline

#8 2010-07-02 23:35:51

Mobilizing Mouse
Member
From: Vancouver, BC, Canada
Registered: 2010-05-23
Posts: 22

Re: Is there a limit on the number of images in an article or elsewhere?

Reporting back….

So here’s progress to date for anyone interested

I have two solutions working

One is simply a link from the first gallery to a second one, the second is its own article but uses everything else in common with gallery 1 – this could go on forever

Each can have up to 255 characters worth of image IDs (I made mine a round 60 – 10 pages of 6 thumbnails)

*** *** ***

I also tried the MySQL technique (first time inside the database…gulp) and changed the VARCHAR to 555 (for now) database>textpattern>image>VARCHAR

That also worked; so I now could stick with one page for as many images as I want

I looked at the soo_image ideas but couldn’t easily see how to incorporate this into my existing style and javascript

Thanks for all the suggestions everyone

Stephen


‘I can’t understand why people are frightened of new ideas. I’m frightened of the old ones.’
John Cage

Offline

Board footer

Powered by FluxBB