listingsModifyWhereFeatured

			if (defined('ANDROID_APP') AND ANDROID_APP) {
				$param1 .= " AND `T1`.`Main_photo` <> ''";
			}
		

apTplControlsForm

			$GLOBALS['rlSmarty']->display(RL_PLUGINS . 'androidConnect' . RL_DS . 'admin' . RL_DS . 'resizeEntry.tpl');
		

apAjaxRequest

			global $reefless, $item;
			
			if ($item == 'androidResize') {
				$reefless->loadClass('AndroidConnect', null, 'androidConnect');
				$GLOBALS['rlAndroidConnect']->resizePhotos((int) $_GET['stack']);
			}
		

phpUpdatePhotoDataSetFields

			global $reefless;
			
			$reefless->loadClass('AndroidConnect', null, 'androidConnect');
			$GLOBALS['rlAndroidConnect']->resizePhoto($param1, $param2, $param3);
		

apTplHeader

			global $config;
			echo '<style type="text/css">
			div#msection_'. $config['android_admin_section_id'] .' > div.caption > div.icon {
				background: url('. RL_PLUGINS_URL .'androidConnect/static/gallery.png) 3px 0 no-repeat!important; 
			}
			div#msection_'. $config['android_admin_section_id'] .' > div.caption_active > div.icon {
				background: url('. RL_PLUGINS_URL .'androidConnect/static/gallery.png) 3px -26px no-repeat!important; 
			}
			</style>';
		

apPhpIndexBeforeController

			global $cInfo, $config;
			if ($cInfo['Parent_ID'] == $config['android_admin_section_id']) {
				$cInfo['Plugin'] = 'androidConnect';
			}
		

apPhpIndexBottom

			global $reefless, $extended_sections;
			$extended_sections[] = 'android_languages';
			
			$reefless->loadClass('AndroidConnect', null, 'androidConnect');
			$GLOBALS['rlAndroidConnect']->breadCrumbs();
		

confirmPreConfirm

			global $reefless, $account, $key;
			
			if ($reefless->getOne('ID', "`Key` = 'facebookConnect' AND `Status` = 'active'", 'plugins')) {
				if ($reefless->getOne('facebook_ID', "`Confirm_code` = '{$key}'", 'accounts')) {
					$account['Admin_confirmation'] = 0;
					$params1['Admin_confirmation'] = 0;
				}
			}
		

phpGetPlanSql

			global $sql;
			
			if (!defined('ANDROID_APP'))
				return;

			if (!is_numeric(strpos($sql, "`Featured`"))) {
				$sql = str_replace("`T1`.`ID`,", "`T1`.`ID`, `T1`.`Featured`, `T1`.`Advanced_mode`, `T1`.`Standard_listings`, `T1`.`Featured_listings`,", $sql);
				$sql = str_replace("`T3`.`Listings_remains`", "`T3`.`ID` AS `Package_ID`, `T3`.`Listings_remains`, `T3`.`Standard_remains`, `T3`.`Featured_remains`, `T2`.`Listings_remains` AS `Using`, `T2`.`ID` AS `Plan_using_ID` ", $sql);
			}
		

myListingsSqlFields

			global $sql;

			if (!defined('ANDROID_APP'))
				return;

			$ref_sql = $param1 ? $param1 : $sql;
			if (!is_numeric(strpos($ref_sql, '`T2`.`Type`'))) {
				if ($param1) {
					$param1 .= ', `T2`.`Type` AS `Plan_type`, `T2`.`Price` AS `Plan_price`, `T2`.`Key` AS `Plan_real_key` ';
				}
				else {
					$sql .= ', `T2`.`Type` AS `Plan_type`, `T2`.`Price` AS `Plan_price`, `T2`.`Key` AS `Plan_real_key` ';
				}
			}
		

apMixConfigItem

			global $rlDb, $lang;
			if ($param1['Key'] == 'android_inapp_key') {
				$param1['Default'] = $param1['Values'][0];
			}
			else if ($param1['Key'] == 'android_main_listing_type') {
				foreach ( $rlDb->getAll("SELECT `Key` FROM `". RL_DBPREFIX ."listing_types` WHERE `Status` = 'active' AND `Page` = '1' ORDER BY `Order`") AS $l_type ) {
					$param1['Values'][] = array('ID' => $l_type['Key'], 'name' => $lang['listing_types+name+'.$l_type['Key'] ]);
				}
			}
		

apPhpConfigBeforeUpdate

			global $update;
			foreach ($update as $key => &$value) {
				if ($value['where']['Key'] == 'android_inapp_key') {
					$value['fields']['Values'] = $value['fields']['Default'];
				}
			}
		

getCatTreeFields

			if (!defined('ANDROID_APP'))
				return;

			global $sql;

			if (!is_numeric(strpos($sql, '`T1`.`Count`'))) {
				$sql .= '`T1`.`Count`, ';
			}
		

phpGetProfileModifyField

			if (!defined('ANDROID_APP'))
				return;

			if (!is_numeric(strpos($param1, '`T2`.`Abilities`'))) {
				$param1 .= ', `T2`.`Abilities` ';
			}
		

rlMessagesAjaxContactOwnerAfterSend

			global $reefless, $account_info, $lang, $config;			
			if (defined('IS_LOGIN') || $config['messages_save_visitor_message']) {
				$reefless->loadClass('AndroidConnect', null, 'androidConnect');
				$message = $GLOBALS['rlAndroidConnect']->fetchMessage($account_info['ID'],'From');
				$array_message = array('key'=>'message', 'title'=> $lang['new_message']);
				foreach ($message as $key => $val) {
					if($key == "From" || $key =="To") {
						$array_message[strtolower($key."_id")] = $val=='-1' ? $message['Visitor_mail'] : $val;
					}
					else {
						$array_message[strtolower($key)] = $val;
					}
				}
				$GLOBALS['rlAndroidConnect']->sendPushNotification($array_message);
			}
		

rlMessagesAjaxAfterMessageSent

            $GLOBALS['reefless']->loadClass('AndroidConnect', null, 'androidConnect');
            $GLOBALS['rlAndroidConnect']->hookRlMessagesAjaxAfterMessageSent($param1, $param2, $param3);
		

cronSavedSearchNotify

            $GLOBALS['reefless']->loadClass('AndroidConnect', null, 'androidConnect');
            $GLOBALS['rlAndroidConnect']->hookCronSavedSearchNotify($param1, $param2, $param3);
        

