-
Notifications
You must be signed in to change notification settings - Fork 4
/
extension.driver.php
39 lines (34 loc) · 1.43 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
<?php
// Used multiselect to checkboxes extention as template
class extension_sym_markitup extends Extension {
public function about(){
return array(
'name' => 'Sym MarkItUp',
'version' => '1.01',
'release-date' => '2011-08-19',
'author' => array(
'name' => 'Jonathan Hughes',
'website' => 'http://www.onlinenotime.com',
'email' => 'jonathanbhughes@gmail.com'
),
'description' => 'Adds MarkItUp editor to all applicable textareas.'
);
}
public function getSubscribedDelegates(){
return array(
array(
'page' => '/backend/',
'delegate' => 'AdminPagePreGenerate',
'callback' => '__appendAssets'
)
);
}
public function __appendAssets($context){
if(isset(Administration::instance()->Page->_context['section_handle']) && in_array(Administration::instance()->Page->_context['page'], array('new', 'edit'))){
Administration::instance()->Page->addStylesheetToHead(URL . '/extensions/sym_markitup/assets/style.css', 'screen', 222);
Administration::instance()->Page->addScriptToHead(URL . '/extensions/sym_markitup/assets/jquery.markitup.js', 223);
Administration::instance()->Page->addScriptToHead(URL . '/extensions/sym_markitup/assets/init.js', 224);
}
}
}
?>