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

AttachmentSize
bio.install.patch480 bytes

#1

Mark Theunissen - March 19, 2008 - 10:06

#2

dww - March 19, 2008 - 19:02
Component:Code» User interface
Status:needs review» needs work

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

Mark Theunissen - March 25, 2008 - 09:54

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'))));

AttachmentSize
bio.install.patch 528 bytes

#4

dww - March 25, 2008 - 16:16
Status:needs work» fixed

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

Mark Theunissen - March 26, 2008 - 09:05

Great, sorry for wasting your time, but thanks for pointing out the errors!

#6

Anonymous (not verified) - April 9, 2008 - 09:12
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.