? 360347_6_browscap_notices.patch Index: README.txt =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/browscap/README.txt,v retrieving revision 1.3.6.2.2.2 diff -u -p -r1.3.6.2.2.2 README.txt --- README.txt 16 Sep 2009 22:11:57 -0000 1.3.6.2.2.2 +++ README.txt 17 Sep 2009 15:18:33 -0000 @@ -22,8 +22,10 @@ of the browscap data or visit Administer and click the "Refresh now" link. 4. On Administer > Site configuration > Browscap you can enable logging of -browser types for visitors to your site. The report is visible at -Administer > Reports > Browscap +browser types for visitors to your site. + +5. The report itself is visible at Administer > Reports > Browscap and +several other tabs in that area. API --- Index: browscap.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/browscap/browscap.module,v retrieving revision 1.6.2.3.2.8 diff -u -p -r1.6.2.3.2.8 browscap.module --- browscap.module 17 Sep 2009 15:04:47 -0000 1.6.2.3.2.8 +++ browscap.module 17 Sep 2009 15:18:34 -0000 @@ -120,26 +120,36 @@ function browscap_cron() { */ /** - * Callback for settings form - * Turn monitoring on or off + * Callback for settings form. + * Turn monitoring on or off and refresh the reference data. * * @return array */ function browscap_settings() { - $form['browscap_monitor'] = array( - '#type' => 'checkbox', - '#prefix' => t('

Browscap data current as of %fileversion. [Refresh now]

', + $form['browscap_data_status'] = array( + '#value' => t('

Browscap data current as of %fileversion. [Refresh now]

', array( '%fileversion' => variable_get('browscap_version', t('Never fetched')), '!refresh' => url('admin/settings/browscap/refresh'), )), + ); + + $form['browscap_monitor'] = array( + '#type' => 'checkbox', '#title' => t('Monitor browsers'), '#default_value' => variable_get('browscap_monitor', FALSE), - '#description' => t('Monitor all user agents visiting the site.') + '#description' => t('Monitor all user agents visiting the site. View the reports in the Browscap reports area.', + array( + '!reports' => url('admin/reports/browscap'), + )), ); return system_settings_form($form); } +/** + * Simple page callback to manually refresh the data. + * + */ function browscap_refresh() { _browscap_import(FALSE); drupal_goto('admin/settings/browscap'); @@ -226,7 +236,11 @@ function browscap_top_useragents($view = $rows[] = array(array('data' => $pager, 'colspan' => 2)); } - $output = theme('table', $header, $rows); + $output = ''; + if (empty($rows)) { + $output .= t('It appears that your site has not recorded any visits. If you want to record the visitors to your site you can enable "Monitor browsers" on the Browscap settings screen.', array('!settings_uri' => url('admin/settings/browscap'))); + } + $output .= theme('table', $header, $rows); print theme('page', $output, $title); }