This simple patch makes it possible for node-type modules to show "Create blog entry" (for example) links to the administer by modules page.

This is marked critical, as it blocks http://drupal.org/node/92992 which in turn needs to get taken care of before translators can start translating stuff.

CommentFileSizeAuthor
#4 create-node_0.patch1015 byteswebchick
#1 create-node.patch1005 byteswebchick

Comments

webchick’s picture

StatusFileSize
new1005 bytes

Ahem. Thanks RobRoy. ;)

RobRoy’s picture

Can you think of a case where drupal_strtolower() might screw with the readable node name? I know without it we'd have "Create Blog entry", but what if a user has created a node called "TPS report" then it would be "Create tps report". Not a huge deal, but it's worth thinking about leaving PHP out of this strtolower game even if we sacrifice Sentence cap.

Besides the above unimportant issue, I tried this patch and it adds some nice functionality to that admin page. Good work webchick! 5.0 is gonna be sweet!

webchick’s picture

Status: Needs review » Needs work

Ah, hm. That's a good point.

I was trying to remove inconsistency with links like "Create Poll" but you're right. We should leave those alone.

One sec while I post another patch and then I'll fix that.

webchick’s picture

Status: Needs work » Needs review
StatusFileSize
new1015 bytes

Re-rolled, with drupal_strtolower removed.

Now the links read like:

"Create Blog entry"

"Create Forum topic"

but at least it's "by design" now. ;)

merlinofchaos’s picture

+1

Definitely a good addition.

dries’s picture

It should read "Create blog entry", not "Create Blog entry".

webchick’s picture

Dries: that would be the patch in #1.

But what about RobRoy's point in #2?

If I create a new node type called "ABC Company invoice", then the drupal_strtolower() would make it "abc company invoice," which is incorrect.

Similarly, I can't change hook_node_info to spit out "book page" instead because then it would be inconsistent with the "Create content" menu item.

Any ideas?

drumm’s picture

Status: Needs review » Needs work

Capitalised or not, this needs to show what the type is currently named in configurable content types, not the default.

dries’s picture

Priority: Critical » Normal

This is not critical. Drupal works fine without this patch.

mile23’s picture

Status: Needs work » Closed (won't fix)

Dries should have marked this 'won't fix.' :-)