-
Notifications
You must be signed in to change notification settings - Fork 6
/
extension.driver.php
44 lines (36 loc) · 1.27 KB
/
extension.driver.php
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
34
35
36
37
38
39
40
41
42
43
44
<?php
class Extension_Uploadify extends Extension {
public static $params = null;
public function about() {
return array(
'name' => 'Uploadify',
'version' => '1.000',
'release-date' => '2009-02-26',
'author' => array(
'name' => 'Nick Dunn',
'website' => 'http://airlock.com/',
'email' => '[email protected]'
),
'description' => 'Add an upload progress bar to file uploads.'
);
}
public function getSubscribedDelegates() {
return array(
array(
'page' => '/backend/',
'delegate' => 'InitaliseAdminPageHead',
'callback' => 'initaliseAdminPageHead'
)
);
}
public function initaliseAdminPageHead($context) {
$page = $context['parent']->Page;
if ($page instanceof ContentPublish and ($page->_context['page'] == 'new' || $page->_context['page'] == 'edit')) {
$page->addStylesheetToHead(URL . '/extensions/uploadify/assets/uploadify.css', 'screen', 991);
$page->addScriptToHead(URL . '/extensions/uploadify/assets/jquery.uploadify.js', 992);
$page->addScriptToHead(URL . '/symphony/extension/uploadify/upload_fields/?section=' . $page->_context['section_handle'], 993);
$page->addScriptToHead(URL . '/extensions/uploadify/assets/apply.js', 994);
}
}
}
?>