Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » How?
  3. » define ihu

#1 2021-02-10 09:52:52

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,597
Website GitHub Twitter

define ihu

I just noticed that in the distributed config-dist file there is the define ihu option which directs us to this forum thread. Does this mean that the txp db (and tags) can handle images residing in a subdomain?


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#2 2021-02-10 10:11:54

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,247
Website GitHub

Re: define ihu

Yep. Set that and all images are uploaded to and served from whatever (cookieless?) domain/subdomain of your choice. As long as you’re using the Txp image tags to form the image links/thumbnails, everything works seamlessly.

Last edited by Bloke (2021-02-10 10:14:12)


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

Online

#3 2021-02-10 11:13:22

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,597
Website GitHub Twitter

Re: define ihu

Bloke wrote #328698:

Yep. Set that and all images are uploaded to and served from whatever (cookieless?) domain/subdomain of your choice. As long as you’re using the Txp image tags to form the image links/thumbnails, everything works seamlessly.

That sounds good! But allow me to understand it better. If I create a subdomain and define it in the cofig file (define('ihu', 'https://static.example.com/images/');), will I be able to use the txp admin interface to upload in that subdomain or will I need to use sftp?

If it is the second, how does txp know the size of the images or when I upload new ones there?


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#4 2021-02-10 11:22:01

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

Re: define ihu

If your subdomain is an alias of your root domain (i.e. it just points to the root directory) then you can just upload images as normal and all works.

Note that in the modern age of faster connections and more parallel downloads from a single domain, this has less value than it did.

For Textpattern 4.9 I am investigating libraries that allow you to offload your images to a CDN/cloud service of your choice – which is kind of a better solution nowadays.

Offline

#5 2021-02-10 15:16:44

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,597
Website GitHub Twitter

Re: define ihu

philwareham wrote #328705:

If your subdomain is an alias of your root domain (i.e. it just points to the root directory) then you can just upload images as normal and all works.

Note that in the modern age of faster connections and more parallel downloads from a single domain, this has less value than it did.

For Textpattern 4.9 I am investigating libraries that allow you to offload your images to a CDN/cloud service of your choice – which is kind of a better solution nowadays.

I read about this too but I’m not convinced that it is not because of the cloud lobby down in Washington:)

What makes me consider this, is more the https, and people with slow connections on limited space computers. Images are better served by http, and by just having a faux subdomain in my root folder, would not do what I hoped that I could achieve.

No worries… Hopefully this will be available out of the box, in future txp versions.


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#6 2021-02-10 15:25:48

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

Re: define ihu

colak wrote #328726:

Images are better served by http

Debatable… maybe less TLS overhead, yes. But you’d get mixed content warnings in modern browsers if your document was HTTPS and your assets were HTTP.

Offline

#7 2021-02-10 16:32:40

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,597
Website GitHub Twitter

Re: define ihu

philwareham wrote #328727:

Debatable… maybe less TLS overhead, yes. But you’d get mixed content warnings in modern browsers if your document was HTTPS and your assets were HTTP.

I can never keep up:)


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

  1. Index
  2. » How?
  3. » define ihu

Board footer

Powered by FluxBB