Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Testers needed: flat development (4.7+ only)
etc wrote #310936:
Not sure why we need to append
.txp
extension, though.
Perhaps we should only append the .txp
extension if the name doesn’t already have one? That would depend if the system ignores other files. I think the regex does that.
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
Offline
Re: Testers needed: flat development (4.7+ only)
Bloke wrote #310938:
Perhaps we should only append the
.txp
extension if the name doesn’t already have one? That would depend if the system ignores other files. I think the regex does that.
If we are going to squat Styles
pane (renamed to Assets
?), we can leave forms as is, I guess.
Offline
Re: Testers needed: flat development (4.7+ only)
etc wrote #310939:
This future could be very near, in fact. Few hours of coding… :-)
Tease :-)
do it: you know you want to! that’s what branches are for
etc wrote #310940:
If we are going to squat
Styles
pane (renamed toAssets
?), we can leave forms as is, I guess.
True dat.
EDIT: We’ve referred to Forms, Styles and Pages collectively as Assets in the documentation (only because that’s what they’re called in the code and I copied it). So we’d need to tweak the docs a tad, nothing major.
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
Offline
Re: Testers needed: flat development (4.7+ only)
etc wrote #310943:
does not mean by me! Stef, if you know what to change to avoid the auto
.css
extension, please do.
I’ll look at it tonight.
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: Testers needed: flat development (4.7+ only)
Bloke wrote #310942:
EDIT: We’ve referred to Forms, Styles and Pages collectively as Assets in the documentation (only because that’s what they’re called in the code and I copied it). So we’d need to tweak the docs a tad, nothing major.
What about if it is renamed to Types
? It will in the foreseeable future deal with discrete, text mime types, right?
Edit> Yet again json
is left out there with its application/json
mime type.
Last edited by colak (2018-04-12 18:42:30)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Testers needed: flat development (4.7+ only)
If it helps, here is a (not exhaustive) list of possible mimetypes we could support:
[
'txt' => 'text/plain',
'csv' => 'text/csv',
'htm' => 'text/html',
'html' => 'text/html',
'css' => 'text/css',
'js' => 'application/javascript',
'json' => 'application/json',
'xml' => 'application/xml',
// Images
'svg' => 'image/svg+xml'
]
Edit: drastically shortened, please complain if something is missing.
Offline
Re: Testers needed: flat development (4.7+ only)
etc wrote #310949:
If it helps, here is a (not exhaustive) list of possible mimetypes we could support:
whoa! That’s much more than I expected!!!
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: Testers needed: flat development (4.7+ only)
colak wrote #310951:
whoa! That’s much more than I expected!!!
Well, there is probably no reason to store non-editable types in the db, so the list is likely to be shorten. Now a million dollars question: could some of txp users have named his styles with .js
, .xml
or some other extension? If we enable auto-guessing, this could be a problem.
Offline
Re: Testers needed: flat development (4.7+ only)
wow, way to go you two. I think the name “assets” covers a lot of the cases.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Testers needed: flat development (4.7+ only)
etc wrote #310954:
Well, there is probably no reason to store non-editable types in the db, so the list is likely to be shorten.
Yeah, I’d challenge anyone to edit a .zip
or .exe
file in the Styles panel!
could some of txp users have named his styles with
.js
,.xml
or some other extension?
Tough. If you rename a file extension in a desktop OS, you lose the ‘shortcut’ ability to double click it and launch the associated app. Or it loads the wrong app.
In Txp, let’s use the same approach: if you use a crappy extension for your stylesheet, you lose the ability to use the native <txp:css />
tag for that asset. If it was done on purpose, you could still use the new tag to output it by overriding the guessed mimetype.
EDIT: the only thing I would say is that if you don’t specify a file extension, should we fall back on assuming .css
? In my Stylesheet names I rarely use a name with an extension. Or does this issue only affect file-based assets?
Last edited by Bloke (2018-04-12 19:59: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