';
}
$return .= t("If you do not want help configuring Hostmaster, just click this link",
array('@link' => url(variable_get('site_frontpage', 'node'), 'skip_wizard=TRUE')));
return $return;
case 'admin/help#hosting':
$username = provision_get_script_owner();
$drush_path = $_SERVER['DOCUMENT_ROOT'] . '/' . drupal_get_path('module', 'drush') . '/drush.php';
$cron_cmd['@drush_path'] = $drush_path;
$cron_cmd['@cron_cmd'] = <<The Hostmaster system is a set of modules that provide an interface to the Provisioning framework.
',
array('@provision_help' => url('admin/help/provision')));
$output .= '';
$output .= '' . t('Requirements') . '
';
$output .= '';
// @TODO: make this more clear
$output .= '- ' . t('
Correctly configured provisioning framework.
This system requires the Provisioning framework to be configured
and working for changes to have any effect.
To configure: As this Hostmaster site is also running on a platform, you can configure this platform in the Provisioning section.
If you have multiple platforms, web servers or database servers, you can configure their settings
for each individual item, on their edit pages.
', array('@provision_help' => url('admin/help/provision'), '@provision_section' => url('admin/settings/provision'))) . ' ';
$output .= '- ' . t('
A cron entry for the back end scripts.
Changes to this system are executed via a back end script which needs to be called by a user other than
the web server user for security reasons at regular intervals.
To configure: Run the crontab command :
@cron_cmd
And then add the following line to it :
@cron_line
', $cron_cmd) . ' ';
$output .= '
';
$output .= '' . t('Glossary') . '
';
$output .= '';
$types = node_get_types();
foreach ($types as $type => $info) {
if ($info->description) {
$output .= "- " . $info->name . '
';
$output .= '- ' . $info->description . '
';
}
}
$output .= '' . t('Commands') . '
';
$commands = module_invoke_all('drush_command');
$output .= "";
foreach ($commands as $command => $info) {
if (preg_match('/^hosting/', $command)) {
if (sizeof($info['arguments'])) {
$command .= ' ' . implode(' ', (array) key($info['arguments']));
}
if (sizeof($info['optional arguments'])) {
$command .= ' [' . implode('] [', (array) key($info['optional arguments'])) . ']';
}
$output .= '- ' . "
drush.php $command
" . ' ';
$output .= '- ' . $info["description"] . '
';
}
}
$output .= "
";
return $output;
case 'admin/settings/provision' :
$output = t("These settings will also change the settings of the platform, database server and web server that this site is running on.");
return $output;
}
}
function _hosting_introduction() {
$create_site_link = l(t('Create a site now?'), 'node/add/site');
if ($_GET['q'] != variable_get('site_frontpage', 'node')) {
return t("No sites have been created yet. !link", array(
'!link' => $create_site_link));
}
else {
drupal_set_title('Welcome to your new Hosting website!');
$default_message = t('Please follow these steps to set up and start using your website:
');
$default_message .= '';
if (!$admin) {
$default_message .= '- '. t('Create your administrator account To begin, create the first account. This account will have full administration rights and will allow you to configure your website.', array('@register' => url('user/register'))) .'
';
}
$default_message .= '- '. t('Configure your website
Once logged in, visit the administration section,
where you can customize and configure all aspects of your website.',
array('@admin' => url('admin'), '@config' => url('admin/settings'))) .'
';
$default_message .= '- '. t('
Configure the Provisioning framework.
Before you configure the Provisioning framework, it is highly recommended that you first read the Provision Requirement documentation.
It provides a step by step guide for configuring your server to use the framework.
You will then need to complete the provisioning section to configure the framework.
',
array('@provision' => url('admin/settings/provision'),
'@requirements' => url('admin/help/provision/requirements'))) .' ';
$default_message .= '- '. t('Configure the Hosting framework.
Most of the configuration for the system is configured for provisioning, but there are a number of small configuration changes that need to set.
For all the information you will need, please follow the instructions in the Hosting help section.', array('@hosting_help' => url('admin/help/hosting/requirements'))) .'
';
$default_message .= '- '. t('Create your first hosted site. This system uses special site posts to store information about your sites, so you can simple create a site post to get your first hosted site running.', array('@create_site' => url('node/add/site'))) .'
';
$default_message .= '
';
$default_message .= ''. t('For more information, please refer to the help section, or the online Drupal handbooks. You may also post at the Drupal forum, or view the wide range of other support options available.', array('@help' => url('admin/help'), '@handbook' => 'http://drupal.org/handbooks', '@forum' => 'http://drupal.org/forum', '@support' => 'http://drupal.org/support')) .'
';
$output = ''. $default_message .'
';
return $output;
}
}
/**
* Per node type description text. To be stored in the node_type table.
*
* @param type
* The node type.
* @return
* Description text for the node type.
*/
function hosting_node_help($type) {
switch ($type) {
case 'site' :
return t("An instance of a hosted site.
It contains information relating to the site, most notably the domain name, database server
and platform it is being published on. A site may also have several aliases for additional
domains the site needs to be accessible on.");
break;
case 'platform' :
return t("The file system location on a specific web server on which to publish sites.
Multiple platforms can co-exist on the same web server, and need to do so for
upgrades to be managed, as this is accomplished by moving the site a platform
hosting an updated release.
Platforms are most commonly built for specific releases of Drupal.");
break;
case 'client' :
return t("The person or group that runs the site.
This information is usually required for billing and access purposes, to assure
that only certain people are able to view the information for sites they run.
If you do not intend on having more than one client access the system,
you will not need to create any additional clients for your purposes.");
break;
case 'web_server' :
return t("The physical machine where files will be stored for publication.
Each web server hosts one or more platforms, which act as publishing points for the hosted sites.
If you are not intending to use Hostmaster in a distributed fashion, you will not need to create
additional web servers for your purposes..");
break;
case 'db_server' :
return t("The database server on which sites will host their date.
Most web servers and database servers are on the same machine, but for performance reasons
external database servers might be required. It is not uncommon for one database server
to be shared amongst all site instances.
If you are not intending to use an external database server, or multiple database servers, you
will not need to create any additional database servers for your purposes.");
break;
case 'action' :
return t("The mechanism whereby Hostmaster keeps track of all changes that occurr to the system.
Each action acts as a command for the back end, and contains a full log of all changes that have occurred.
If an action should fail, the administrator will be notified with an explanation of exactly what went wrong,
and how to fix it.");
break;
}
}