HostFact - DNS



Instellingen

Op deze pagina worden alle functies besproken omtrent het instellen van het DNS patform in HostFact.


getPlatformSettings()

Met deze functie kunt u de HTML creëeren voor de instellingen om het DNS platform in HostFact te configureren.


Voorbeeld implementatie
public function getPlatformSettings()
{
	// example of html for the integration settings
	$html = '';
	$html .= '<strong class="title">' . __('hostname', 'yourname') . '</strong>';
	$html .= '<input type="text" class="text1 size1" name="module[dnsmanagement][Settings][hostname]" value="' . ((isset($this->Settings->hostname)) ? htmlspecialchars($this->Settings->hostname) : '') . '"><br><br>';

	return $html;
}


processSettings()

Deze functie wordt aangeroepen voor een toevoegen/bewerken/tonen actie van een DNS platform. Hiermee kunt u bijvoorbeeld een wachtwoord encrypten voordat het deze opgeslagen wordt.


Beschikbare variabelen Beschrijving
$edit_or_show edit|show; bepaalt of een DNS platform bewerkt of getoond wordt
$settings de data van de instellingen

Voorbeeld implementatie
public function processSettings($edit_or_show, $settings)
{
	return $settings;
}
                


loadLanguageArray()

Functie voor ondersteuning van meertaligheid van (error) berichten van de koppeling naar HostFact.


Beschikbare variabelen Beschrijving
$language_code Taalcode

Voorbeeld implementatie
public function loadLanguageArray($language_code)
{
	// use in other functions as:
	// $this->Error[] = __('dns templates could not be retrieved', 'yourname');
	$_LANG = array();

	switch($language_code)
	{
		case 'nl_NL':
			$_LANG['dns templates could not be retrieved']                = 'De DNS templates konden niet worden opgehaald van het DNS platform of er zijn er geen aanwezig';
		break;

		default: // In case of other language, use English
			$_LANG['dns templates could not be retrieved']                = 'DNS template could not be retrieved from the DNS platform or there were no DNS templates';
		break;
	}

	// Save to global array
	global $_module_language_array;
	$_module_language_array['yourname'] = $_LANG;
}
                


validateLogin()

Valideer de inloggevens van een DNS platform


Beschikbare variabelen Beschrijving
$this->Settings DNS platform instellingen

Voorbeeld implementatie
public function validateLogin()
{
	/**
	 * Step 1) check if login data is valid
	 */

	// you can read $this->Settings for the data
	$response = true;

	/**
	 * Step 2) provide feedback to HostFact
	 */

	return $response;
}