1 | <?php |
---|
2 | |
---|
3 | // Add a prefilter |
---|
4 | add_event_handler('loc_end_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 = "#<td><strong>{'Creation date'#"; // Not ideal, but ok for now :) |
---|
18 | |
---|
19 | // We use the <tr> from the Creation date, and give them a new <tr> |
---|
20 | $replacement = '<td><strong>DWO TESTJE</strong></td> |
---|
21 | <td> |
---|
22 | DWO TESTJE |
---|
23 | </td> |
---|
24 | </tr> |
---|
25 | |
---|
26 | <tr> |
---|
27 | <td><strong>{\'Creation date\''; |
---|
28 | |
---|
29 | return preg_replace($search, $replacement, $content); |
---|
30 | |
---|
31 | // Dit is een interresant testje - deze functie word dus een aantal keren (3) aangeroepen, |
---|
32 | // en pas de laatste keer is bevat $content meer dan een aantal enters... |
---|
33 | //return $content.'<div id="dwo_test" style="display: none;">'.$content.'</div>'; |
---|
34 | } |
---|
35 | |
---|
36 | function copyrights_add_bsm_vars_to_template() |
---|
37 | { |
---|
38 | //global $page, $template, $prefixeTable; |
---|
39 | |
---|
40 | // Show block only on the photo page |
---|
41 | //if ( !empty($page['image_id']) ) |
---|
42 | //{ |
---|
43 | // Sending data to the template |
---|
44 | //$template->assign( |
---|
45 | //array ( |
---|
46 | //'CR_TEST' => 'TEST' |
---|
47 | // )); |
---|
48 | //} |
---|
49 | } |
---|
50 | |
---|
51 | ?> |
---|