Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » Help text task_id
Help text task_id [message #1645] Mon, 15 September 2008 08:58 Go to next message
gpatti is currently offline  gpatti
Messages: 283
Registered: August 2008
Senior Member
I'm trying my hand at building some help screens and I've noticed that the help screens display a default text of "Help text for <task_id>" at the top of the main body.

I have used the language facilities to display proper task descriptions on the screens, but can't figure out how I would change the default behaviour at the top of the help screens to show the task description rather than the task_id.

Is this possible?
Re: Help text task_id [message #1646 is a reply to message #1645] Mon, 15 September 2008 11:22 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2363
Registered: April 2006
Location: Surrey, UK
Senior Member
It is possible, but I don't do it. I deliberately use the task_id as this uniquely identifies the task in question. Task descriptions may not be all that unique and could therefore be confusing.

If you want to use descriptions you could try adding the following line in the help.php script:
$help_id = getLanguageText($help_id);

This would translate the task_id into the relevant description.


Re: Help text task_id [message #1647 is a reply to message #1645] Mon, 15 September 2008 11:34 Go to previous messageGo to next message
gpatti is currently offline  gpatti
Messages: 283
Registered: August 2008
Senior Member
Did you mean in the std.help.inc rather than in help.php?

This works, although it would then look for a text name using the description rather than the task_id - and I agree with you that this would then be very confusing for the person maintaining the system.

I chose to modify the std.help.inc with two lines:

$help_desc = getLanguageText($help_id);
$title = getLanguageText('sys0099', $help_desc); // "Help text for '$help_desc'"

This way the translation only appears on the text on the screen rather than the help text file itself. I like this approach because then the help screen uses the language translations in exactly the same way as all your other translations.

I'm not comfortable that I've modified std.help.inc though as this change will presumably get overwritten if/when I upgrade?
Re: Help text task_id [message #1648 is a reply to message #1647] Mon, 15 September 2008 13:13 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2363
Registered: April 2006
Location: Surrey, UK
Senior Member
Sorry, I did mean std.help.inc and not help.php

If you change your copy of std.help.inc then it will be overwritten when you upgrade. Perhaps it would be better if I changed it to include both the id and description in the heading, in which case that would cover all the options.


Re: Help text task_id [message #1652 is a reply to message #1645] Tue, 16 September 2008 04:38 Go to previous messageGo to next message
gpatti is currently offline  gpatti
Messages: 283
Registered: August 2008
Senior Member
Tony, I thought my solution covered both options anyway...
If a translation is provided in language_text.php then it is used - and what is displayed to the end user is consistent across everything they see. If no translation is provided, then the task_id is used. From a developer's perspective the actual help file is still named using the task_id - so is easy to identify for maintenance.

I prefer not to display anything to the end user that is not 'plain English' so would prefer a solution that allows this.

Graham
Re: Help text task_id [message #1654 is a reply to message #1652] Tue, 16 September 2008 04:54 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2363
Registered: April 2006
Location: Surrey, UK
Senior Member
You also have to remember that it is possible for several tasks to have the same or similar descriptions, so when reporting problems it is vitally important to easily distinguish EXACTLY which task they are talking about.

Besides, if the heading on the help page contains both the task_id and the description would that cause a problem? Would it cause any confusion?


Re: Help text task_id [message #1656 is a reply to message #1645] Tue, 16 September 2008 05:01 Go to previous messageGo to next message
gpatti is currently offline  gpatti
Messages: 283
Registered: August 2008
Senior Member
Yes I agree that it is necessary to be able to identify pages easily.

From a personal preference I would like to do something like put the task_id in a footer, out of the way, or something.

I suppose ultimately it would be nice to have some more flexibility with the layout, as you have with the other areas of the framework. That might be something for the future perhaps.
Re: Help text task_id [message #1658 is a reply to message #1656] Tue, 16 September 2008 05:14 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2363
Registered: April 2006
Location: Surrey, UK
Senior Member
I think that there is enough flexibilty already. Only the heading has a fixed format - the rest of the page is totally customisable.

Re: Help text task_id [message #1659 is a reply to message #1645] Tue, 16 September 2008 05:17 Go to previous message
gpatti is currently offline  gpatti
Messages: 283
Registered: August 2008
Senior Member
Yes I'm sorry - I was being too general. My comments should have just referred to the header.
Previous Topic: Condition in $where string is being lost
Next Topic: Borders in a PDF body
Goto Forum:
  


Current Time: Thu Oct 31 19:25:31 EDT 2024

Total time taken to generate the page: 0.01350 seconds