1 | <?php |
---|
2 | // +-----------------------------------------------------------------------+ |
---|
3 | // | PiwiShack - a Piwigo Plugin | |
---|
4 | // | Copyright (C) 2009 MOREAU Julien - gotcha@piwigo.org | |
---|
5 | // +-----------------------------------------------------------------------+ |
---|
6 | // | This program is free software; you can redistribute it and/or modify | |
---|
7 | // | it under the terms of the GNU General Public License as published by | |
---|
8 | // | the Free Software Foundation | |
---|
9 | // | | |
---|
10 | // | This program is distributed in the hope that it will be useful, but | |
---|
11 | // | WITHOUT ANY WARRANTY; without even the implied warranty of | |
---|
12 | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
---|
13 | // | General Public License for more details. | |
---|
14 | // | | |
---|
15 | // | You should have received a copy of the GNU General Public License | |
---|
16 | // | along with this program; if not, write to the Free Software | |
---|
17 | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
---|
18 | // | USA. | |
---|
19 | // +-----------------------------------------------------------------------+ |
---|
20 | |
---|
21 | class PiwiShack |
---|
22 | { |
---|
23 | var $plugin_name, $plugin_path; |
---|
24 | var $opened, $to_close; |
---|
25 | |
---|
26 | function PiwiShack($plugin_name, $plugin_path) |
---|
27 | { |
---|
28 | // Args |
---|
29 | $this->plugin_name = $plugin_name; |
---|
30 | $this->plugin_path = $plugin_path; |
---|
31 | // handler |
---|
32 | $this->initialize_event_handler(); |
---|
33 | } |
---|
34 | |
---|
35 | function initialize_event_handler() |
---|
36 | { |
---|
37 | if (script_basename() != $this->plugin_name.'_controller') |
---|
38 | { |
---|
39 | add_event_handler('loc_end_page_header', array(&$this, 'loc_end_page_header')); |
---|
40 | add_event_handler('loc_end_index', array(&$this, 'loc_end_index')); |
---|
41 | add_event_handler('picture_pictures_data', array(&$this, 'picture_pictures_data')); |
---|
42 | } |
---|
43 | |
---|
44 | if (isset($_GET[$this->plugin_name])) |
---|
45 | { |
---|
46 | add_event_handler('loc_begin_page_header', array(&$this, 'loc_begin_page_header')); |
---|
47 | pwg_set_session_var($this->plugin_name, ($_GET[$this->plugin_name] === 'open')); |
---|
48 | } |
---|
49 | $this->opened = pwg_get_session_var($this->plugin_name, false); |
---|
50 | $this->to_close = (isset($_GET[$this->plugin_name]) and ($_GET[$this->plugin_name] === 'close')); |
---|
51 | } |
---|
52 | |
---|
53 | function get_thumb_post_on_a_website() |
---|
54 | { |
---|
55 | global $page, $lang_info; |
---|
56 | |
---|
57 | $list = array(); |
---|
58 | |
---|
59 | $S = ''; |
---|
60 | |
---|
61 | switch (script_basename()) |
---|
62 | { |
---|
63 | case 'index': |
---|
64 | { |
---|
65 | global $pictures; |
---|
66 | |
---|
67 | if (isset($pictures)) |
---|
68 | { |
---|
69 | $list = $pictures; |
---|
70 | } |
---|
71 | break; |
---|
72 | } |
---|
73 | case 'picture': |
---|
74 | { |
---|
75 | global $picture; |
---|
76 | |
---|
77 | if (isset($picture['current'])) |
---|
78 | { |
---|
79 | $list[] = $picture['current']; |
---|
80 | } |
---|
81 | break; |
---|
82 | } |
---|
83 | } |
---|
84 | |
---|
85 | if (empty($list) and !empty($page['items'])) |
---|
86 | { |
---|
87 | $query = ' |
---|
88 | SELECT * |
---|
89 | FROM '.IMAGES_TABLE.' |
---|
90 | WHERE id IN ('.implode(',', $page['items']).') |
---|
91 | ;'; |
---|
92 | |
---|
93 | $result = pwg_query($query); |
---|
94 | |
---|
95 | while ($row = mysql_fetch_assoc($result)) |
---|
96 | { |
---|
97 | $row['rank'] = $page['rank_of'][ $row['id'] ]; |
---|
98 | array_push($list, $row); |
---|
99 | } |
---|
100 | |
---|
101 | usort($list, 'rank_compare'); |
---|
102 | } |
---|
103 | if (!empty($list)) |
---|
104 | { |
---|
105 | |
---|
106 | set_make_full_url(); |
---|
107 | |
---|
108 | foreach ($list as $row) |
---|
109 | { |
---|
110 | /* |
---|
111 | Affichage de la miniature sur des sites. Cliquable. |
---|
112 | EXEMPLE |
---|
113 | <a href="{$ROOT_WAY}{$current.U_IMG}"><img src="{$ROOT_WAY}{$current.THUMB_SRC|@replace:'./':''}" /></a> |
---|
114 | */ |
---|
115 | $S .= '<a href=\"'. |
---|
116 | duplicate_picture_url( |
---|
117 | array( |
---|
118 | 'image_id' => $row['id'], |
---|
119 | 'image_file' => $row['file'], |
---|
120 | )).'\"><img src=\"'. |
---|
121 | str_replace('/./', '/', get_thumbnail_url($row)).'\" /></a>'; |
---|
122 | $S .= '\n\n'; |
---|
123 | } |
---|
124 | |
---|
125 | unset_make_full_url(); |
---|
126 | } |
---|
127 | |
---|
128 | return $S; |
---|
129 | } |
---|
130 | |
---|
131 | function get_thumb_post_on_a_forum() |
---|
132 | { |
---|
133 | global $page, $lang_info; |
---|
134 | |
---|
135 | $list = array(); |
---|
136 | |
---|
137 | $S = ''; |
---|
138 | |
---|
139 | switch (script_basename()) |
---|
140 | { |
---|
141 | case 'index': |
---|
142 | { |
---|
143 | global $pictures; |
---|
144 | |
---|
145 | if (isset($pictures)) |
---|
146 | { |
---|
147 | $list = $pictures; |
---|
148 | } |
---|
149 | break; |
---|
150 | } |
---|
151 | case 'picture': |
---|
152 | { |
---|
153 | global $picture; |
---|
154 | |
---|
155 | if (isset($picture['current'])) |
---|
156 | { |
---|
157 | $list[] = $picture['current']; |
---|
158 | } |
---|
159 | break; |
---|
160 | } |
---|
161 | } |
---|
162 | |
---|
163 | if (empty($list) and !empty($page['items'])) |
---|
164 | { |
---|
165 | $query = ' |
---|
166 | SELECT * |
---|
167 | FROM '.IMAGES_TABLE.' |
---|
168 | WHERE id IN ('.implode(',', $page['items']).') |
---|
169 | ;'; |
---|
170 | |
---|
171 | $result = pwg_query($query); |
---|
172 | |
---|
173 | while ($row = mysql_fetch_assoc($result)) |
---|
174 | { |
---|
175 | $row['rank'] = $page['rank_of'][ $row['id'] ]; |
---|
176 | array_push($list, $row); |
---|
177 | } |
---|
178 | |
---|
179 | usort($list, 'rank_compare'); |
---|
180 | } |
---|
181 | if (!empty($list)) |
---|
182 | { |
---|
183 | |
---|
184 | set_make_full_url(); |
---|
185 | |
---|
186 | foreach ($list as $row) |
---|
187 | { |
---|
188 | /* |
---|
189 | Affichage de la miniature sur des forums. Cliquable. |
---|
190 | EXEMPLE |
---|
191 | [url={$ROOT_WAY}{$current.U_IMG}][img]{$ROOT_WAY}{$current.THUMB_SRC|@replace:'./':''}[/img][/url] |
---|
192 | */ |
---|
193 | $S .= '[url='. |
---|
194 | duplicate_picture_url( |
---|
195 | array( |
---|
196 | 'image_id' => $row['id'], |
---|
197 | 'image_file' => $row['file'], |
---|
198 | )).'][img]'. |
---|
199 | str_replace('/./', '/', get_thumbnail_url($row)).'[/img][/url]'; |
---|
200 | $S .= '\n\n'; |
---|
201 | } |
---|
202 | |
---|
203 | unset_make_full_url(); |
---|
204 | } |
---|
205 | |
---|
206 | return $S; |
---|
207 | } |
---|
208 | |
---|
209 | function get_view_post_on_a_website() |
---|
210 | { |
---|
211 | global $page, $lang_info; |
---|
212 | |
---|
213 | $list = array(); |
---|
214 | |
---|
215 | $S = ''; |
---|
216 | |
---|
217 | switch (script_basename()) |
---|
218 | { |
---|
219 | case 'index': |
---|
220 | { |
---|
221 | global $pictures; |
---|
222 | |
---|
223 | if (isset($pictures)) |
---|
224 | { |
---|
225 | $list = $pictures; |
---|
226 | } |
---|
227 | break; |
---|
228 | } |
---|
229 | case 'picture': |
---|
230 | { |
---|
231 | global $picture; |
---|
232 | |
---|
233 | if (isset($picture['current'])) |
---|
234 | { |
---|
235 | $list[] = $picture['current']; |
---|
236 | } |
---|
237 | break; |
---|
238 | } |
---|
239 | } |
---|
240 | |
---|
241 | if (empty($list) and !empty($page['items'])) |
---|
242 | { |
---|
243 | $query = ' |
---|
244 | SELECT * |
---|
245 | FROM '.IMAGES_TABLE.' |
---|
246 | WHERE id IN ('.implode(',', $page['items']).') |
---|
247 | ;'; |
---|
248 | |
---|
249 | $result = pwg_query($query); |
---|
250 | |
---|
251 | while ($row = mysql_fetch_assoc($result)) |
---|
252 | { |
---|
253 | $row['rank'] = $page['rank_of'][ $row['id'] ]; |
---|
254 | array_push($list, $row); |
---|
255 | } |
---|
256 | |
---|
257 | usort($list, 'rank_compare'); |
---|
258 | } |
---|
259 | if (!empty($list)) |
---|
260 | { |
---|
261 | include_once(PHPWG_ROOT_PATH.'/include/functions_picture.inc.php'); |
---|
262 | set_make_full_url(); |
---|
263 | |
---|
264 | foreach ($list as $row) |
---|
265 | { |
---|
266 | /* |
---|
267 | Affichage de la vue normale sur des sites. Non cliquable. |
---|
268 | EXEMPLE |
---|
269 | <a href="{$ROOT_WAY}{$current.U_IMG}"><img src="{$ROOT_WAY}{$SRC_IMG|@replace:'./':''}" /></a> |
---|
270 | */ |
---|
271 | $S .= '<a href=\"'. |
---|
272 | duplicate_picture_url( |
---|
273 | array( |
---|
274 | 'image_id' => $row['id'], |
---|
275 | 'image_file' => $row['file'], |
---|
276 | )).'\"><img src=\"'.get_absolute_root_url(). |
---|
277 | str_replace('/./', '/', get_image_url($row)).'\" /></a>'; |
---|
278 | $S .= '\n\n'; |
---|
279 | } |
---|
280 | |
---|
281 | unset_make_full_url(); |
---|
282 | } |
---|
283 | |
---|
284 | return $S; |
---|
285 | } |
---|
286 | |
---|
287 | function get_view_direct_link() |
---|
288 | { |
---|
289 | global $page, $lang_info; |
---|
290 | |
---|
291 | $list = array(); |
---|
292 | |
---|
293 | $S = ''; |
---|
294 | |
---|
295 | switch (script_basename()) |
---|
296 | { |
---|
297 | case 'index': |
---|
298 | { |
---|
299 | global $pictures; |
---|
300 | |
---|
301 | if (isset($pictures)) |
---|
302 | { |
---|
303 | $list = $pictures; |
---|
304 | } |
---|
305 | break; |
---|
306 | } |
---|
307 | case 'picture': |
---|
308 | { |
---|
309 | global $picture; |
---|
310 | |
---|
311 | if (isset($picture['current'])) |
---|
312 | { |
---|
313 | $list[] = $picture['current']; |
---|
314 | } |
---|
315 | break; |
---|
316 | } |
---|
317 | } |
---|
318 | |
---|
319 | if (empty($list) and !empty($page['items'])) |
---|
320 | { |
---|
321 | $query = ' |
---|
322 | SELECT * |
---|
323 | FROM '.IMAGES_TABLE.' |
---|
324 | WHERE id IN ('.implode(',', $page['items']).') |
---|
325 | ;'; |
---|
326 | |
---|
327 | $result = pwg_query($query); |
---|
328 | |
---|
329 | while ($row = mysql_fetch_assoc($result)) |
---|
330 | { |
---|
331 | $row['rank'] = $page['rank_of'][ $row['id'] ]; |
---|
332 | array_push($list, $row); |
---|
333 | } |
---|
334 | |
---|
335 | usort($list, 'rank_compare'); |
---|
336 | } |
---|
337 | if (!empty($list)) |
---|
338 | { |
---|
339 | include_once(PHPWG_ROOT_PATH.'/include/functions_picture.inc.php'); |
---|
340 | set_make_full_url(); |
---|
341 | |
---|
342 | foreach ($list as $row) |
---|
343 | { |
---|
344 | /* |
---|
345 | Affichage du chemin en clair du lien vers la vue normale. |
---|
346 | EXEMPLE |
---|
347 | {$ROOT_WAY}{$SRC_IMG|@replace:'./':''} |
---|
348 | */ |
---|
349 | $S .= get_absolute_root_url(). |
---|
350 | str_replace('./', '', get_image_url($row)); |
---|
351 | $S .= '\n\n'; |
---|
352 | } |
---|
353 | |
---|
354 | unset_make_full_url(); |
---|
355 | } |
---|
356 | |
---|
357 | return $S; |
---|
358 | } |
---|
359 | |
---|
360 | function get_p_perso_writer_01() |
---|
361 | { |
---|
362 | global $page, $lang_info; |
---|
363 | |
---|
364 | $list = array(); |
---|
365 | |
---|
366 | $S = ''; |
---|
367 | |
---|
368 | switch (script_basename()) |
---|
369 | { |
---|
370 | case 'index': |
---|
371 | { |
---|
372 | global $pictures; |
---|
373 | |
---|
374 | if (isset($pictures)) |
---|
375 | { |
---|
376 | $list = $pictures; |
---|
377 | } |
---|
378 | break; |
---|
379 | } |
---|
380 | case 'picture': |
---|
381 | { |
---|
382 | global $picture; |
---|
383 | |
---|
384 | if (isset($picture['current'])) |
---|
385 | { |
---|
386 | $list[] = $picture['current']; |
---|
387 | } |
---|
388 | break; |
---|
389 | } |
---|
390 | } |
---|
391 | |
---|
392 | if (empty($list) and !empty($page['items'])) |
---|
393 | { |
---|
394 | $query = ' |
---|
395 | SELECT * |
---|
396 | FROM '.IMAGES_TABLE.' |
---|
397 | WHERE id IN ('.implode(',', $page['items']).') |
---|
398 | ;'; |
---|
399 | |
---|
400 | $result = pwg_query($query); |
---|
401 | |
---|
402 | while ($row = mysql_fetch_assoc($result)) |
---|
403 | { |
---|
404 | $row['rank'] = $page['rank_of'][ $row['id'] ]; |
---|
405 | array_push($list, $row); |
---|
406 | } |
---|
407 | |
---|
408 | usort($list, 'rank_compare'); |
---|
409 | } |
---|
410 | if (!empty($list)) |
---|
411 | { |
---|
412 | include_once(PHPWG_ROOT_PATH.'/include/functions_picture.inc.php'); |
---|
413 | $image_url = PHPWG_ROOT_PATH.'admin.php?page=picture_modify'; |
---|
414 | set_make_full_url(); |
---|
415 | |
---|
416 | foreach ($list as $row) |
---|
417 | { |
---|
418 | /* |
---|
419 | Affichage Personnalisé, 01. |
---|
420 | EXEMPLE |
---|
421 | <h6 style="text-align: center;"><a href="{$ROOT_WAY}{$current.U_IMG}" target="_blank"><img class="aligncenter" style="width: 100%; height: 100%;" src="{$ROOT_WAY}{$SRC_IMG|@replace:'./':''}" alt="{$ALT_IMG}" /></a><em><a href="{$ROOT_WAY}{$U_UP}"; target="_blank">Galerie complète à visiter</a></em></h6> |
---|
422 | */ |
---|
423 | |
---|
424 | $S .= '<h6 style=\"text-align: center;\"><a href=\"'. // Arguments à transmettre |
---|
425 | duplicate_picture_url( // Lien Piwigo vers la page de la vue normale |
---|
426 | array( |
---|
427 | 'image_id' => $row['id'], |
---|
428 | 'image_file' => $row['file'], |
---|
429 | )). |
---|
430 | '\"><img src=\"'. // Arguments à transmettre |
---|
431 | get_absolute_root_url().str_replace('./', '', get_image_url($row)). // Liens direct vers la vue normale |
---|
432 | '\" alt=\"'. // Arguments à transmettre |
---|
433 | $row['file']. // Noms du fichier |
---|
434 | '\" /></a><em><a href=\"'. // Arguments à transmettre |
---|
435 | $tpl_image = // Catégorie de l'image |
---|
436 | array( |
---|
437 | 'U_URL' => $image_url,). |
---|
438 | '\"; target=\"_blank\">Galerie complète à visiter</a></em></h6>'; // Arguments à transmettre |
---|
439 | $S .= '\n\n'; |
---|
440 | } |
---|
441 | |
---|
442 | unset_make_full_url(); |
---|
443 | } |
---|
444 | |
---|
445 | return $S; |
---|
446 | } |
---|
447 | |
---|
448 | function get_p_perso_writer_02() |
---|
449 | { |
---|
450 | global $page, $lang_info; |
---|
451 | |
---|
452 | $list = array(); |
---|
453 | |
---|
454 | $S = ''; |
---|
455 | |
---|
456 | switch (script_basename()) |
---|
457 | { |
---|
458 | case 'index': |
---|
459 | { |
---|
460 | global $pictures; |
---|
461 | |
---|
462 | if (isset($pictures)) |
---|
463 | { |
---|
464 | $list = $pictures; |
---|
465 | } |
---|
466 | break; |
---|
467 | } |
---|
468 | case 'picture': |
---|
469 | { |
---|
470 | global $picture; |
---|
471 | |
---|
472 | if (isset($picture['current'])) |
---|
473 | { |
---|
474 | $list[] = $picture['current']; |
---|
475 | } |
---|
476 | break; |
---|
477 | } |
---|
478 | } |
---|
479 | |
---|
480 | if (empty($list) and !empty($page['items'])) |
---|
481 | { |
---|
482 | $query = ' |
---|
483 | SELECT * |
---|
484 | FROM '.IMAGES_TABLE.' |
---|
485 | WHERE id IN ('.implode(',', $page['items']).') |
---|
486 | ;'; |
---|
487 | |
---|
488 | $result = pwg_query($query); |
---|
489 | |
---|
490 | while ($row = mysql_fetch_assoc($result)) |
---|
491 | { |
---|
492 | $row['rank'] = $page['rank_of'][ $row['id'] ]; |
---|
493 | array_push($list, $row); |
---|
494 | } |
---|
495 | |
---|
496 | usort($list, 'rank_compare'); |
---|
497 | } |
---|
498 | |
---|
499 | if (!empty($list)) |
---|
500 | { |
---|
501 | include_once(PHPWG_ROOT_PATH.'/include/functions_url.inc.php'); |
---|
502 | set_make_full_url(); |
---|
503 | |
---|
504 | foreach ($list as $row) |
---|
505 | { |
---|
506 | //'[(('.$picture['current']['thumbnail'].'))|'.$picture['current']['url'].'|'.$lang_info['code'].']'; |
---|
507 | $S .= '*** '.(!empty($row['name']) ? $row['name'] : $row['file']).' ***\n'; |
---|
508 | $S .= '[(('. |
---|
509 | str_replace('/./', '/', get_thumbnail_url($row)).'))|'. |
---|
510 | duplicate_picture_url( |
---|
511 | array( |
---|
512 | 'image_id' => $row['id'], |
---|
513 | 'image_file' => $row['file'], |
---|
514 | )).'|'. |
---|
515 | $lang_info['code'].']\n\n'; |
---|
516 | } |
---|
517 | |
---|
518 | unset_make_full_url(); |
---|
519 | |
---|
520 | } |
---|
521 | |
---|
522 | return $S; |
---|
523 | } |
---|
524 | |
---|
525 | // Fin de la définition des champs |
---|
526 | |
---|
527 | function loc_begin_page_header() |
---|
528 | { |
---|
529 | global $template; |
---|
530 | |
---|
531 | $redirect_url = ( script_basename()=='picture' |
---|
532 | ? duplicate_picture_url(array(), array($this->plugin_name)) |
---|
533 | : duplicate_index_url(array(), array($this->plugin_name)) |
---|
534 | ); |
---|
535 | |
---|
536 | $template->assign( |
---|
537 | array( |
---|
538 | 'page_refresh' => array( |
---|
539 | 'TIME' => 1, |
---|
540 | 'U_REFRESH' => $redirect_url |
---|
541 | ) |
---|
542 | )); |
---|
543 | } |
---|
544 | |
---|
545 | function loc_end_page_header() |
---|
546 | { |
---|
547 | global $template; |
---|
548 | |
---|
549 | if ($this->opened or $this->to_close) |
---|
550 | { |
---|
551 | $plugin_root_url = get_root_url().'plugins/'.$this->plugin_name.'/'; |
---|
552 | |
---|
553 | $js = ' |
---|
554 | <script type="text/javascript"> |
---|
555 | var theController = window.open("", "'.$this->plugin_name.'_controller", "alwaysRaised=yes,dependent=yes,toolbar=no,height=843,width=1044,menubar=no,resizable=yes,scrollbars=yes,status=no");'; |
---|
556 | |
---|
557 | if ($this->to_close) |
---|
558 | { |
---|
559 | $js .= ' |
---|
560 | theController.close();'; |
---|
561 | } |
---|
562 | else |
---|
563 | { |
---|
564 | $js .= ' |
---|
565 | if (theController.location.toString()=="about:blank" || !theController.location.toString().match(/^(https?.*\/)'.$this->plugin_name.'_controller\.php(\?.+)?$/)) |
---|
566 | { |
---|
567 | theController.location = "'.$plugin_root_url.$this->plugin_name.'_controller.php"; |
---|
568 | } |
---|
569 | else |
---|
570 | { |
---|
571 | theController.focus(); |
---|
572 | } |
---|
573 | theController.document.getElementsByName("thumb_Post_on_a_website")[0].value = "'.$this->get_thumb_post_on_a_website().'"; |
---|
574 | theController.document.getElementsByName("thumb_Post_on_a_forum")[0].value = "'.$this->get_thumb_post_on_a_forum().'"; |
---|
575 | theController.document.getElementsByName("view_Post_on_a_website")[0].value = "'.$this->get_view_post_on_a_website().'"; |
---|
576 | theController.document.getElementsByName("view_Direct_link")[0].value = "'.$this->get_view_direct_link().'"; |
---|
577 | theController.document.getElementsByName("p_Perso_writer_01")[0].value = "'.$this->get_p_perso_writer_01().'"; |
---|
578 | theController.document.getElementsByName("p_Perso_writer_02")[0].value = "'.$this->get_p_perso_writer_02().'";'; |
---|
579 | } |
---|
580 | $js .= ' |
---|
581 | </script>'; |
---|
582 | |
---|
583 | $template->append('head_elements', $js); |
---|
584 | } |
---|
585 | } |
---|
586 | |
---|
587 | function get_link_icon($main_link) |
---|
588 | { |
---|
589 | global $page; |
---|
590 | |
---|
591 | if (empty($page['items'])) |
---|
592 | { |
---|
593 | return; |
---|
594 | } |
---|
595 | |
---|
596 | $this->loading_lang(); |
---|
597 | |
---|
598 | if ($this->opened) |
---|
599 | { |
---|
600 | $suffix_url = 'close'; |
---|
601 | $link_title = l10n('close_window_piwishack'); |
---|
602 | } |
---|
603 | else |
---|
604 | { |
---|
605 | $suffix_url = 'open'; |
---|
606 | $link_title = l10n('open_window_piwishack'); |
---|
607 | } |
---|
608 | |
---|
609 | $link_url = add_url_params($main_link, array($this->plugin_name => $suffix_url)); |
---|
610 | if (!empty($link_url)) |
---|
611 | { |
---|
612 | $link_url = |
---|
613 | '<a href="'.$link_url.'" title="'.$link_title.'" rel="nofollow"><img src="'.get_root_url().'plugins/'.$this->plugin_name.'/icon/controller_'.$suffix_url.'.png" class="button" alt="PiwiShack controller"></a>'; |
---|
614 | } |
---|
615 | |
---|
616 | return $link_url; |
---|
617 | } |
---|
618 | |
---|
619 | function loc_end_index() |
---|
620 | { |
---|
621 | global $template; |
---|
622 | |
---|
623 | $link_url = $this->get_link_icon(duplicate_index_url()); |
---|
624 | if (!empty($link_url)) |
---|
625 | { |
---|
626 | $template->concat( |
---|
627 | 'PLUGIN_INDEX_ACTIONS', |
---|
628 | '<li>'.$link_url.'</li>'); |
---|
629 | } |
---|
630 | } |
---|
631 | |
---|
632 | function picture_pictures_data($pictures) |
---|
633 | { |
---|
634 | global $template; |
---|
635 | |
---|
636 | $link_url = $this->get_link_icon(duplicate_picture_url()); |
---|
637 | if (!empty($link_url)) |
---|
638 | { |
---|
639 | $template->concat( |
---|
640 | 'PLUGIN_PICTURE_ACTIONS', |
---|
641 | $link_url); |
---|
642 | } |
---|
643 | |
---|
644 | return $pictures; |
---|
645 | } |
---|
646 | |
---|
647 | function loading_lang() |
---|
648 | { |
---|
649 | load_language('plugin.lang', $this->plugin_path); |
---|
650 | } |
---|
651 | } |
---|
652 | |
---|
653 | ?> |
---|