Jelajahi Sumber

#36 - Contact module.

AntonLV 12 tahun lalu
induk
melakukan
0d11e81d73

+ 63 - 0
modules/boonex/contact/classes/BxContactConfig.php

@@ -0,0 +1,63 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ * 
+ * @defgroup    Contact Contact
+ * @ingroup     DolphinModules
+ *
+ * @{
+ */
+
+bx_import('BxDolPrivacy');
+bx_import('BxDolModuleConfig');
+
+class BxContactConfig extends BxDolModuleConfig
+{
+    protected $_oDb;
+
+    protected $_sAlertSystemName;
+
+	protected $_sEmail;
+
+    /**
+     * Constructor
+     */
+    public function __construct($aModule)
+    {
+        parent::BxDolModuleConfig($aModule);
+
+		$this->_sAlertSystemName = $this->_sName;
+
+        $this->_sEmail = ''; 
+    }
+
+    public function init(&$oDb)
+    {
+        $this->_oDb = &$oDb;
+
+        $this->_sEmail = $this->_oDb->getParam('bx_contact_email');
+        if(empty($this->_sEmail))
+        	$this->_sEmail = $this->_oDb->getParam('site_email');
+    }
+
+	public function getSystemName($sType)
+    {
+    	$sResult = '';
+
+    	switch($sType) {
+    		case 'alert':
+				$sResult = $this->_sAlertSystemName;
+				break;
+    	}
+
+        return $sResult;
+    }
+
+    public function getEmail()
+    {
+    	return $this->_sEmail;
+    }
+}
+
+/** @} */ 

+ 29 - 0
modules/boonex/contact/classes/BxContactDb.php

@@ -0,0 +1,29 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ * 
+ * @defgroup    Contact Contact
+ * @ingroup     DolphinModules
+ *
+ * @{
+ */
+
+bx_import('BxDolModuleDb');
+
+class BxContactDb extends BxDolModuleDb
+{
+    var $_oConfig;
+
+    /*
+     * Constructor.
+     */
+    function __construct(&$oConfig)
+    {
+        parent::__construct($oConfig);
+
+        $this->_oConfig = $oConfig;
+    }
+}
+
+/** @} */ 

+ 123 - 0
modules/boonex/contact/classes/BxContactModule.php

@@ -0,0 +1,123 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ * 
+ * @defgroup    Contact Contact
+ * @ingroup     DolphinModules
+ *
+ * @{
+ */
+
+bx_import('BxDolModule');
+
+class BxContactModule extends BxDolModule
+{
+    /**
+     * Constructor
+     */
+    function __construct($aModule)
+    {
+        parent::BxDolModule($aModule);
+
+        $this->_oConfig->init($this->_oDb);
+    }
+
+	/**
+     * SERVICE METHODS
+     */
+	public function serviceGetBlockForm()
+	{
+		$aDefaultFields = array('name', 'email', 'subject', 'body', 'do_submit');
+
+		$mixedAllowed = $this->isAllowedContact();
+        if($mixedAllowed !== true)
+			return array(
+				'content' => MsgBox($mixedAllowed)
+			);
+
+		$sResult = '';
+
+        bx_import('BxDolForm');
+        $oForm = BxDolForm::getObjectInstance('mod_cnt_contact', 'mod_cnt_contact_send');
+
+        $oForm->initChecker();
+	    if($oForm->isSubmittedAndValid()) {
+	    	$iId = $oForm->insert(array(
+	    		'uri' => $oForm->generateUri(),
+	    		'date' => time()
+	    	));
+
+	    	if($iId !== false) {
+	    		$sCustomFields = '';
+		    	$aCustomFields = array();
+		        foreach($oForm->aInputs as $aInput) {
+					if(in_array($aInput['name'], $aDefaultFields))
+						continue;
+
+					$aCustomFields[$aInput['name']] = bx_process_output($oForm->getCleanValue($aInput['name']));
+					$sCustomFields .= $aInput['caption'] . ': ' . $aCustomFields[$aInput['name']] . '<br />';
+		        }
+
+		        $aTemplateKeys = array(
+		        	'SenderName' => bx_process_output($oForm->getCleanValue('name')),
+		        	'SenderEmail' => bx_process_output($oForm->getCleanValue('email')),
+		        	'MessageSubject' => bx_process_output($oForm->getCleanValue('subject')),
+		        	'MessageBody' => bx_process_output($oForm->getCleanValue('body'), BX_DATA_TEXT_MULTILINE),
+		        	'CustomFields' => $sCustomFields,
+		        );
+		        $aTemplateKeys = array_merge($aTemplateKeys, $aCustomFields);
+
+		        bx_import('BxDolEmailTemplates');
+		        $aMessage = BxDolEmailTemplates::getInstance()->parseTemplate('bx_contact_contact_form_message', $aTemplateKeys);
+
+		        $sResult = '';
+		        $sRecipientEmail = $this->_oConfig->getEmail();
+		        if(sendMail($sRecipientEmail, $aMessage['Subject'], $aMessage['Body'], 0, array(), BX_EMAIL_SYSTEM)) {
+					$this->onContact();
+
+		        	$sResult = '_ADM_PROFILE_SEND_MSG';
+		        }
+		        else 
+		        	$sResult = '_Email sent failed';
+
+		        $sResult = MsgBox(_t($sResult));
+	    	}
+	    }
+
+	    return array(
+	    	'content' => $sResult . $oForm->getCode()
+	    );
+	}
+
+    /*
+     * COMMON METHODS
+     */
+	public function getUserId()
+    {
+        return isLogged() ? bx_get_logged_profile_id() : 0;
+    }
+
+	protected function onContact()
+    {
+    	$iUserId = $this->getUserId();
+
+		$this->isAllowedContact(true);
+
+    	//--- Event -> Contact for Alerts Engine ---//
+		bx_import('BxDolAlerts');
+        $oAlert = new BxDolAlerts($this->_oConfig->getSystemName('alert'), 'contact', 0, $iUserId);
+        $oAlert->alert();
+        //--- Event -> Contact for Alerts Engine ---//
+    }
+
+	protected function isAllowedContact($bPerform = false)
+    {
+    	$iUserId = $this->getUserId();
+
+		$aCheckResult = checkActionModule($iUserId, 'contact', $this->getName(), $bPerform);
+        return $aCheckResult[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED ? $aCheckResult[CHECK_ACTION_MESSAGE] : true;
+    }
+}
+
+/** @} */ 

+ 22 - 0
modules/boonex/contact/classes/BxContactTemplate.php

@@ -0,0 +1,22 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ * 
+ * @defgroup    Contact Contact
+ * @ingroup     DolphinModules
+ *
+ * @{
+ */
+
+bx_import('BxDolModuleTemplate');
+
+class BxContactTemplate extends BxDolModuleTemplate
+{
+    function __construct(&$oConfig, &$oDb)
+    {
+        parent::BxDolModuleTemplate($oConfig, $oDb);
+    }
+}
+
+/** @} */ 

+ 86 - 0
modules/boonex/contact/install/config.php

@@ -0,0 +1,86 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ * 
+ * @defgroup    Contact Contact
+ * @ingroup     DolphinModules
+ *
+ * @{
+ */
+
+$aConfig = array(
+    /**
+     * Main Section.
+     */
+	'type' => BX_DOL_MODULE_TYPE_MODULE,
+	'name' => 'bx_contact',
+    'title' => 'Contact',
+	'note' => 'Contact module.',
+    'version' => '1.0.0',
+    'vendor' => 'BoonEx',
+    'update_url' => '',
+
+    'compatible_with' => array(
+        '8.0.x'
+    ),
+
+    /**
+     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
+     */
+    'home_dir' => 'boonex/contact/',
+    'home_uri' => 'contact',
+
+    'db_prefix' => 'bx_contact_',
+    'class_prefix' => 'BxContact',
+
+    /**
+     * Installation/Uninstallation Section.
+     */
+    'install' => array(
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'uninstall' => array (
+        'execute_sql' => 1,
+        'update_languages' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'enable' => array(
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+    'disable' => array (
+        'execute_sql' => 1,
+        'clear_db_cache' => 1,
+    ),
+
+    /**
+     * Dependencies Section
+     */
+    'dependencies' => array(),
+
+    /**
+     * Category for language keys.
+     */
+    'language_category' => 'Contact',
+
+    /**
+     * Permissions Section
+     */
+    'install_permissions' => array(),
+    'uninstall_permissions' => array(),
+
+    /**
+     * Introduction and Conclusion Section.
+     */
+    'install_info' => array(
+        'introduction' => 'inst_intro.html',
+        'conclusion' => 'inst_concl.html'
+    ),
+    'uninstall_info' => array(
+        'introduction' => 'uninst_intro.html',
+        'conclusion' => 'uninst_concl.html'
+    )
+);

+ 21 - 0
modules/boonex/contact/install/installer.php

@@ -0,0 +1,21 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ * 
+ * @defgroup    Contact Contact
+ * @ingroup     DolphinModules
+ *
+ * @{
+ */
+
+bx_import('BxDolStudioInstaller');
+
+class BxContactInstaller extends BxDolStudioInstaller
+{
+	function __construct($aConfig) {
+        parent::__construct($aConfig);
+    }
+}
+
+/** @} */ 

+ 43 - 0
modules/boonex/contact/install/langs/en.xml

@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources name="en" flag="gb" title="English">
+
+	<string name="_bx_contact"><![CDATA[Contact]]></string>
+
+	<string name="_bx_contact_form_contact"><![CDATA[Contact]]></string>
+	<string name="_bx_contact_form_contact_display_send"><![CDATA[Send]]></string>
+	<string name="_bx_contact_form_contact_input_sys_name"><![CDATA[Your Name]]></string>
+	<string name="_bx_contact_form_contact_input_name"><![CDATA[Your Name]]></string>
+	<string name="_bx_contact_form_contact_input_name_err"><![CDATA[You need to type your name here.]]></string>
+	<string name="_bx_contact_form_contact_input_sys_email"><![CDATA[Your email]]></string>
+	<string name="_bx_contact_form_contact_input_email"><![CDATA[Your email]]></string>
+	<string name="_bx_contact_form_contact_input_email_err"><![CDATA[You need to type the correct email here.]]></string>
+	<string name="_bx_contact_form_contact_input_sys_subject"><![CDATA[Message subject]]></string>
+	<string name="_bx_contact_form_contact_input_subject"><![CDATA[Message subject]]></string>
+	<string name="_bx_contact_form_contact_input_subject_err"><![CDATA[You need to type message's subject here.]]></string>
+	<string name="_bx_contact_form_contact_input_sys_body"><![CDATA[Message text]]></string>
+	<string name="_bx_contact_form_contact_input_body"><![CDATA[Message text]]></string>
+	<string name="_bx_contact_form_contact_input_body_err"><![CDATA[You need to type message's body here.]]></string>
+	<string name="_bx_contact_form_contact_input_sys_do_submit"><![CDATA[Send]]></string>
+	<string name="_bx_contact_form_contact_input_do_submit"><![CDATA[Send]]></string>
+
+	<string name="_bx_contact_page_title_sys_contact"><![CDATA[Contact]]></string>
+	<string name="_bx_contact_page_title_contact"><![CDATA[Contact]]></string>
+	<string name="_bx_contact_page_block_title_form"><![CDATA[Contact]]></string>
+
+    <string name="_bx_contact_menu_item_title_system_contact"><![CDATA[Contact]]></string>
+    <string name="_bx_contact_menu_item_title_contact"><![CDATA[Contact]]></string>
+
+	<string name="_bx_contact_option_email"><![CDATA[Email address to receive messages (if empty, site's email will be used)]]></string>
+
+	<string name="_bx_contact_acl_action_contact"><![CDATA[Contact]]></string>
+
+	<string name="_bx_contact_et_contact_form_message"><![CDATA[Contact form message.]]></string>
+	<string name="_bx_contact_et_contact_form_message_subject"><![CDATA[Contact form message.]]></string>
+	<string name="_bx_contact_et_contact_form_message_body"><![CDATA[<bx_include_auto:_email_header.html />
+<p><b>Dear Administrator</b>,</p>
+<p>You were contacted by <u>{SenderName}</u> with email <u>{SenderEmail}</u>:</p>
+<hr />
+<p><b>{MessageSubject}</b></p>
+<p>{MessageBody}</p>
+<bx_include_auto:_email_footer.html />]]></string>
+</resources>

+ 29 - 0
modules/boonex/contact/install/sql/disable.sql

@@ -0,0 +1,29 @@
+SET @sName = 'bx_contact';
+
+
+-- PAGES & BLOCKS
+DELETE FROM `sys_objects_page` WHERE `module` = @sName;
+DELETE FROM `sys_pages_blocks` WHERE `module` = @sName;
+
+
+-- MENU
+DELETE FROM `sys_objects_menu` WHERE `module` = @sName;
+DELETE FROM `sys_menu_sets` WHERE `module` = @sName;
+DELETE FROM `sys_menu_items` WHERE `module` = @sName;
+
+
+-- SETTINGS
+SET @iTypeId = (SELECT `ID` FROM `sys_options_types` WHERE `name` = @sName LIMIT 1);
+SET @iCategId = (SELECT `ID` FROM `sys_options_categories` WHERE `type_id` = @iTypeId LIMIT 1);
+DELETE FROM `sys_options` WHERE `category_id` = @iCategId;
+DELETE FROM `sys_options_categories` WHERE `type_id` = @iTypeId;
+DELETE FROM `sys_options_types` WHERE `id` = @iTypeId;
+
+
+-- ACL
+DELETE `sys_acl_actions`, `sys_acl_matrix` FROM `sys_acl_actions`, `sys_acl_matrix` WHERE `sys_acl_matrix`.`IDAction` = `sys_acl_actions`.`ID` AND `sys_acl_actions`.`Module` = @sName;
+DELETE FROM `sys_acl_actions` WHERE `Module` = @sName;
+
+
+-- EMAIL TEMPLATES
+DELETE FROM `sys_email_templates` WHERE `Module` = @sName;

+ 61 - 0
modules/boonex/contact/install/sql/enable.sql

@@ -0,0 +1,61 @@
+SET @sName = 'bx_contact';
+
+
+-- PAGES & BLOCKS
+INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
+('bx_contact_contact', '_bx_contact_page_title_sys_contact', '_bx_contact_page_title_contact', @sName, 5, 2147483647, 1, 'contact', 'page.php?i=contact', '', '', '', 0, 1, 0, '', '');
+
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES
+('bx_contact_contact', 1, @sName, '_bx_contact_page_block_title_form', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:10:"bx_contact";s:6:"method";s:14:"get_block_form";}', 0, 0, 1);
+
+
+-- MENU: FOOTER
+SET @iMIOrder = (SELECT MAX(`order`) FROM `sys_menu_items` WHERE `set_name`='sys_footer' LIMIT 1);
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES
+('sys_footer', @sName, 'contact', '_bx_contact_menu_item_title_system_contact', '_bx_contact_menu_item_title_contact', 'page.php?i=contact', '', '', 'envelope-o', '', 2147483646, 1, 1, @iMIOrder + 1);
+
+
+-- SETTINGS
+SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
+INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES 
+('modules', @sName, '_bx_contact', 'bx_contact@modules/boonex/contact/|std-mi.png', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1));
+SET @iTypeId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
+VALUES (@iTypeId, @sName, '_bx_contact', 1);
+SET @iCategId = LAST_INSERT_ID();
+
+INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `extra`, `order`) VALUES
+('bx_contact_email', '', @iCategId, '_bx_contact_option_email', 'digit', '', '', '', 1);
+
+
+-- ACL
+INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
+(@sName, 'contact', NULL, '_bx_contact_acl_action_contact', '', 1, 1);
+SET @iIdActionContact = LAST_INSERT_ID();
+
+SET @iUnauthenticated = 1;
+SET @iStandard = 2;
+SET @iUnconfirmed = 3;
+SET @iPending = 4;
+SET @iSuspended = 5;
+SET @iModerator = 6;
+SET @iAdministrator = 7;
+SET @iPremium = 8;
+
+INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
+
+-- contact
+(@iUnauthenticated, @iIdActionContact),
+(@iStandard, @iIdActionContact),
+(@iUnconfirmed, @iIdActionContact),
+(@iPending, @iIdActionContact),
+(@iSuspended, @iIdActionContact),
+(@iModerator, @iIdActionContact),
+(@iAdministrator, @iIdActionContact),
+(@iPremium, @iIdActionContact);
+
+
+-- EMAIL TEMPLATES
+INSERT INTO `sys_email_templates` (`Module`, `NameSystem`, `Name`, `Subject`, `Body`) VALUES 
+(@sName, '_bx_contact_et_contact_form_message', 'bx_contact_contact_form_message', '_bx_contact_et_contact_form_message_subject', '_bx_contact_et_contact_form_message_body');

+ 49 - 0
modules/boonex/contact/install/sql/install.sql

@@ -0,0 +1,49 @@
+SET @sName = 'bx_contact';
+
+
+-- TABLES
+CREATE TABLE IF NOT EXISTS `bx_contact_entries` (
+  `id` int(11) NOT NULL auto_increment,
+  `name` varchar(255) collate utf8_unicode_ci NOT NULL,
+  `email` varchar(128) collate utf8_unicode_ci NOT NULL,
+  `subject` varchar(128) collate utf8_unicode_ci NOT NULL,
+  `body` text collate utf8_unicode_ci NOT NULL,
+  `uri` varchar(255) collate utf8_unicode_ci NOT NULL,
+  `date` int(11) NOT NULL default '0',
+  PRIMARY KEY  (`id`)
+);
+
+
+-- FORMS
+INSERT INTO `sys_objects_form` (`object`, `module`, `title`, `action`, `form_attrs`, `submit_name`, `table`, `key`, `uri`, `uri_title`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
+('mod_cnt_contact', @sName, '_bx_contact_form_contact', 'page.php?i=contact', '', 'do_submit', 'bx_contact_entries', 'id', 'uri', 'subject', '', 0, 1, '', '');
+
+INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`, `view_mode`) VALUES
+('mod_cnt_contact_send', @sName, 'mod_cnt_contact', '_bx_contact_form_contact_display_send', 0);
+
+INSERT INTO `sys_form_inputs` (`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES
+('mod_cnt_contact', @sName, 'name', '', '', 0, 'text', '_bx_contact_form_contact_input_sys_name', '_bx_contact_form_contact_input_name', '', 1, 0, 0, '', '', '', 'Length', 'a:2:{s:3:"min";i:1;s:3:"max";i:150;}', '_bx_contact_form_contact_input_name_err', 'Xss', '', 0, 0),
+('mod_cnt_contact', @sName, 'email', '', '', 0, 'text', '_bx_contact_form_contact_input_sys_email', '_bx_contact_form_contact_input_email', '', 1, 0, 0, '', '', '', 'Email', '', '_bx_contact_form_contact_input_email_err', 'Xss', '', 0, 0),
+('mod_cnt_contact', @sName, 'subject', '', '', 0, 'text', '_bx_contact_form_contact_input_sys_subject', '_bx_contact_form_contact_input_subject', '', 1, 0, 0, '', '', '', 'Length', 'a:2:{s:3:"min";i:5;s:3:"max";i:250;}', '_bx_contact_form_contact_input_subject_err', 'Xss', '', 0, 0),
+('mod_cnt_contact', @sName, 'body', '', '', 0, 'textarea', '_bx_contact_form_contact_input_sys_body', '_bx_contact_form_contact_input_body', '', 1, 0, 0, '', '', '', 'Length', 'a:2:{s:3:"min";i:10;s:3:"max";i:5000;}', '_bx_contact_form_contact_input_body_err', 'Xss', '', 0, 0),
+('mod_cnt_contact', @sName, 'do_submit', '_bx_contact_form_contact_input_do_submit', '', 0, 'submit', '_bx_contact_form_contact_input_sys_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0);
+
+INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
+('mod_cnt_contact_send', 'name', 2147483647, 1, 1),
+('mod_cnt_contact_send', 'email', 2147483647, 1, 2),
+('mod_cnt_contact_send', 'subject', 2147483647, 1, 3),
+('mod_cnt_contact_send', 'body', 2147483647, 1, 4),
+('mod_cnt_contact_send', 'do_submit', 2147483647, 1, 5);
+
+
+-- STUDIO PAGE & WIDGET
+INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
+(3, @sName, '_bx_contact', '_bx_contact', 'bx_contact@modules/boonex/contact/|std-pi.png');
+SET @iPageId = LAST_INSERT_ID();
+
+SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
+SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
+INSERT INTO `sys_std_widgets` (`page_id`, `module`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
+(@iPageId, @sName, '{url_studio}module.php?name=bx_contact', '', 'bx_contact@modules/boonex/contact/|std-wi.png', '_bx_contact', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:18:"TemplStudioModules";}');
+INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
+(@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));

+ 15 - 0
modules/boonex/contact/install/sql/uninstall.sql

@@ -0,0 +1,15 @@
+SET @sName = 'bx_contact';
+
+-- TABLES
+DROP TABLE IF EXISTS `bx_contact_entries`;
+
+-- FORMS ALL
+DELETE FROM `sys_form_display_inputs` WHERE `display_name` IN  (SELECT `display_name` FROM `sys_form_displays` WHERE `module` = @sName);
+DELETE FROM `sys_form_inputs` WHERE `module` = @sName;
+DELETE FROM `sys_form_displays` WHERE `module` = @sName;
+DELETE FROM `sys_objects_form` WHERE `module` = @sName;
+
+-- STUDIO PAGE & WIDGET
+DELETE FROM `tp`, `tw`, `tpw`
+USING `sys_std_pages` AS `tp`, `sys_std_widgets` AS `tw`, `sys_std_pages_widgets` AS `tpw`
+WHERE `tp`.`id` = `tw`.`page_id` AND `tw`.`id` = `tpw`.`widget_id` AND `tp`.`name` = @sName;

+ 20 - 0
modules/boonex/contact/request.php

@@ -0,0 +1,20 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ * 
+ * @defgroup    Persons Persons
+ * @ingroup     DolphinModules
+ *
+ * @{
+ */
+
+require_once(BX_DIRECTORY_PATH_INC . "params.inc.php");
+require_once(BX_DIRECTORY_PATH_INC . "design.inc.php");
+
+bx_import('BxDolLanguages');
+bx_import('BxDolRequest');
+
+BxDolRequest::processAsAction($GLOBALS['aModule'], $GLOBALS['aRequest']);
+
+/** @} */

TEMPAT SAMPAH
modules/boonex/contact/template/images/icons/std-mi.png


TEMPAT SAMPAH
modules/boonex/contact/template/images/icons/std-pi.png


TEMPAT SAMPAH
modules/boonex/contact/template/images/icons/std-si.png


TEMPAT SAMPAH
modules/boonex/contact/template/images/icons/std-wi.png


+ 1 - 1
modules/boonex/timeline/install/installer.php

@@ -3,7 +3,7 @@
  * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
  * CC-BY License - http://creativecommons.org/licenses/by/3.0/
  * 
- * @defgroup    Sites Sites
+ * @defgroup    Timeline Timeline
  * @ingroup     DolphinModules
  *
  * @{