Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2017-09-05 19:44:01

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 684

Re: What's your "must have" plugin?

Yep, just one of the many peculiarities that makes this community really nice.
But you’ll discover it by yourself.

Offline

#14 2017-09-05 20:36:30

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: What's your "must have" plugin?

Vienuolis wrote #306854:

Only one simple yet productive txp:image attribute (and the corresponding field in images panel) linked (url) would satisfy me.

I guess, you would also like to view these “external” images on admin Image tab, right? Not sure there is no risk of malicious code injection, especially with svg format, since you have no control on external resources. Otherwise this would be a nice feature indeed.

Offline

#15 2017-09-06 00:04:41

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,071
Website Mastodon

Re: What's your "must have" plugin?

sorry. my reply should have been to this post
https://forum.textpattern.com/viewtopic.php?pid=291639#p291639


…. texted postive

Offline

#16 2017-09-06 06:46:38

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: What's your "must have" plugin?

Bloke wrote #306852:

Not wishing to derail this discussion, but what makes you say that? Serving many files at once off traditional spinning disk (e.g. Pages, Forms, Stylesheets, Images, etc.) burdens the disk controller and read/write heads.

With a separate database server and file server (to alleviate disk head contention on database temp/cache areas), delivering heavy page content from the database and allowing the disk to supply the stuff that’s only stored on disk is arguably more efficient: parallel processing and all that. On top of that, the database can return multiple resources in their entirety in a single query; a disk can’t unless the resources happen to wholly reside in the same sector or block.

Granted, on SSD the distinction is largely moot. It may then be better to serve everything off “disk”, but I haven’t done any performance benchmarks to assess which system is better. Not arguing against the idea, just curious if I’m missing anything.

I would think that static files are cached easier in the browser. We also have fewer db queries. Re images… It is a big subject for a lot of us which I am not touching as it was discussed widely in some threads here. For me there are no plugins which deal with images in a static way – and I can not think of any backward compatible method to do so.

@ Iki

smd is the prefix used by Stef (Bloke) for his plugins.

@ Bloke: +1 for com_connect


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#17 2017-09-06 10:12:29

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

Re: What's your "must have" plugin?

colak wrote #306868:

I would think that static files are cached easier in the browser.

True: queries are also cached by the DB. Swings, roundabouts… my view is we should offer both and you can choose. Theme support in 4.7.0 is about to land, which helps.

Iki wrote #306861:

So the initials in front of the plugins are the authors mark?

Yes, sorry. Forgot to mention that bit. It’s a legacy thing due to Textpattern internals, but does serve as a nice ‘branding’ benefit that you know who in the community wrote the plugin. For reference, there’s a complete list of prefixes on the docs site.


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

#18 2017-09-06 11:10:37

etc
Developer
Registered: 2010-11-11
Posts: 5,028
Website GitHub

Re: What's your "must have" plugin?

Bloke wrote #306873:

True: queries are also cached by the DB. Swings, roundabouts… my view is we should offer both and you can choose. Theme support in 4.7.0 is about to land, which helps.

Browser caching is mainly question of headers sent by the server. We could instruct the browser to cache css.php?n=default for one month, it would then not even try to reconnect to css.php (yielding no processing at all), unless the client expressly reloads a page. But this would be a problem when css gets updated. You’ve got the same problem for file-stored css, but Apache has some smart predicting algorithm for cache expiration. So storing css as files is a valid request IMO. But this is not true for pages, forms and other stuff that must be processed by txp anyway. Only IMO again :-)

Offline

#19 2017-09-06 12:26:02

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: What's your "must have" plugin?

As far as I’m concerned, since CSS is not dynamic (doesn’t have Textpattern tags in it) there is no reason to store it in a Textpattern database table. Browsers cache CSS flat files just fine by default, and you should be minifying them anyway so they’d be fairly human-unreadable in the CSS panel. I say ‘them’, you should only have a single CSS file per site in most situations.

If you want to introduce a way to spoof CSS within the database to be seen and handled like a flat file by browsers (and auto minified and auto concatenated) I have no problem with that at all. I won’t need it but I can see benefit of it to others.

Same goes for JavaScript, mostly.

Offline

#20 2017-09-06 13:49:46

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: What's your "must have" plugin?

philwareham wrote #306875:

As far as I’m concerned, since CSS is not dynamic (doesn’t have Textpattern tags in it) there is no reason to store it in a Textpattern database table. Browsers cache CSS flat files just fine by default, and you should be minifying them anyway so they’d be fairly human-unreadable in the CSS panel. I say ‘them’, you should only have a single CSS file per site in most situations.

If you want to introduce a way to spoof CSS within the database to be seen and handled like a flat file by browsers (and auto minified and auto concatenated) I have no problem with that at all. I won’t need it but I can see benefit of it to others.

Same goes for JavaScript, mostly.

This would be my ideal situation and although I will describe it for the css, it would be great if we had it for js as well:

css remains in the database as is but it is also saved as a file in a css folder.

The tag could have a minify option which would just work on the saved file but not the database. This makes it easier to edit the css .

<txp:css format="link" name="plain" rel="alternate"  minify="1" title="Plain and simple style" />
<txp:css format="link" name="glossy" rel="alternate" minify="1" title="Glossy style" />
<txp:css format="link" name="print" minify="1" media="print" />

Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#21 2017-09-06 14:33:03

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 307
Website GitHub GitLab Twitter

Re: What's your "must have" plugin?

etc wrote #306863:

I guess, you would also like to view these “external” images on admin Image tab, right?

No, plain URL only. Maybe a file (or image, article) ID instead, if internal. Or sometimes even a code snippet also, if secured.

Offline

#22 2017-09-06 16:21:43

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: What's your "must have" plugin?

colak wrote #306877:

This would be my ideal situation and although I will describe it for the css, it would be great if we had it for js as well:

You have the total freedom to do it this way in a page or a form (the same works for a js-file):

<link rel="stylesheet" href="/css/name.css" />

Or if you prefer it that way:

<link rel="stylesheet" href="<txp:site_url />css/name.css" />

Offline

#23 2017-09-06 18:39:31

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,007
Website GitHub Mastodon Twitter

Re: What's your "must have" plugin?

GugUser wrote #306881:

You have the total freedom to do it this way in a page or a form (the same works for a js-file):

<link rel="stylesheet" href="/css/name.css" />...

Or if you prefer it that way:

<link rel="stylesheet" href="<txp:site_url />css/name.css" />...

Hi GugUser,

Not quite. I was suggesting we implemented the rvm_css and spf_js plugins into the core but have an additional minify function for the static file saved.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#24 2017-09-06 18:45:22

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: What's your "must have" plugin?

colak wrote #306884:

Hi GugUser,

Not quite. I was suggesting we implemented the rvm_css and spf_js plugins into the core but have an additional minify function for the static file saved.

Oh, so the “minify function” was the point.

Offline

Board footer

Powered by FluxBB