1 | <?php |
---|
2 | # -- BEGIN LICENSE BLOCK ---------------------------------- |
---|
3 | # This file is part of pollsFactory, a plugin for Dotclear 2. |
---|
4 | # |
---|
5 | # Copyright (c) 2009-2010 JC Denis and contributors |
---|
6 | # jcdenis@gdwd.com |
---|
7 | # |
---|
8 | # Licensed under the GPL version 2.0 license. |
---|
9 | # A copy of this license is available in LICENSE file or at |
---|
10 | # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
---|
11 | # -- END LICENSE BLOCK ------------------------------------ |
---|
12 | |
---|
13 | if (!defined('DC_RC_PATH')){return;} |
---|
14 | |
---|
15 | global $core, $_autoload; |
---|
16 | $core->blog->settings->addNamespace('pollsFactory'); |
---|
17 | |
---|
18 | # Shortcuts for advanced actions |
---|
19 | $__autoload['pollsFactory'] = dirname(__FILE__).'/inc/class.pollsfactory.php'; |
---|
20 | # DB class |
---|
21 | $__autoload['postOption'] = dirname(__FILE__).'/inc/class.postoption.php'; |
---|
22 | # Charts class |
---|
23 | $__autoload['pollsFactoryChart'] = dirname(__FILE__).'/inc/class.pollsfactory.chart.php'; |
---|
24 | # Public poll page (url 'poll' is at plugin dotPoll...) |
---|
25 | $core->url->register('pollsFactoryPage','survey','^survey/(.+)$',array('publicUrlPollsFactory','pollPage')); |
---|
26 | # Public poll page preview |
---|
27 | $core->url->register('pollsFactoryPagePreview','surveypreview','^surveypreview/(.+)$',array('publicUrlPollsFactory','pollPagePreview')); |
---|
28 | # Url for graphic charts |
---|
29 | $core->url->register('pollsFactoryChart','surveychart','^surveychart/([^/]+/[^/]+).png$',array('publicUrlPollsFactory','pollChart')); |
---|
30 | # Post type |
---|
31 | $core->setPostType('pollsfactory','plugin.php?p=pollsFactory&tab=poll&id=%s',$core->url->getBase('pollsFactoryPage').'/%s'); |
---|
32 | # Add pollsFactory reports on plugin activityReport |
---|
33 | if (defined('ACTIVITY_REPORT')) |
---|
34 | { |
---|
35 | require_once dirname(__FILE__).'/inc/lib.pollsfactory.activityreport.php'; |
---|
36 | } |
---|
37 | ?> |
---|