Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
7 Feb 2012 at 19:27 UTC
Updated:
4 Jan 2014 at 01:39 UTC
Jump to comment: Most recent
Comments
Comment #0.0
Fidelix commentedAdded a screenshot
Comment #1
afeijo+1, cool useful module!
Comment #1.0
afeijoOnly local images are allowed
Comment #2
phoenix commentedHi Fidelix
Nice module!
But here are a few things to work on:
- Could you specify the version of drupal it is made for
- Please put your code in a feature branch and lear out the master branch: follow steps on this page
- Your files have to end with a blank line
- Please use the t() function around all your strings. E.g.
'title' => t('Username Prefixes')I see you used it later on, but you forgot in you hook_menu.- You still have some coding standard issue:
You can use this url to check your project again: http://ventral.org/pareview/httpgitdrupalorgsandboxfidelix1431768git
Comment #3
Fidelix commentedThanks for the great and fast review!
This is in the .info file. What do you mean?
Done.
Tried. Doesn't pass on the bot.
No, I did not forget. According to docs, I shouldn't put t() there.
http://drupal.org/node/140311
I'm not being able to fix the following:
I deliberately left this one untouched:
It doesn't make sense to me to "translate" menu paths. Do you want me to do it anyway?
Comment #4
phoenix commentedHi Fidelix
- when applying for a full project, you need to mention a few things in your application to make reviewing more easy. You didn't mention the version of drupal it is made for in your issue above. Check this page: http://drupal.org/node/1011698
- The problems with the single new line character are the following. In windows a new line character is two characters (LFCR = line feed carriage return, this is the \r\n mentioned). In UNIX it is a single character (LF = Line feed, this is \n). I guess you programmed on a windows machine. Try to substitute those characters, or try to find the right settings for your editor or IDE.
- The t() function should be used in the l() function, not for the paths, but for the text of your link. If you create a link the path will end up in the href="" attribute and a text will be shown in between . That needs to be translatable.
As you see here: http://api.drupal.org/api/drupal/includes%21common.inc/function/l/7 The l() function takes a text part, a path and an optional options array.
- Line 13 I see this code:
This should become this:
- Please also read the page about Tips for a great project page. And try to add some more information on your project page.
Thanks for you clarification on why you didn't use the t() function in hook_menu. I didn't know that. I guess we can all learn :)
Fix those errors and then you can change the status back to "needs review"
Comment #5
Fidelix commentedHello, phoenix.
Thank you for the quick response.
I know how to use the t() function well. But this is the line in question:
'#markup' => t('Roles are listed and chosen based on the order of importance, defined on !link.', array('!link' => l('admin/people/permissions/roles', 'admin/people/permissions/roles'))),It does not make sense to make this translatable, does it?: "admin/people/permissions/roles"
See my point now? There are reasons why l() doesn't take the first parameter and runs it through t() every time. Markup (images) and inline paths being one of the reasons.
Comment #6
Fidelix commentedBTW, I'm using Aptana Studio.
Configured it like instructed here: http://stackoverflow.com/questions/2318075/make-aptana-never-use-windows...
Didn't work, so I ended using dos2unix to convert the files. It passed on the tests here:
http://ventral.org/pareview/httpgitdrupalorgsandboxfidelix1431768git-7x-1x
This is the last remaining problem:
Which is what I tried to make a point in my last message.
Comment #7
Fidelix commentedWhat if I make it like this? It should pass the test.
'#markup' => t('Roles are listed and chosen based on the order of importance, defined on !link.', array('!link' => l(t('Administration >> Configuration >> People >> Username Prefixes'), 'admin/people/permissions/roles'))),Comment #8
phoenix commentedWell, I think it is not the right way. You give a link to go to that page. They will see the breadcrumb on that page. Just give your link a name. Not a whole path to follow, as they don't need to do it.
My suggestion:
Comment #8.0
phoenix commentedNot very intelligent image blocking...
Comment #9
Fidelix commentedThanks again, phoenix.
I have made the change as you suggested and now the module should pass all the tests on http://ventral.org/pareview/httpgitdrupalorgsandboxfidelix1431768git-7x-1x
Comment #10
NBZ4live commentedhttp://ventral.org/pareview/httpgitdrupalorgsandboxfidelix1431768git-7x-1x looks good
Code looks good
Tested on D7 and it works like it should
Suggestion:
I would suggest to add a configuration option for the look of the prefix. Like global separator between prefix and username
Comment #11
Fidelix commentedNBZ4live, that's a nice idea. I will implement it before releasing 1.0.
I was also thinking whether I should deal with mini-icons that prefix usernames depending on roles.
There are some use cases for that.
Comment #12
jthorson commentedYou should empty out your master branch, so that people don't accidently check out the outdated code inside it ... check out step #5 on http://drupal.org/node/1127732
Comment #13
Fidelix commentedThanks, jthorson.
It's empty now.
Comment #14
klausimanual review:
Otherwise I think this is nearly ready.
Comment #15
Fidelix commentedAdded a bit of info.
Not much more I can do about it. The purpose of this module is very straightforward.
Used "administer users".
That's just documentation flaw. At first, I didn't know that user_roles() returned roles on (almost) proper weight order.
I have changed it to
klausi, I understand, and this is a generally a good approach which I agree with.
But this module has a solid purpose/feature for community sites, and not just a simple form_alter to hide toolbar for user 1.
Besides, there are more features coming as I said before.
If that's not enough, I understand. Proceed as you desire.
Comment #16
Fidelix commentedComment #17
musikpirat commentedYour git url is not correct, you should use this one in the issue:
How shall "Use Icons as prefixes work"? :)
I'd suggest to adjust the .info file a little bit from "Lets you add customized prefixes to your users" to "Lets you add customized prefixes to your users based on their roles".
Is there any reason why you use admin/config/people/prefix as the config url? I'd expected something lile admin/config/username_prefix.
Did you enhance your module meanwhile to break the 120 lines barrier? Automatical assignment of roles based on a number of comments would be imho pretty useful for community pages.
Comment #18
Fidelix commentedThank you for your suggestions, musikpirat.
I did not set any git URL's, d.o did it automatically.
Assign a small icon (something like 16x16) to appear before the username of the user. Just like the text prefix, but an icon instead.
Done.
Well, this feature is related to users and their roles, so I really think this is where it belongs.
Not yet. I'll leave it as a sandbox until I do.
This would be a nice feature, but it's not in the scope of this module. There are other modules for that (I think).
Thank you for all your suggestions!
Comment #18.0
Fidelix commentedAdded version information.
Comment #19
ryandekker commentedThe problem with the git URL in your initial post is that it points at the "master" branch, rather than the "7.x-1.x" branch. Since your master only has the "README.txt" file, it's not real helpful.
Looks like you haven't added the icon functionality. I could see this being a natural addition to this module, but I certainly don't think it's remotely required for the module to be helpful. This would, however, be an easy way to add a few lines to your code to push you over the 120 barrier.
I agree with your config location of "admin/config/people", though I think it would make sense to name it after your module, I think that's conventional. "admin/config/people/username_prefixes" (or perhaps "username-prefixes") is where I would expect to find it. All in all, not a big deal, just my two cents.
I do think it makes sense to increase your maxlength on the prefixes, it would increase the possible use cases.
Double checked Coder and PAReview and it looks good to me.
I'm marking this RTBC because everything is fine. Granted this is a small module, but it's currently non existent functionality; seems odd to deny access because a useful module is too lean.
Comment #20
patrickd commentedYour project page is quite uninformative, please have a look at the tips for a great project page.
Got a config-page? -> set a "configure =" in your .info to the path
Your using variables but your not deleting them when uninstalling the module <- you should fix that before creating a release
But this module looks good enough for me to be promoted.
Thanks for your contribution!
I've promoted this module to a full project and now your able to create releases.
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.
Thanks to the dedicated reviewer(s) as well.
Comment #21.0
(not verified) commentedcorrected git url