Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-02-25 13:22:15

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Variable values

What’s the maximum length for a variable value in the <txp:variable /> tag please?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#2 2011-02-25 17:08:55

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: Variable values

I don’t think they are stored in the database so it should be unlimited. If you’re using a plugin to manage variables however, it may be storing them in the database.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#3 2011-02-25 18:37:14

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Variable values

Thanks Matt but I think maybe I didn’t give enough information so here is some code:-

tda(finput("text","ps_name[$name]",$var['value'],'','','',80))

The variables I am talking about here use an extension page to allow the inputting of values.

This is where I think there is a limiting factor. The “80”, if I’m not mistaken, is only referring to the size of the input box as displayed on-screen. I believe that the limiting factor is the “text” part so basically I end up with <input type="text" />. Is there a limit on a text input field?

Last edited by thebombsite (2011-02-25 18:39:43)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#4 2011-02-25 20:28:05

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Variable values

thebombsite wrote:

What’s the maximum length for a variable value in the <txp:variable /> tag please?

No limit. Limiting factors are the memory space, and obviously the maximum size of the form and/or the page template which is 64kb (as text type is used for the DB field).

The variables I am talking about here use an extension page to allow the inputting of values.

Where are you storing the values? If you are using database to store the values, and the field type is varchar, you could set the field to text.

Is there a limit on a text input field?

No. But there is an optional maxlenght attribute in HTML.

Last edited by Gocom (2011-02-25 20:36:59)

Offline

#5 2011-02-25 22:23:04

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Variable values

Thanks Jukka. Looks like I need to go have another look. As far as I am aware the values are not stored in the database but what do I know? I do seem to be hitting a limit though on the length of text I enter but for normal usage I don’t envisage a problem. It’s only when I start getting clever and sticking conditional tags in there.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#6 2011-02-25 23:37:34

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: Variable values

I believe adi_variables stores them in a form called adi_variables.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#7 2011-02-25 23:43:34

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Variable values

Yes that’s right Matt, but if they are stored in a form and the form is stored in the database, does that impose any limits?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#8 2011-02-25 23:45:59

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Variable values

thebombsite wrote:

Yes that’s right Matt, but if they are stored in a form and the form is stored in the database, does that impose any limits?

Let me quote what I said earlier:

Limiting factors are the memory space, and obviously the maximum size of the form and/or the page template which is 64kb (as text type is used for the DB field).

64 KB is the maximum size of a form.

Offline

#9 2011-02-25 23:49:41

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Variable values

Aha. So it’s the total form size and not the individual input size.

There you go. You learn something new every day Jukka, though it has been a while since you last taught me something.

You’re slipping. ;)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#10 2011-02-26 00:14:04

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Variable values

thebombsite wrote:

You’re slipping. ;)

The never ending problem of a lazy bum like myself. You’re not just asking enough to keep me entertained :p

Last edited by Gocom (2011-02-26 00:14:15)

Offline

#11 2011-02-26 00:24:35

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Variable values

I shall have to start inventing some imaginary problems for you then.

Obviously I won’t let you know that they are imaginary. ;)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

Board footer

Powered by FluxBB