1 | <?php |
---|
2 | # -- BEGIN LICENSE BLOCK --------------------------------------- |
---|
3 | # |
---|
4 | # This file is part of pings, a plugin for Dotclear 2. |
---|
5 | # |
---|
6 | # Copyright (c) Olivier Meunier & Association Dotclear |
---|
7 | # Licensed under the GPL version 2.0 license. |
---|
8 | # See LICENSE file or |
---|
9 | # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
---|
10 | # |
---|
11 | # -- END LICENSE BLOCK ----------------------------------------- |
---|
12 | if (!defined('DC_CONTEXT_ADMIN')) {return;} |
---|
13 | |
---|
14 | $version = $core->plugins->moduleInfo('pings', 'version'); |
---|
15 | if (version_compare($core->getVersion('pings'), $version, '>=')) { |
---|
16 | return; |
---|
17 | } |
---|
18 | |
---|
19 | // Default pings services |
---|
20 | $default_pings_uris = array( |
---|
21 | 'Ping-o-Matic!' => 'http://rpc.pingomatic.com/', |
---|
22 | 'Google Blog Search' => 'http://blogsearch.google.com/ping/RPC2' |
---|
23 | ); |
---|
24 | |
---|
25 | $core->blog->settings->addNamespace('pings'); |
---|
26 | $core->blog->settings->pings->put('pings_active', 1, 'boolean', 'Activate pings plugin', false, true); |
---|
27 | $core->blog->settings->pings->put('pings_auto', 0, 'boolean', 'Auto pings on 1st publication', false, true); |
---|
28 | $core->blog->settings->pings->put('pings_uris', $default_pings_uris, 'array', 'Pings services URIs', false, true); |
---|
29 | |
---|
30 | $core->setVersion('pings', $version); |
---|
31 | return true; |
---|