[development] A module to change node creation confirmation messages

Shai Gluskin shai at content2zero.com
Mon Jan 25 02:30:03 UTC 2010


I think the module (or sub-module within util) as suggested by James is a
good idea. The string overrides module works well for simple strings. But if
there are tokens in the t() function, it is impossible to use the GUI alone;
you must inspect the code and find the t() function in question.

I think that providing bits of commonly needed functionality via modules is
exactly what Drupal's modular system is about. And I do believe the use-case
presented here related to the dsm after a node save is a common one that
people would want to change. I just did the other day.

I'd also note that James seems fairly pumped to do this work; why discourage
him? Of course we want to minimize duplication. But there is no duplication
here. String overrides: dig through the code to find the string you want to
override. James proposal: create functionality via the GUI for replacing a
specific string, commonly encountered that is harder to override because it
has a variable in it. This is apples and oranges. No duplication at all.

My vote is to encourage James to write it.

Shai

On Sun, Jan 24, 2010 at 9:16 PM, Darth Clue <darthclue at gmail.com> wrote:

> I think what may be missing from string overrides is the knowledge of what
> string to use to make the override work.  Not sure if this really should be
> an issue as if you are changing strings you should know what you're doing.
> Especially since you could be impacting things like locale or other modules
> that depend on those strings.
>
> Jonathan
>
> nan wich wrote:
>
>> If StringOverrides does this - and I trust Dave - then by all means use
>> that. This is not something we need to have a duplicate module for.
>>
>> /*Nancy E. Wichmann, PMP*/
>>
>> Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L.
>> King, Jr.
>>
>>
>>
>> *From:* Dave Reid <dave at davereid.net>
>> *To:* development at drupal..org
>> *Sent:* Sun, January 24, 2010 8:16:00 PM
>> *Subject:* Re: [development] A module to change node creation confirmation
>> messages
>>
>> Again, String Overrides module already does this and does it well. It
>> doesn't need to go in Util or anywhere else.
>>
>> On 1/24/10, James Benstead <james.benstead at gmail.com <mailto:
>> james.benstead at gmail.com>> wrote:
>> > 2010/1/24 Domenic Santangelo <domenics at gmail.com <mailto:
>> domenics at gmail..com>>
>>
>> >
>> >> You can still change on-the-fly strings. Just look at what's inside t()
>> >> for
>> >> a clue as to what to override.
>> >>
>> >> t('@type %title has been created.', $t_args)
>> >>
>> >> override "'@type %title has been created." to whatever.
>> >>
>> >
>> > I never knew that - that's really useful! However, I still think writing
>> an
>> > addition to the Utility module that will do this through the GUI would
>> be
>> > useful for site builders who would never see this code. I'd best get
>> > cracking...
>> >
>> >
>> >>
>> >> -D
>> >>
>> >>
>> >> On Jan 24, 2010, at 3:13 PM, James Benstead wrote:
>> >>
>> >> I really don't think String Overrides does do this - at least, I've
>> never
>> >> been able to get it to change this particular string, I think because
>> it's
>> >> generated on the fly.
>> >>
>> >> On 24 January 2010 21:03, Darth Clue <darthclue at gmail.com <mailto:
>> darthclue at gmail.com>> wrote:
>> >>
>> >>> Jim,
>> >>>
>> >>> String Overrides ( http://drupal.org/project/stringoverrides ) will
>> do
>> >>> that. I don't recall if it has token support.
>> >>>
>> >>> Jonathan
>> >>>
>> >>>
>> >>> James Benstead wrote:
>> >>>
>> >>>> Currently the message that is shown to a user when a node is created
>> -
>> >>>> @type %title has been created. - seems to be hardcoded into
>> node.module.
>> >>>> I've just helped someone on IRC change this, but it's quite a
>> >>>> long-winded
>> >>>> process. Would a module be welcome? It would unset the message set on
>> >>>> line
>> >>>> 463 of node.pages.inc, and allow the user to set their own message on
>> a
>> >>>> per-nodetype basis. Integrated with Token and CCK.
>> >>>>
>> >>>> --Jim
>> >>>> --
>> >>>> My IM and Skype details are at http://state68.com/contact.
>> >>>> --
>> >>>> At some point I'll probably tell you to buy The Borrible Trilogy.
>> >>>> The simplest way to shut me up is to buy it now - search Amazon.
>> >>>>
>> >>>
>> >>>
>> >>
>> >>
>> >
>>
>>
>> --
>> Dave Reid
>> dave at davereid.net <mailto:dave at davereid.net>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20100124/642ac9a4/attachment-0001.html 


More information about the development mailing list