diff --git a/README.txt b/README.txt index 33ada98..b24a38b 100644 --- a/README.txt +++ b/README.txt @@ -1,5 +1,6 @@ HFS (Header Footer Scripts) module for Drupal 7.x. -This module allows you to add style and scripts in different region of the page from the front-end. You don't need to open any file for this purpose. +This module allows you to add style and scripts in different region of the page +from the front-end. You don't need to open any file for this purpose. INSTALLATION INSTRUCTIONS ------------------------- @@ -8,11 +9,12 @@ INSTALLATION INSTRUCTIONS 2. Login as site administrator. 3. Enable the HFS (Header Footer Scripts) module on the Administer -> Modules page. -4. Add styles and scripts in settings on the Administer -> Configuration -> Development -> - HFS (Header Footer Scripts) Page. +4. Add styles and scripts in settings on the Administer -> Configuration -> + Development -> HFS (Header Footer Scripts) Page. 5. Enjoy. NOTES ----- -This module adds the styles and scripts on all over the site. There are 3 setting pages. +This module adds the styles and scripts on all over the site. There are 3 +setting pages. These setting pages are allow you add the scripts in the desired region. diff --git a/hfs.admin.inc b/hfs.admin.inc index 05c5058..5c67eac 100644 --- a/hfs.admin.inc +++ b/hfs.admin.inc @@ -10,7 +10,7 @@ /** * Administrative settings. * - * @return + * @return array * Add styles and scripts in header. */ function hfs_header_settings_form($form, &$form_state) { @@ -47,7 +47,7 @@ function hfs_header_settings_form($form, &$form_state) { * Submit handler(). */ function hfs_header_settings_form_submit($form, &$form_state) { - $header['styles'] = $form_state['values']['styles']; + $header['styles'] = $form_state['values']['styles']; $header['scripts'] = $form_state['values']['scripts']; serialize($header); variable_set('hfs_header_scripts', $header); @@ -56,12 +56,12 @@ function hfs_header_settings_form_submit($form, &$form_state) { /** * Administrative settings. * - * @return + * @return array * Add styles and scripts at the start of the body tag. */ function hfs_body_settings_form($form, &$form_state) { $body_section = variable_get('hfs_body_scripts'); - + $form['hfs_body'] = array( '#type' => 'fieldset', '#title' => t('Add Scripts and Styles in body'), @@ -102,7 +102,7 @@ function hfs_body_settings_form_submit($form, &$form_state) { /** * Administrative settings. * - * @return + * @return array * Add styles and scripts in footer (before closing the body tag). */ function hfs_footer_settings_form($form, &$form_state) { @@ -131,7 +131,7 @@ function hfs_footer_settings_form($form, &$form_state) { '#type' => 'submit', '#value' => 'Save Footer Settings', ); - + return $form; } // End of hfs_footer_settings_form(). @@ -139,7 +139,7 @@ function hfs_footer_settings_form($form, &$form_state) { * Submit handler(). */ function hfs_footer_settings_form_submit($form, &$form_state) { - $footer['styles'] = $form_state['values']['styles']; + $footer['styles'] = $form_state['values']['styles']; $footer['scripts'] = $form_state['values']['scripts']; serialize($footer); variable_set('hfs_footer_scripts', $footer); diff --git a/hfs.module b/hfs.module index ff49617..bcefcf6 100644 --- a/hfs.module +++ b/hfs.module @@ -65,7 +65,7 @@ function hfs_permission() { $permissions['administer hfs module'] = array( 'title' => t('Add Scripts all over the site'), 'restrict access' => TRUE, - 'description' => t('Users who have this permission can add and remove the scripts from the site.') + 'description' => t('Users who have this permission can add and remove the scripts from the site.'), ); return $permissions; @@ -77,7 +77,7 @@ function hfs_permission() { * Add scripts on overall the site which are defined on the settings page. */ function hfs_process_html(&$variables) { - + $header_scripts = variable_get('hfs_header_scripts'); $body_scripts = variable_get('hfs_body_scripts'); $footer_scripts = variable_get('hfs_footer_scripts');