Better help text for comment setting in node create/edit page

sivaji - May 27, 2009 - 12:34
Project:Drupal
Version:7.x-dev
Component:comment.module
Category:feature request
Priority:minor
Assigned:Unassigned
Status:won't fix
Issue tags:Novice, Quick fix, Usability
Description

Node create/edit page looks fine with vertical tabs. Comment settings in this page has help text like

Users with 'post comments' permission can post comments.

Obviously this help text will make a newbie to search for permission settings, so i think its better to have this text links to admin/user/permissions page. I have attached a patch to do this task, please test it and let me know your suggestions.

AttachmentSizeStatusTest resultOperations
drupal_comment_settings_1.patch1.03 KBIdlePassed: 11513 passes, 0 fails, 0 exceptionsView details | Re-test

#1

sivaji - May 27, 2009 - 12:36
Status:active» needs review

#2

Shawn DeArmond - May 27, 2009 - 22:06
Component:node system» comment.module
Status:needs review» reviewed & tested by the community

I applied this patch to D7 HEAD and it did what it was advertised to do.

#3

yoroy - May 27, 2009 - 23:41
Status:reviewed & tested by the community» needs work

Did you click the link? From reading the patch (not applied it) I think there is a "/" missing here:
l(t('permission'), 'admin/user/permissions')) shouldn't that be
l(t('permission'), '/admin/user/permissions')) ?

#4

Shawn DeArmond - May 27, 2009 - 23:49
Status:needs work» reviewed & tested by the community

Yes, I clicked the link; and no, you don't need the leading "/". The l() function uses internal Drupal paths which do not include leading slashes.

#5

yoroy - May 27, 2009 - 23:55

whoops, pardon my code ignorance. All good to go then.

#6

sivaji - May 27, 2009 - 23:54

Please run this code in your Execute PHP block and find the difference.

echo l(t('permission'), 'admin/user/permissions');
echo "\n";
echo l(t('permission'), '/admin/user/permissions') ;

output

<a href="/quiz-dev/admin/user/permissions">permission</a>
<a href="/quiz-dev//admin/user/permissions">permission</a>

yoroy--

#7

yoroy - May 28, 2009 - 00:03

yah nevermind me, I don't code so will refrain from commenting on it :)

#8

Bojhan - May 29, 2009 - 19:05
Issue tags:+Quick fix

Attaching quick fix for webchick

#9

webchick - May 29, 2009 - 21:44
Status:reviewed & tested by the community» needs work

That's not quite right. It should be something like <a href="@url">permission</a> ... array('@url' => url('admin/user/permissions') (check other similar strings in core). We like to keep the link title in the string to provide translators context.

#10

Shawn DeArmond - May 30, 2009 - 09:59
Status:needs work» needs review

Ya know... after thinking about it for a minute from a ux perspective, I'm not sure this issue should be fixed. The user who sees this message may not have access to administer permissions. Indeed, none of the other settings at the bottom of a node form have links to the permissions page, why should this one?

#11

sivaji - May 30, 2009 - 18:08
Assigned to:sivaji» Anonymous
Status:needs review» won't fix

#12

tantankundan - October 27, 2009 - 11:49
 
 

Drupal is a registered trademark of Dries Buytaert.