Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 183
Website

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,400

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: 7,343
Website

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.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

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

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

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

#25 2017-09-06 19:01:55

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,343
Website

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

GugUser wrote #306885:

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

Yes and No:) There were a number of points

  1. The ability to edit the css in the db as we are doing currently
  2. The ability to save that css as a file in the same way as rvm_css does
  3. The ability to minify the css but only in the saved file and not in the db
  4. All of the above, but for js (think spf_js +)

Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

#26 2017-09-07 07:51:16

Iki
Member
From: New Hampshire
Registered: 2008-05-26
Posts: 17

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

What does the “minify” function do?

What’s the upside/downside to storing them in the db as opposed to just linking to the .css file in the web directory?


“Some days, even my lucky rocketship underpants don’t help.” — Calvin, Calvin & Hobbes

Offline

#27 2017-09-07 08:16:17

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,555
Website

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

Iki wrote #306889:

What’s the upside/downside to storing them in the db as opposed to just linking to the .css file in the web directory?

I think your original ‘favourite plugins’ question got a little sidetracked by the discussion on files versus databases.

Without meaning to tread on anyone’s toes, this is a relatively minor technical aspect and often a matter of preference. The loading speed / caching aspect can make a difference, especially for very large css files, but it is a speed optimisation aspect and not crucial to textpattern:

  • Storing in the database means you can access the stylesheet via the Presentation » Styles panel in the admin area using a web browser and can, therefore, edit it online from anywhere.
  • Storing it as a file means you can edit it with your favourite code editor with all the extra benefits that brings. And you can also make CSS part of your web development repository using a versioning system (e.g. git or subversion etc.) if you use that. You can also generate it using an SCSS / SASS / LESS preprocessor and run it through a minifier. Generally speaking, you can’t edit it online without your computer.

Plugins such as rvm_css and spf_js allow you to edit in Textpattern’s admin area and save the results as a file that you can serve with a tag. They can also be combined with minification. This method doesn’t play well if you are managing your CSS/js in a versioning system.

What does the “minify” function do?

Minifying crunches the CSS or javascript down to minimum size to reduce loading time. The minified files are no longer human-readable. Typically you develop using CSS and manually or automatically minify the final file for uploading to the server.


TXP Builders – finely-crafted code, design and txp

Offline

#28 2017-09-07 08:31:49

etc
Developer
Registered: 2010-11-11
Posts: 3,358
Website

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

Vienuolis wrote #306879:

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

I’m not sure how (and why) it would fit the current Image tab. Why would you like to mix images, files and articles ids in txp_image table? What you need looks more like a Link for me, but, fwiw, custom image fields are planned in 4.9 (possibly even 4.8).

Offline

#29 2017-09-14 17:57:12

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 183
Website

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

etc wrote #306891:

custom image fields are planned in 4.9 (possibly even 4.8).

Good news, thank you very much! Will this apply an article_image, too?

Offline

#30 2017-09-14 19:29:41

etc
Developer
Registered: 2010-11-11
Posts: 3,358
Website

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

Vienuolis wrote #307005:

Good news, thank you very much! Will this apply an article_image, too?

It’s difficult to answer right now, but I hope the wait will not be too long.

Offline

Board footer

Powered by FluxBB