Your IP : 216.73.216.6


Current Path : /home/hsabaeej/public_html/modules/mod_jux_megamenucss3/
Upload File :
Current File : /home/hsabaeej/public_html/modules/mod_jux_megamenucss3/install.php

<?php
 /*
 * @version		$Id$
 * @author		JoomlaUX!
 * @package		Joomla!
 * @subpackage	MegaMenuCss3
 * @copyright	Copyright (C) 2008 - 2013 by JoomlaUX Solutions. All rights reserved.
 * @license		http://www.gnu.org/licenses/gpl.html
 */

// No direct access
defined('_JEXEC') or die;


class mod_jux_megamenucss3InstallerScript {
    function postflight($type, $parent)
    {
		$params['dd_bacground_color'] = '#7d5050';
		$params['fl_color'] = '#647166';
		$params['gs_color_1'] = '#670c47';
		$params['gs_color_2'] = '#b13467';
		$params['nav_border'] = '{"nav_border_width":"1px","nav_border_style":"none","nav_border_color":"#faf0da"}';
		
		$params['dd_bacground_color'] = '#b1bea4';
		$params['dd_border'] = '{"dd_border_width":"1px","dd_border_style":"solid","dd_border_color":"#ffffff"}';
		$params['dd_shadow'] = '{"dd_shadow_h_offset":"0px","dd_shadow_v_offset":"1px","dd_shadow_blur":"1px","dd_shadow_spread":"1px","dd_shadow_color":"#ffffff","dd_shadow_inset":"1"}';

		$params['titem_hover_bacground_color'] = '#ced59f';
		$params['titem_border'] = '{"titem_border_width":"1px","titem_border_style":"none","titem_border_color":"#ffffff"}';
		$params['titem_padding'] = '{"titem_top_padding":"10px","titem_right_padding":"10px","titem_bottom_padding":"10px","titem_left_padding":"10px"}';
		$params['titem_text_color'] = '#faf0da';
		$params['titem_text_hover_color'] = '#555940';

		$params['ditem_hover_bacground_color'] = '#fffef0';
		$params['ditem_border'] = '{"ditem_border_width":"1px","ditem_border_style":"solid","ditem_border_color":"#fefff5"}';
		$params['ditem_padding'] = '{"ditem_top_padding":"10px","ditem_right_padding":"8px","ditem_bottom_padding":"10px","ditem_left_padding":"8px"}';
		$params['ditem_margin'] = '{"ditem_top_margin":"10px","ditem_right_margin":"10px","ditem_bottom_margin":"10px","ditem_left_margin":"10px"}';
		$params['ditem_text_color'] = '#faf0da';
		$params['ditem_text_hover_color'] = '#555940';
		$this->setParams( $params );
		
    }
	/*
	 * sets parameter values in the component's row of the extension table
	 */
	function setParams($param_array) {
		if ( count($param_array) > 0 ) {
			// read the existing component value(s)
			$db = JFactory::getDbo();
			$db->setQuery('SELECT params FROM #__modules WHERE module = "mod_jux_megamenucss3"');
			$params = json_decode( $db->loadResult(), true );
			// add the new variable(s) to the existing one(s)
			foreach ( $param_array as $name => $value ) {
				$params[ (string) $name ] = (string) $value;
			}
			// store the combined new and existing values back as a JSON string
			$paramsString = json_encode( $params );
			$db->setQuery('UPDATE #__modules SET params = ' .
				$db->quote( $paramsString ) .
				' WHERE module = "mod_jux_megamenucss3"  and position=" "' );
				$db->query();
		}
	}
}