'markup', '#markup' => '
' . t('Reminder: The settings on this form only affect text formats for which Pathologic is configured to use the global Pathologic settings; if it’s configured to use per-format settings, these settings will have no effect. If you have upgraded to the current 7.x-3.x version of Pathologic from version 7.x-2.x, all of your current formats will use their existing per-format settings by default, so that behavior will be the same as the 7.x-2.x version until they are configured to use the global settings instead. Please consult Pathologic’s documentation for a step-by-step guide to configuring Pathologic.', array('!docs' => 'https://www.drupal.org/node/257026')) . '
', '#weight' => 0, ); $config_form = _pathologic_configuration_form(array( 'protocol_style' => variable_get('pathologic_protocol_style', 'full'), 'local_paths' => variable_get('pathologic_local_paths', ''), )); $form['pathologic_protocol_style'] = $config_form['protocol_style']; $form['pathologic_local_paths'] = $config_form['local_paths']; return system_settings_form($form); } /** * Common elements for the Pathologic configuration form. * * This reduces redundancy in code for form elements that will appear on both * the global settings form and the per-format filter settings form. * * @param $defaults * An array of default values for the configuration form fields. * @return * The common form elements */ function _pathologic_configuration_form($defaults) { return array( 'protocol_style' => array( '#type' => 'radios', '#title' => t('Processed URL format'), '#default_value' => $defaults['protocol_style'], '#options' => array( 'full' => t('Full URL (http://example.com/foo/bar
)'),
'proto-rel' => t('Protocol relative URL (//example.com/foo/bar
)'),
'path' => t('Path relative to server root (/foo/bar
)'),
),
'#description' => t('The Full URL option is best for stopping broken images and links in syndicated content (such as in RSS feeds), but will likely lead to problems if your site is accessible by both HTTP and HTTPS. Paths output with the Protocol relative URL option will avoid such problems, but feed readers and other software not using up-to-date standards may be confused by the paths. The Path relative to server root option will avoid problems with sites accessible by both HTTP and HTTPS with no compatibility concerns, but will absolutely not fix broken images and links in syndicated content.'),
'#weight' => 10,
),
'local_paths' => array(
'#type' => 'textarea',
'#title' => t('All base paths for this site'),
'#default_value' => $defaults['local_paths'],
'#description' => t('If this site is or was available at more than one base path or URL, enter them here, separated by line breaks. For example, if this site is live at http://example.com/
but has a staging version at http://dev.example.org/staging/
, you would enter both those URLs here. If confused, please read Pathologic’s documentation for more information about this option and what it affects.', array('!docs' => 'https://www.drupal.org/node/257026')),
'#weight' => 20,
),
);
}