get_image_link fix
[mirrors/Kyberia-bloodline.git] / wwwroot / inc / transports.inc
CommitLineData
301010e3
H
1<?php
2
3function transport_load($transport) {
4 require_once(TRANSPORT_DIR.$transport.'.inc');
5}
6
bdd7d07d
H
7function transport_link($url) {
8 return "<a href='$url'>$url</a>";
9}
10
cb5cd120
H
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
444d6866 20 $node['node_status']='linked';
cb5cd120
H
21 $node['node_name']="$transport:$id@$domain";
22 $node['url']=$transports[$transport]['get_node_url']($id);
bdd7d07d 23 $node['node_content']='Source: '.transport_link($node['url']).';<hr />'.$transports[$transport]['get_node_content']($id);
cb5cd120
H
24
25 return $node;
26}
e651ba44
H
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.704308 seconds and 4 git commands to generate.