Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2016-01-29 19:40:52

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 989
Website

Re: aam_if_host: Conditional Host Name Plugin

Does anyone have a backup of this plugin—either compiled or the source code?

The download link above has succumbed to 404 linkrot, and I can’t find it on Archive.org, Github, or Bitbucket.

Offline

#12 2016-01-29 21:12:22

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,226
Website

Re: aam_if_host: Conditional Host Name Plugin

I have a copy here.

Offline

#13 2016-01-29 21:13:50

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: aam_if_host: Conditional Host Name Plugin

<txp:php>if (in_array($_SERVER["HTTP_HOST"], array('localhost', 'some.other.domain')):</txp:php>
do this
<txp:php>else:</txp:php:
do something else
<txp:php>endif</txp:php>

Something like that should be equivalent.

Offline

#14 2016-01-29 23:27:50

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

Re: aam_if_host: Conditional Host Name Plugin

A similar if not quite as precise approach is to set a site variable for the intended public_domain then check if it matches txp:site_url. Good, for example, for setting meta robots and preventing tracking on beta sites…


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB