Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | // Add a prefilter |
---|
4 | add_event_handler('loc_begin_element_set_unit', 'set_prefilter_batch_single', 55 ); |
---|
5 | |
---|
6 | // Change the variables used by the function that changes the template |
---|
7 | //add_event_handler('loc_begin_admin', 'copyrights_add_bsm_vars_to_template'); |
---|
8 | |
---|
9 | function set_prefilter_batch_single() |
---|
10 | { |
---|
11 | global $template; |
---|
12 | $template->set_prefilter('batch_manager_unit', 'copyrights_batch_single'); |
---|
13 | } |
---|
14 | |
---|
15 | function copyrights_batch_single($content, &$smarty) |
---|
16 | { |
---|
17 | $search = '#<tr id="datecreate">#'; |
---|
18 | |
---|
19 | $replacement = ' |
---|
20 | <tr id="Copyrights_name"> |
---|
21 | <tr id="datecreate">'; |
---|
22 | |
---|
23 | return preg_replace($search, $replacement, $content); |
---|
24 | } |
---|
25 | |
---|
26 | function copyrights_add_bsm_vars_to_template() |
---|
27 | { |
---|
28 | //global $page, $template, $prefixeTable; |
---|
29 | |
---|
30 | // Show block only on the photo page |
---|
31 | //if ( !empty($page['image_id']) ) |
---|
32 | //{ |
---|
33 | // Sending data to the template |
---|
34 | //$template->assign( |
---|
35 | //array ( |
---|
36 | //'CR_TEST' => 'TEST' |
---|
37 | // )); |
---|
38 | //} |
---|
39 | } |
---|
40 | |
---|
41 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.