Frequently Asked Questions v2 |
FAQ Main / Browse by Category |
There are two general kinds of benefits:
Through Value field on
the Mapping page you can specify not only a new value, but also
any AA expression, which is
unaliased - example:
<a href="{source_href.....}">{source..........}</a>
In the Value field you can specify, which items should be
fed and which not. It is done by modifying the value of the ‘Status Code’ of the
receiving slice, according to field in the feeding slice.
Status codes are:
1=active, 2=Holding, 3=Trash, 4=Do not fed)
An example set-up:
1) Set Feeding, as usual ('Slice
Admin' -> 'Inner Node Feeds') (see feeding FAQ)
2) Go to 'Slice Admin' ->
'Mapping' and select the your source slice
3) fill something like:
{switch({category.......1})Enviro:1:4} for 'Status Code' and set FROM to '--
Value --'
After this all items from the source
slice with category 'Enviro' will be fed into Active ('Status Code' value=1).
Other will not be fed ('Status Code' value=4).
Manual feeding
In Item Manager select the items you want to send to another slice. Select "Export"
on the toolbar just below the itemlist. After clicking on "GO" a new
window is shown where you can select destination slices. (You must have a permission
in the destination slice - at least Author. If you are Editor or more in the
destination slice, you can set the "Active" checkbox, which means
to copy the items in the destination slice into the Active Bin. If the checkbox
stays unchecked, the item is copied to the Holding bin).
The feeding is error-safe, it is impossible to feed one item to the same destination slice more than once.
Automatical feeding
Each Feed needs to be configured in both the slice where the items are entered and which will export items, and for the slice where the items are imported.Select the slice where the items are entered. Select Admin->Content Pooling -> Inner Node Feeding. If you are willing for items to go to any other slice on the same host then check "Enable export to any slice". Otherwise uncheck this box, and move slices that you want to receive items to the Export Enable box.
Select the slice where items will be received. Make sure the slice you want to recieve from is in the Import box. As a courtesy send an email to the administrator of the slices you want to receive from.
The import process can be fine tuned in two ways.
In Admin->Content Pooling->Filters you can select which of the exporting slice's categories items come from, and to which categories of the importing slice they are delivered. Select the Active box if you want items in this category to be made Active, otherwise they will go in the Holding Bin for manual approval. There is currently no way to control which items are fed, only which category they go to.
In Admin->Content Pooling->Mapping you can control which fields of the source slice end up in which fields of the destination slice.
If you want to export items already in the slice, then go to the Item Manager, check the items to export, and choose "Export" and Go. This will give a choice of destination slices, which you can check along with whether they should be Active, or go to the Holding Bin for manual approval.
When you write an item which goes into the Active bin or when you approve an item, the feeding function is invoked. This function finds all slices where the item should be fed (depending on current feeding permissions ("Admin" -> "Content pooling - Import & Export") and feeding setings ("Admin" -> "Content pooling - Filters")). The feeding goes deeper and deeper between the slices until a cycle is detected or feeding into Holding bin is set.Feeding one item from one slice to another means:
Let's look in the constants.php3 file:
# content table flags
define( "FLAG_HTML", 1 );
define( "FLAG_FEED", 2 );
define( "FLAG_FREEZE", 4 );
define( "FLAG_OFFLINE", 8 );
define( "FLAG_UPDATE", 16 );
# states of feed field of field table
define( "STATE_FEEDABLE", 0 );
define( "STATE_UNFEEDABLE", 1 );
define( "STATE_FEEDNOCHANGE", 2 );
define( "STATE_FEEDABLE_UPDATE",3);
define( "STATE_FEEDABLE_UPDATE_LOCKED",4);
# relation table flags
define( "REL_FLAG_FEED", 2 ); # 2 - just to be compatible with content table
There you see how the various flags can be set. The most important are the flags
for the field table. For each field you can set whether this field is
After copying the contents, the relation table is updated. This table holds
information about the feeding tree (from which item is the content fed to another).
The relation table will be used for another purposes in future too (for holding
discussion threads, ...), so each record for feeding if flagged as REL_FLAG_FEED.
Developers note: The implementation is based on Moritz Both's specification:
http://plus.aldebaran.de/apc-aa/csn.html
http://plus.aldebaran.de/apc-aa/csnspec.html
--------------------------------------------------
A. Installation
Node = one installation of ActionApps.
Assume there are two nodes, which want to exchange items
Step 1 Set up the node details,
- must be done by sysdadmins, with shell access on both nodes, but they only
have to be done once, no matter how many slices and how many nodes are configured,
normally it will have be done when ActionApps was installed.
Set the ORG_NAME in config.php3 file to the name of your organization, e.g.:
define ("ORG_NAME","Econnect");
Step 2 Set the information about the collaborating nodes.
- must be done by a Superadmin on both nodes, once for each node that it imports
or exports to.
Step 3 Setting import and export
- this can be done by the Slice Admin
3.1 On the exporting node,
There you can set the permissions for remote users, who will have the rights to get items from the current slice.
3.2 On the importing node,
There you can set, from which remote nodes and slices will items be fed.
3.3. Set the filters and mapping on the importing node
Filters and mapping you can set exactly the same way as for local feeding. See 'Slice Admin -> Filters' and 'Admin -> Mapping'
Step 4. Set the cron
ActionApps adds the task for CSN to the AA Cron on its setup. If you are superadmin,
you can check it on AA -> Misc - Cron page. There should be task defined as:
* 8,23,38,53 * * * admin/xmlclient.php3
For most feeds you won't need to map them, unless you want the feed to go to Active rather than Hold bin.
To set the mapping, first create the feed in AA->RSS Feeds, then click on the feed and click Map. (or go to it directly from the AA->Mapping page.
If all you want to do is send it to the Active bin, then go to the bottom and change "Status" to "Value" and "1" (hold is "Value" and "2")
You can set quite complex feeding behavior by setting any field to "RSS field or expression" and then entering an RSS field name, or more complex expression.
Fields have a prefix and a value e.g. DC:TITLE, the allowed fields are:
Prefix | Allowed Values | Where found in RSS |
CHANNEL/ | title, description, language, timestamp (AA only), link | From the corresponding CHANNEL elements at the top of the feed except slice_id is from dc/identifier |
ITEM/ | title,description,link,id, guid, pubdate | From the corresponding ITEM elements except id is from dc/identitifier) |
DC/ | title,creator,subject,description,date,source,language,relation,coverage | From the corresponding DC elements within the ITEM |
In addition, the following syntax is supported:
ITEM/DESCRIPTION|ITEM/TITLE | Will look for the Description, and if that is not present use the title |
DATE(ITEM/pubdate) | Converts the specified field to a unix date |
NOW | Uses the current date and time |
CONTENT | Hard coded to find the content and determine if its HTML, given that the RSS standard makers keep moving things! Currently it looks in Item/encoded and and Item/items/bag/li/item/value |
headline........ | Will look for an APC-AA field, this only works if the sending RSS feed is from APC site, in which case Inter-node feeding would be better anyway. |
This FAQ interface was developed by Jason at Commons.ca
|
APC
ActionApps is a free software content management system initiated by
the Association for Progressive Communications (APC) APC - Internet and ICTs for social justice and development |