3 +--------------------------------------------------------------------+
4 | CiviCRM Widget Creation Interface (WCI) Version 1.0 |
5 +--------------------------------------------------------------------+
6 | Copyright Zyxware Technologies (c) 2014 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM WCI. |
10 | CiviCRM WCI is free software; you can copy, modify, and distribute |
11 | it under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007. |
14 | CiviCRM WCI is distributed in the hope that it will be useful, |
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License along with this program; if not, contact Zyxware |
21 | Technologies at info[AT]zyxware[DOT]com. |
22 +--------------------------------------------------------------------+
25 function getContributionPageOptions() {
27 0 => ts('- select -'),
30 $result = civicrm_api3('contribution_page', 'get');
31 foreach ($result['values'] as $contribution_page) {
32 $options[$contribution_page['id']] = $contribution_page['title'];
38 function getExtensionRootPath() {
39 return 'http://' . $_SERVER['SERVER_NAME'] . str_replace($_SERVER['DOCUMENT_ROOT'], '', __DIR__
);
42 function getWciWidgetControllerPath() {
43 $widget_controller_path = getExtensionRootPath() . '/extern/embed.php';
45 return $widget_controller_path;
48 function getWciWidgetTemplatePath() {
49 $widget_tpl_path = __DIR__
. '/templates/CRM/Wci/Page';
51 return $widget_tpl_path;