Output a message in bio.install pointing user to settings page.
Mark Theunissen - March 19, 2008 - 08:33
| Project: | Bio |
| Version: | 5.x-1.2 |
| Component: | User interface |
| Category: | feature request |
| Priority: | minor |
| Assigned: | Mark Theunissen |
| Status: | closed |
Description
Hi guys,
As per my rant on my blog, I've provided a small one-line patch that uses drupal_set_message to output a link to the Bio settings page when the module is installed. Sometimes users can take a while to find settings, especially when they're hiding away in User management. This makes it easier!
Mark
| Attachment | Size |
|---|---|
| bio.install.patch | 480 bytes |

#1
Sorry, new link:
http://codebaboon.com/usability-suggestion-display-settings-path
#2
Good idea. However:
A) this doesn't follow our coding standards (no tabs -- we use 2 spaces).
B) that's not the right way to handle t() and a link, since then it's backwards in RTL languages. You want something like:
t('Blah blah: <a href="@url">link text</a>', array('@url' => url('/path/to/link')));C) we don't generally print raw URL paths like that in help messages -- either just make the "bio settings page" itself a link, or use the funky "Administer >> User Settings >> Bio settings" stuff that we use in help texts.
Thanks,
-Derek
#3
Sure, thanks for the pointers. Here's a new patch, with the line:
drupal_set_message(t('You can configure the bio module on the <a href="@url">bio settings page</a>',array('@url' => url('admin/user/bio'))));#4
A few more minor nits:
D) Help messages like this should end with a period.
E) Our coding style wants a space after the comma here:
page</a>',array('@url'like so:page</a>', array('@url'.F) Don't forget to set issues back to "code needs review" when you upload a new patch to address the concerns when someone marked it "code needs work". ;)
That said, the changes were so minor, it's not really worth the time to go back around again waiting for you to make a 2 character change to the patch and resubmit it. ;) I just fixed these myself and committed to the DRUPAL-5 branch.
Thanks for the usability improvement.
#5
Great, sorry for wasting your time, but thanks for pointing out the errors!
#6
Automatically closed -- issue fixed for two weeks with no activity.