You are here

function ad_admin_configure_settings_validate in Advertisement 5.2

Same name and namespace in other branches
  1. 5 ad.module \ad_admin_configure_settings_validate()
  2. 6.3 ad.admin.inc \ad_admin_configure_settings_validate()
  3. 6 ad.admin.inc \ad_admin_configure_settings_validate()
  4. 6.2 ad.admin.inc \ad_admin_configure_settings_validate()
  5. 7 ad.admin.inc \ad_admin_configure_settings_validate()

Validate form settings, calling attention to any illogical configurations.

File

./ad.module, line 1948
An advertising system for Drupal powered websites.

Code

function ad_admin_configure_settings_validate($form_id, $form_values) {
  if ($form_values['ad_link_target'] == '_self' && $form_values['ad_display'] == 'iframe') {

    // We don't consider this an error, as this could be exactly what the
    // administrator is trying to do.  But as for most people it is likely
    // to be a misconfiguration, display a helpful warning...
    drupal_set_message('You have configured your advertisements to be displayed in iframes, and you have configured your click-through target as "same browser window and frame".  This is an unusual configuration, as when you click your advertisements only the IFrame will be redirected.  Be sure that this is actually what you are trying to do.');
  }
}