PDA

View Full Version : Adding phrases to specific groups e.g error messages


richy96
04-06-2011, 08:00 PM
Hi
OK another quick question

When i add a phrase they appear to go into 'custom phrases'

How do I select other groups when I add the phrase

For example the below didn't work

I added a phrase you_did_not_select_any_unread_comments

Phrase added successfully (it went into custom phrases)



in my php code

standard_error(fetch_error('you_did_not_select_any _unread_comments'));


result:

Could not find phrase 'you_did_not_select_any_unread_comments'


I suspect this is because the phrase is in the wrong group, but I can't see how to add it to the right one (without taking some drastic action database wise :p). It seems basic enough what I am trying to do - what's the problem ? :erm:

richy96
04-07-2011, 08:42 PM
anybody?

or has it asked been asked a zillion times before and I simply didn't find it on my forum search

kh99
04-07-2011, 09:35 PM
Did you choose "Error Messages" in the "Phrase Type" drop-down menu when you added the phrase? I think in general a phrase that's used by a page should be a type that's pre-loaded by including the name in the $phrasegroups array, and phrases used as error messages should be in type "Error Messages" (which doesn't have to be included in $phrasegroups). (Or at least this is what I was able to work out by looking at the code for a bit - I'm sure someone will correct me if I'm wrong :))

richy96
04-11-2011, 12:35 PM
Such a simple thing!

cheers kh99 :)