Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#133 2008-08-18 19:23:57
Re: [wiki] A New Textbook
zero wrote:
Ah, so if I see any of these values, I copy the case. Otherwise, it does’nt matter? <snip>
I guess so, yeah. I think all other tables use lower case column names (except RealName in txp_users, but I’m not sure any attribute uses that), so attributes for images, files etc should be lower case too. No idea why they’re not all the same case.
Of course, trying to do a “one description for common attributes” becomes more interesting because you run into:
attribute: sort
values (in articles) : ID, Posted, Body, Excerpt, etc…
values (elsewhere) : id, date, caption, filename, description, etc…
as the possible values vary depending on the tag and/or the TXP table you’re using. I take it that’s what the table of terms is for; to list all possible combinations of attribute values for each tag?
Last edited by Bloke (2008-08-18 19:25:47)
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
#134 2008-08-18 19:28:46
Re: [wiki] A New Textbook
No, that won’t be a problem, because for the sort attribute, you’ll have to look at the relevant table reference to find out which columns to use. In the generic explanation of the sort attribute, you’ll only see how to use those column names to build a valid sort attribute value and explanations on how to do random sorting and 2-level sorting.
ref/table-textpattern or ref/table will contain a reference of the database table layout, explaining what the purpose of each of the columns is and which values are valid.
Last edited by ruud (2008-08-18 19:30:07)
Offline
#135 2008-08-18 19:31:19
Re: [wiki] A New Textbook
Gotcha. Makes sense.
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
#136 2008-08-19 16:25:26
Re: [wiki] A New Textbook
- Is ‘unset’ the same as ‘empty’ or is there a difference for coding reasons? I’d like to make them all ‘unset’ if they are the same.
- ‘more-info’ is now value-info and has more values
- ‘table-textpattern’ is now table
- ‘Posted’ is now ‘posted’. I intend to make all lowercase except those in the textpattern table.
- See Also has more links
Any more suggestions before I plough on (slowly because there’s a lot to change)?
Offline
#137 2008-08-19 16:47:08
Re: [wiki] A New Textbook
- Posted should be written with a capital P (that’s how it is in the textpattern table)
- I think ‘value-info’ should be ‘attribute-type’ or ‘attribute-data-type’ or ‘data-type’, because a tag value can mean something else as well.
- Should I put all the table layouts in /ref/table? Shouldn’t be a problem with some #anchors here and there, similar to the attribute data types.
- Instead of “form name” and “section name”… perhaps use just “form” and “section”, because the attribute type page will explain it in detail anyway? It may be more consistent that way (compared to types like “integer” [not ‘integer number’] and “text” [not ‘text string’].
Last edited by ruud (2008-08-19 16:51:06)
Offline
#138 2008-08-19 17:33:57
Re: [wiki] A New Textbook
Aaargghh! Thank God you spotted the Posted, Ruud! I copied the textpattern table and pasted into my text editor for my reference and missed copying the first two – ID and Posted – so thought they must be lowercase :-(
It is now data-type and names have been changed
I don’t know what the tables will contain, Ruud, so I leave that up to you. If there should be more than one, please let me know their names.
Offline
#139 2008-08-19 23:03:07
Re: [wiki] A New Textbook
Peter, I’ve finished about half of the table layout reference now. I’ll probably do the rest tomorrow. More work than I thought.
Offline
#140 2008-08-20 11:15:32
Re: [wiki] A New Textbook
Oooh, yes, more than I thought too. I was thinking it was mainly going to be about tips on sorting etc.
With it being a definitive reference to those database tables, it seems inappropriate to include sorting tips etc with it. If at all they should be in a separate article. For people who aren’t coders it won’t make any sense to put just a few sort values with an attribute and then point them to the table (as you have done in recent_articles). So I thought I’d continue to include all the values, as in article and articlecustom but put a reference to the table for coders benefit. OK?
Offline
#141 2008-08-20 11:21:08
Re: [wiki] A New Textbook
I’ll put sorting tips on the data-type page, where the sorting criteria are explained. This will include things like multi-level sorting and random sorting.
Listing all columns just makes it messy, because there are simply too many in the textpattern table (or most other tables, for that matter). That’ll just confuse the reader. This is why I listed only the 2 or 3 most commonly used columns for recent_articles, so the user can get started. Those that need more can click for more info.
Last edited by ruud (2008-08-20 11:25:28)
Offline
#142 2008-08-20 11:33:42
Re: [wiki] A New Textbook
ruud
In my sole capacity as TXP redesign cheerleader (thus far, until I can be of use for content elsewhere) can I publicly state that the table layout reference you put together rocks! That’s going to be very handy when linked from main articles and also a useful document to keep open in a browser tab when developing. Nice work.
(btw, the link to the ref table needs changing from the recent_articles page)
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
#143 2008-08-20 12:25:43
Offline
#144 2008-08-20 17:57:04
Re: [wiki] A New Textbook
I always liked the link to conditional tags in the existing txB.
Offline