Dotclear

source: plugins/pollsFactory/_prepend.php @ 2139

Revision 2139, 1.6 KB checked in by JcDenis, 13 years ago (diff)

pollsFactory 1.0:

  • Rewrited plugin
Line 
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
13if (!defined('DC_RC_PATH')){return;}
14
15# Shortcuts for advanced actions
16$__autoload['pollsFactory'] = dirname(__FILE__).'/inc/class.pollsfactory.php';
17# DB class
18$__autoload['postOption'] = dirname(__FILE__).'/inc/class.postoption.php';
19# Charts class
20$__autoload['pollsFactoryChart'] = dirname(__FILE__).'/inc/class.pollsfactory.chart.php';
21# Public poll page (url 'poll' is at plugin dotPoll...)
22$core->url->register('pollsFactoryPage','survey','^survey/(.+)$',array('publicUrlPollsFactory','pollPage'));
23# Public poll page preview
24$core->url->register('pollsFactoryPagePreview','surveypreview','^surveypreview/(.+)$',array('publicUrlPollsFactory','pollPagePreview'));
25# Url for graphic charts
26$core->url->register('pollsFactoryChart','surveychart','^surveychart/([^/]+/[^/]+).png$',array('publicUrlPollsFactory','pollChart'));
27# Post type
28$core->setPostType('pollsfactory','plugin.php?p=pollsFactory&tab=poll&id=%s',$core->url->getBase('pollsFactoryPage').'/%s');
29# Add pollsFactory reports on plugin activityReport
30if (defined('ACTIVITY_REPORT')) {
31     require_once dirname(__FILE__).'/inc/lib.pollsfactory.activityreport.php';
32}
33?>
Note: See TracBrowser for help on using the repository browser.

Sites map