You can add multiple stylesheets here with multiple ways, For example:
1. <link type="text/css" rel="stylesheet" href="http://www.example.com/style.css" media="all" />
2. <link type="text/css" rel="stylesheet" href="/style.css" media="all" />
3. <style>#header { color: grey; }</style>
'), '#rows' => 10, ); + $form['hfs_header']['scripts'] = array( '#type' => 'textarea', '#title' => t('Header Scripts'), @@ -35,13 +35,14 @@ function hfs_header_settings_form($form, &$form_state) { '#description' => t('You can add multiple scripts here with multiple ways, For example:
1. <script type="text/javascript" src="http://www.example.com/script.js"></script>
2. <script type="text/javascript" src="/script.js"></script>
3. <script type="text/javascript"><!--//--><![CDATA[//><!--// close script tag //--><!]]></script>
'), '#rows' => 10, ); + $form['submit'] = array( '#type' => 'submit', '#value' => 'Save Header Settings', ); return $form; -} // End of hfs_header_settings(). +}// End of hfs_header_settings(). /** * Submit handler(). @@ -67,6 +68,7 @@ function hfs_body_settings_form($form, &$form_state) { '#title' => t('Add Scripts and Styles in body'), '#description' => t('All the defined scripts and styles in this section would be added next to body tag.'), ); + $form['hfs_body']['styles'] = array( '#type' => 'textarea', '#title' => t('Body Styles'), @@ -74,6 +76,7 @@ function hfs_body_settings_form($form, &$form_state) { '#description' => t('You can add multiple stylesheets here with multiple ways, For example:
1. <link type="text/css" rel="stylesheet" href="http://www.example.com/style.css" media="all" />
2. <link type="text/css" rel="stylesheet" href="/style.css" media="all" />
3. <style>#header { color: grey; }</style>
'), '#rows' => 10, ); + $form['hfs_body']['scripts'] = array( '#type' => 'textarea', '#title' => t('Body Scripts'), @@ -81,19 +84,20 @@ function hfs_body_settings_form($form, &$form_state) { '#description' => t('On mostly sites, this section is used to add the Google Tag Manager. Like:
1. <!-- Google Tag Manager --><noscript>Write Your code here</script><!-- End Google Tag Manager -->
You can also add multiple scripts here with multiple ways, For example:
1. <script type="text/javascript" src="http://www.example.com/script.js"></script>
2. <script type="text/javascript" src="/script.js"></script>
3. <script type="text/javascript"><!--//--><![CDATA[//><!--// close script tag //--><!]]></script>
'), '#rows' => 10, ); + $form['submit'] = array( '#type' => 'submit', '#value' => 'Save Body Settings', ); return $form; -} // End of hfs_body_settings_form(). +}// End of hfs_body_settings_form(). /** * Submit handler(). */ function hfs_body_settings_form_submit($form, &$form_state) { - $body['styles'] = $form_state['values']['styles']; + $body['styles'] = $form_state['values']['styles']; $body['scripts'] = $form_state['values']['scripts']; serialize($body); variable_set('hfs_body_scripts', $body); @@ -113,6 +117,7 @@ function hfs_footer_settings_form($form, &$form_state) { '#title' => t('Add Scripts and Styles in Footer'), '#description' => t('All the defined scripts and styles in this section would be added just before closing the body tag.'), ); + $form['hfs_footer']['styles'] = array( '#type' => 'textarea', '#title' => t('Footer Styles'), @@ -120,6 +125,7 @@ function hfs_footer_settings_form($form, &$form_state) { '#description' => t('You can add multiple stylesheets here with multiple ways, For example:
1. <link type="text/css" rel="stylesheet" href="http://www.example.com/style.css" media="all" />
2. <link type="text/css" rel="stylesheet" href="/style.css" media="all" />
3. <style>#header { color: grey; }</style>
'), '#rows' => 10, ); + $form['hfs_footer']['scripts'] = array( '#type' => 'textarea', '#title' => t('Footer Scripts'), @@ -127,13 +133,14 @@ function hfs_footer_settings_form($form, &$form_state) { '#description' => t('You can add multiple scripts here with multiple ways, For example:
1. <script type="text/javascript" src="http://www.example.com/script.js"></script>
2. <script type="text/javascript" src="/script.js"></script>
3. <script type="text/javascript"><!--//--><![CDATA[//><!--// close script tag //--><!]]></script>
'), '#rows' => 10, ); + $form['submit'] = array( '#type' => 'submit', '#value' => 'Save Footer Settings', ); return $form; -} // End of hfs_footer_settings_form(). +}// End of hfs_footer_settings_form(). /** * Submit handler(). diff --git a/hfs.module b/hfs.module index bcefcf6..88affec 100644 --- a/hfs.module +++ b/hfs.module @@ -2,10 +2,10 @@ /** * @file - * Enables Drupal to add scripts and styles from the frontend on all over the site. + * Enables Drupal to add scripts and styles from the frontend on all over the + * site at anywhere in the page. */ - /** * Implements hook_menu(). */