-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathiframecode.php
More file actions
33 lines (26 loc) · 1.1 KB
/
iframecode.php
File metadata and controls
33 lines (26 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
class IFrameCodeFormat implements Format {
public $title = 'IFRAME';
public $mime = 'text/html';
public $can_attach = false;
public function export( $data ) {
global $scodeid, $base_path;
$s = isset($scodeid) ?
'<iframe src="'.$base_path.'/'.$scodeid.'?format=iframe&direct' :
'<iframe src="'.$base_path.'/?format=iframe&direct&bbcode='.array_to_mapbbcode($data);
$f = '" width="600" height="400" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe>';
$iframe = $s.$f;
$html =
'<!DOCTYPE html><html><head><title>IFRAME export</title><meta charset="utf-8"></head><body>'.
'<p>If you would like to link to this route, just copy the code and paste it into your source code:</p>'.
'<p><textarea readonly onclick="this.focus();this.select();" style="width: 100%;">'.htmlspecialchars($iframe).'</textarea></p>'.
'</body></html>';
return $html;
}
public function test( $header ) {
return false;
}
public function import( $file ) {
}
}
$formats['iframecode'] = new IFrameCodeFormat();