function modal_forms_help in Modal forms (with ctools) 7
Implements hook_help().
File
- ./
modal_forms.module, line 307 - Main file for the Modal Forms.
Code
function modal_forms_help($path) {
switch ($path) {
case 'admin/help#modal_forms':
$output = '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Modal forms make use of the modal feature in the ctools module to open some common forms in a modal window.') . '</p>';
$output .= '<h3>' . t('Supported forms') . '</h3>';
$output .= '<ul>';
$output .= '<li>' . t('Log in (modal_forms/nojs/login)') . '</li>';
$output .= '<li>' . t('Request new password (modal_forms/nojs/password)') . '</li>';
$output .= '<li>' . t('Create new account (modal_forms/nojs/register)') . '</li>';
$output .= '<li>' . t('Contact (modal_forms/nojs/contact)') . '</li>';
$output .= '<li>' . t('Comment (modal_forms/nojs/comment/reply/%node)') . '</li>';
$output .= '<li>' . t('Webform (modal_forms/nojs/webform/%node)') . '</li>';
$output .= '</ul>';
$output .= '<p>' . t('Function that rewrite normal links to modal forms links (except for webforms) can be activated on the project configuration page.') . '</p>';
$output .= '<h3>' . t('Links to the modal version of the forms') . '</h3>';
$output .= '<p>' . t('JavaScript that can rewrite standard links to these forms in to a modal equivalent are provided, see the project configuration page to activate them.') . '</p>';
$output .= '<p>' . t('To build links in code I recommend using the ctools_modal_text_button() function.') . '</p>';
$output .= '<code>';
$output .= '<p>' . '$links[] = ' . "ctools_modal_text_button(t('Modal Login'), 'modal_forms/nojs/login', t('Login via modal'));" . '</p>';
$output .= '<p>' . '$links[] = ' . "ctools_modal_text_button(t('Modal Login'), 'modal_forms/nojs/login', t('Login via modal'), 'ctools-modal-modal-popup-small');" . '</p>';
$output .= '</code>';
$output .= '<p>' . t('It is also possible to build links manually.') . '</p>';
$output .= '<code>';
$output .= '<p>' . '<a class="ctools-use-modal" href="modal_forms/nojs/login">Modal Login</a>' . '</p>';
$output .= '<p>' . '<a class="ctools-use-modal ctools-modal-modal-popup-small" href="modal_forms/nojs/login">Modal Login</a>' . '</p>';
$output .= '</code>';
$output .= '<h3>' . t('Popup styles and sizes') . '</h3>';
$output .= '<p>' . t('The include CSS file tries to mimic the default Colorbox style.') . '</p>';
$output .= '<p>' . t('The extra class "ctools-modal-modal-popup-small" in the links above tells the module what popup style size to use. There are three options included.') . '</p>';
$output .= '<ul>';
$output .= '<li>' . t('ctools-modal-modal-popup-small (defaults to 300x300)') . '</li>';
$output .= '<li>' . t('ctools-modal-modal-popup-medium (defaults to 550x450)') . '</li>';
$output .= '<li>' . t('ctools-modal-modal-popup-large (defaults to 80%x80%)') . '</li>';
$output .= '</ul>';
$output .= '<p>' . t('Go to the configurations page for Modal forms to adjust the sizes.') . '</p>';
return $output;
}
}