public
Description: Share articles (for now) across multiple Textpattern websites. Requires glz_custom_fields.
Homepage: http://gerhardlazu.com
Clone URL: git://github.com/gerhard/glz_multi_site.git
Gerhard Lazu (author)
Fri Apr 11 07:50:22 -0700 2008
commit  7ffbfe9379d9edbb748e40d7e6def99d7129d599
tree    03fadb2f12e3eb91d55bdfc7b608b1b89d6de52b
parent  8e6df50429f13c8c9f22cba4b4fb14cb7ed6618c
name age message
file .gitmodules Thu Apr 10 08:01:31 -0700 2008 Initial release of this plugin. For more info, ... [Gerhard Lazu]
file README.txt Fri Apr 11 07:50:22 -0700 2008 * updated the config file since it wasn't accurate [Gerhard Lazu]
file glz_multi_site-0.1.gz.txt Fri Apr 11 07:50:22 -0700 2008 * updated the config file since it wasn't accurate [Gerhard Lazu]
file glz_multi_site.php Fri Apr 11 07:50:22 -0700 2008 * updated the config file since it wasn't accurate [Gerhard Lazu]
file glz_multi_site_raw.php Fri Apr 11 07:50:22 -0700 2008 * updated the config file since it wasn't accurate [Gerhard Lazu]
submodule txp_plugin_template &rarr 4a1e8d2 Thu Apr 10 08:01:31 -0700 2008 Initial release of this plugin. For more info, ... [Gerhard Lazu]
README.txt
glz_multi_site, share articles (for now) across multiple TXP websites. Requires glz_custom_fields 
(http://forum.textpattern.com/viewtopic.php?id=23996).


== REQUIREMENTS ==

* minimum TXP 4 (TXP 4.0.6 recommended)
* without glz_custom_fields you will have trouble...


== USAGE ==

This plugin works behind the scenes, it only needs to be configured initially, it takes care of itself afterwards.

The configuration happens in textpattern/config.php. Sample configuration file:

==
$txpcfg['db'] = 'database';
$txpcfg['user'] = 'user';
$txpcfg['pass'] = 'pass';
$txpcfg['host'] = 'localhost';
$txpcfg['table_prefix'] = '';
$txpcfg['txpath'] = dirname(__FILE__);
$txpcfg['dbcharset'] = 'utf8';

## REMOTE WEBSITE 1 ##
$txpcfg['remote.website1.url']['db'] = "remote_website1_db"; //<- when posting articles, remote.website1.url will be the 
string that you'll in the list of locations. This MUST be the same to that site's $siteurl.
$txpcfg['remote.website1.url']['user'] = "remote_website1_user";
$txpcfg['remote.website1.url']['pass'] = "remote_website1_pass";
$txpcfg['remote.website1.url']['host'] = 'remote.website1.url';
$txpcfg['remote.website1.url']['table_prefix'] = '';

## REMOTE WEBSITE 2 ##
$txpcfg['remote.website2.url']['db'] = "remote_website2_db"; //<- when posting articles, remote.website1.url will be the 
string that you'll in the list of locations. This MUST be the same to that site's $siteurl.
$txpcfg['remote.website2.url']['user'] = "remote_website2_user";
$txpcfg['remote.website2.url']['pass'] = "remote_website2_pass";
$txpcfg['remote.website2.url']['host'] = 'remote.website2.url';
$txpcfg['remote.website2.url']['table_prefix'] = '';

// Getting the sitepath out of our txpath
$arr_current_dir = split("/",$txpcfg['txpath']);
array_pop($arr_current_dir);
$txpcfg['sitepath'] = join("/", $arr_current_dir);
==


== ROADMAP ==

Next step is to give this plugin a dual role:
  * Master - responsible for maintaining all articles for all websites. Pushes articles to all locations.
  * Slave - updates articles locally as well as the master. Doesn't know about other slaves.

We'll most probably need to release this alongside an API for this. TXP does come with an RPC class, but it's mostly 
specific to MovableType, MetaBlog & Blogger. It is a starting point, but by a very very long shot.


== IMPROVEMENTS ==

If you want to improve on this plugin, by all means, fork it and make it yours :). This plugin has been originally 
posted on Github (http://github.com/gerhard/glz_title/tree/master). Git (http://git.or.cz) is a lovely little thing.