Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-05-28 00:15:53

Inspired
Plugin Author
From: Kiev, Ukraine
Registered: 2005-01-28
Posts: 87
Website

[plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP

This plugin will help you if you’d like to manage multiple domains with only one Textpattern installation.

Does your hosting account allow you creating subdomains? Perhaps unlimited? Do you feel you could use them but you are not sure how you would manage them all?

You can manage as many domains as you wish with only one Textpattern installation. All you need is to copy two files (as a minimum) to the new domain (but at the same host) and use this plugin.

ied_if_domain home page – download it and follow help.

The idea is at the basic stage and i hope you will give more sense to it and let everyone know if and how it works for you. I have already created a couple of domains that are managed this way (1 2) and i think it is quite handy.


Plugin Composer — admin plugin to write your own plugins

Offline

#2 2006-05-28 09:05:47

Vitruvius
Plugin Author
Registered: 2004-09-21
Posts: 121

Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP

Wow – great work – I sure could have used such a plugin in a job I just finished. I might have to go back and ammend the hack we did…

I will def. download and have a look at this one

Offline

#3 2006-05-28 18:54:13

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,142
Website

Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP

Hi Yura, you’ve been doing some fantastic work these days. Does this work with virtual domains too (same server)?


The text persuades, the *notes prove。

Offline

#4 2006-05-28 21:42:12

Inspired
Plugin Author
From: Kiev, Ukraine
Registered: 2005-01-28
Posts: 87
Website

Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP

Exactly! Basically you just need that second domain to share the database (means it can even be another server if you can make calls to the same database). Then all the plugin does is checks the domain a user pinged.

In other words you have one database for a number domains or subdomains, then you give different content to those domains/subdomains with a little help of the “if” statement. That’s the idea.


Plugin Composer — admin plugin to write your own plugins

Offline

#5 2006-06-09 00:23:03

Vitruvius
Plugin Author
Registered: 2004-09-21
Posts: 121

Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP

Is it possible to manage completely different domains rather than just subdomains?

I have a txp website driven off say ‘mywebsite.com.au’ working as normal.

I also have another domain ‘mywebsite.co.nz’ pointing to the same site.

I have tried to use your plugin to get txp to detect which url is being used, but have had no luck.

Is it possible?

Thanks

SH

Offline

#6 2006-06-09 08:29:21

Inspired
Plugin Author
From: Kiev, Ukraine
Registered: 2005-01-28
Posts: 87
Website

Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP

The answer is right above — yes, it is possible. Basically the plugin doesn’t even understand the difference between “domains” and “subdomains”.

Also don’t forget to follow the instructions in the help of the plugin.


Plugin Composer — admin plugin to write your own plugins

Offline

#7 2006-06-13 03:15:38

Vitruvius
Plugin Author
Registered: 2004-09-21
Posts: 121

Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP

Hi Yura,

Thanks – sorry for taking a while to get back to this…

I’m not sure what I am doing wrong — but it is not working. At the moment I have the following code:

<code>
<txp:ied_if_domain domain=“mysite.co.nz”>
<small>mysite-nz</small>
<txp:else />
<small>mysite-au</small>
</txp:ied_if_domain>
</code>

I’m note sure where abouts I’m mean’t to do with this part of the help:

Then you should copy root/index.php, root/.htaccess and root/textpattern/config.php from your main Textpattern installation to your subdomain.

I have the second full domain ‘parked’ over the top of the other one. So, without the plugin if I go to mysite.co.nz I already see the same as if I’d gone to mysite.com.au.

And with the plugin I get the content of the ‘else’ clause no matter which domain I use to view the site.

Any poiners would be helpful

Thanks

SH

Last edited by Vitruvius (2006-06-13 03:17:59)

Offline

#8 2006-06-14 08:50:11

jameslomax
Member
From: UK
Registered: 2005-05-09
Posts: 448
Website

Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP

If I understand this correctly, this is a seriously powerful hack that could be very useful.

So if I have blahblah.com and sunshineday.org, can I run both of them with one txp install?

If so, great – and I believe movabletype has had this feature for a long time, so its good to see txp starting to compete.

Have to say though, it seems to me this needs some serious testing, and has to be 100% stable and reliable before it could be considered, because it messes directly with the database.

Any chance of a screen shot showing the GUI options where you can post content to either blahblah.com or sunshineday.org/whatever?

Offline

#9 2006-06-14 09:26:58

Inspired
Plugin Author
From: Kiev, Ukraine
Registered: 2005-01-28
Posts: 87
Website

Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP

James, it is just a conditional tag, so there’s no GUI. If you have luck to point two domains to one textpattern, then you can use the conditional to give contents to one domain or the other.

Vitruvius, if you already see your textpattern based website on two domains, then you don’t need to do anything except just use the conditional. I’m not quite sure why it doesn’t work for you, it should work theoretically. If you find the cause of the problem please share it with us, because the plugin is quite proof-of-concepty.

The plugin by itself is very simple and leaves it to your imagination how you can organize your domains with your textpattern. Perhaps you could create sections, or categories, for different domains and then use the conditional to feed them to the domains.


Plugin Composer — admin plugin to write your own plugins

Offline

#10 2006-06-16 01:20:09

aldo
New Member
Registered: 2006-04-12
Posts: 5

Re: [plugin] [ORPHAN] ied_if_domain - manage multiple domains with only one TXP

Is this plugin working correctly, I followed the insturctions, but the images do not show up on the subsite….Additionally where exactly does the conditional statement go??? In the index file in a form – the help info is not very helpful…

sub: http://www.sub.pspcollective.com

root: http://www.pspcollective.com

Can someone please help…

Offline

Board footer

Powered by FluxBB