source: extensions/reply_to/main.inc.php @ 11252

Last change on this file since 11252 was 11252, checked in by mistic100, 13 years ago

first commit, only compatible with Piwigo 2.2.3 and last version of Comments on Albums

File size: 1.2 KB
Line 
1<?php 
2/*
3Plugin Name: Reply To
4Version: auto
5Description: This plugin allows you to add Twitter-like reply links to comments.
6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=
7Author: Mistic
8Author URI: http://www.strangeplanet.fr
9*/
10
11if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
12
13global $page;
14
15define('REPLYTO_DIR' , basename(dirname(__FILE__)));
16define('REPLYTO_PATH' , PHPWG_PLUGINS_PATH . REPLYTO_DIR . '/');
17
18include_once(REPLYTO_PATH.'reply_to.inc.php');
19load_language('plugin.lang', REPLYTO_PATH);
20
21// add link and parse on picture page
22if (script_basename() == 'picture')
23{
24  add_event_handler('loc_begin_picture', 'replyto_add_link');
25}
26// parse on comments page (picture section)
27else if (script_basename() == 'comments' AND !isset($_GET['display_mode']))
28{
29  add_event_handler('render_comment_content', 'replyto_parse_picture', 10);
30}
31// add link and parse on album page (compatibility with Comment on Albums)
32else if (script_basename() == 'index')
33{
34  add_event_handler('loc_begin_index', 'replyto_add_link');
35}
36// parse on comments page (album section)
37else if (script_basename() == 'comments' AND $_GET['display_mode'] == 'albums')
38{
39  add_event_handler('render_comment_content', 'replyto_parse_album', 10);
40}
41   
42?>
Note: See TracBrowser for help on using the repository browser.