favicon.ico rotated 90 degrees CCW
[mirrors/Kyberia-bloodline.git] / wwwroot / inc / transports.inc
... / ...
CommitLineData
1<?php
2
3function transport_load($transport) {
4 require_once(TRANSPORT_DIR.$transport.'.inc');
5}
6
7function transport_link($url) {
8 return "<a href='$url'>$url</a>";
9}
10
11function transport_translate($transport_handle) {
12 $transport = preg_split('/[:@]/',trim($transport_handle));
13 transport_load($transport[0]);
14 global $transports;
15
16 $id=$transport[1];
17 $domain='defaulthost'; if(isset($transport[2])) $domain=$transport[2];
18 $transport=$transport[0];
19
20 $node['node_status']='linked';
21 $node['node_name']="$transport:$id@$domain";
22 $node['url']=$transports[$transport]['get_node_url']($id);
23 $node['node_content']='Source: '.transport_link($node['url']).';<hr />'.$transports[$transport]['get_node_content']($id);
24
25 return $node;
26}
27
28function transport_process_node(&$node) {
29 if($node['external_link']=='transport') $node = array_merge($node, transport_translate($node['node_content']));
30}
This page took 0.080174 seconds and 4 git commands to generate.