You are here

function constant_contact_intro in Constant Contact 6.3

Same name and namespace in other branches
  1. 6.2 system.admin.inc \constant_contact_intro()
  2. 7.3 admin.system.inc \constant_contact_intro()

Displays the module intro page in the admin settings page

1 string reference to 'constant_contact_intro'
constant_contact_menu in ./constant_contact.module
Adds an admin menu for the Cnstant Contact module

File

./admin.system.inc, line 10

Code

function constant_contact_intro() {
  $info_filename = drupal_get_path('module', 'constant_contact') . '/' . 'constant_contact' . '.info';
  $module = drupal_parse_info_file($info_filename);
  $webform_html = '';

  // if they have webform enabled display a message about the webform CC module to let them know it exists
  if (module_exists('webform') and !module_exists('webform_constant_contact')) {
    $webform_html = '<p><span style="color:green; font-weight:bold; font-size:1em;">Did you know you can integrate webform with the constant contact module? - <a href="http://drupal.org/project/webform_constant_contact">To find out more click here</a></span></p>';
  }

  // not sure translation will work here :(
  $html = $webform_html;
  $html .= '<p>This is version ' . $module['version'] . ' of the Constant Contact module for Drupal.</p>';
  $html .= '<p>If you do not have a constant contact account <a target="_blank" href="@cc">Signup for a free 60-day trial</a>.</p>';
  $html .= '<p>Instructions for setting up the module can be found <a href="@instructions">here</a>.</p>';
  $html .= '<p>If you find any problems or need help see <a href="@help">here</a>.</p>';
  $html .= '<br /><p>The drupal module is provided by <a target="_blank" href="@me">James Benson</a>.
	<br />If you find the module useful please consider <a target="_blank" href="@donate">donating</a> a few dollars towards future development costs.</p>';
  $params = array(
    '@instructions' => url('admin/help/constant_contact'),
    '@help' => 'http://drupal.org/project/issues/constant_contact?categories=All',
    '@donate' => 'http://integrationservic.es/donate.php',
    '@me' => 'http://justphp.co.uk',
    '@cc' => CC_TRIAL_URL,
  );
  return t($html, $params);
}