Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
mysql field are to short, what can i do?
yo, hi and thanks for reading.
this post is about the table “Image” in txp’s db.
its to short for the content im putting in, it only can handle 255 charracters..
can i change this some how..?
the thing is, i use upm_image, so i put in multiple images there.
and the website i am talking about, has some 7500(and counting!!) images, what makes the field very small,
since each post has some 20 – 40 images..
what can i do with the mySQL field, so its still working properly and has more charracters, since the field-type is varchar and the maximum size is 255..???
hälp!!
thanks
edit
mabe put it on “mediumtext” like the body itself.. with no fixed lenght??
i have a little fear, touching the db of a properly working website, with gazillion tons of content.. :(((
Last edited by jens31 (2010-05-04 11:59:12)
Offline
Re: mysql field are to short, what can i do?
jens31 wrote:
the table “Image” in txp’s db. its to short for the content im putting in, it only can handle 255 charracters..
Which part of the Image table? The caption? The alt text? There’s no limit to the number of images you can store in TXP.
the thing is, i use upm_image, so i put in multiple images there… since each post has some 20 – 40 images
Do you mean in the article image field on the Write tab?
In which case, you have some options. I believe that upm_image allows you to put a category name in the article_image field (if it can’t, smd_gallery and I’m pretty sure other gallery plugins allow you to do it). That way you can organize your images into (sub)categories and put the category name in the article_image field instead of a list of numbers; thus the size of it isn’t so much of an issue.
Does that help or have I missed the point?
Last edited by Bloke (2010-05-04 12:11:52)
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
Re: mysql field are to short, what can i do?
hi bloke, thanks for your comment.
yes, sorry, i just took the table name of txp, i am talking about the article image.
hmmm. looks like i have the hack a bit more, to get around this problem.
i guess your solution would work, but the problem here is, that i already have plenty of content.
and upm_article_image plug in is not working with category names, so i have to change some code here..
dayum!!
like i said, i’d rather change the behaviour of the table field (make it capable of more charracters) instead of changing the whole process of editing the site..
i’ll try to change the field to mediumtext. lets see if this works.. :D
Offline
Re: mysql field are to short, what can i do?
uhm. looks like its working.
edited an article. pasted some 100 images (each image has 4 digits, a komma and a space, makes up 600 charracters).
saved. published. worked.
all the old content looks like its still there / running.
high 5 and thank you for your time :)
Offline