User tests: Successful: Unsuccessful:
Previously com_config was getting help only from local file by reference key.
This PR added possibility to get help remotely by URL from language file, locally by key, remotely by URL provided in component settings and key.
Idea taken from com_categories code.
1) Install you component
2) Go to config page of you component
3) Try to press "Help" button. You will arrive to Joomla help server
4) Apply the patch
5) Add to lang file constant:
COM_COMPONENTNAME_HELP_URL="https://example/{keyref}.html"
6) Try to press "Help" and you will arrive to page like:
https://example/JHELP_COMPONENTS_COM_COMPONENTNAME_OPTIONS.html
You can use lang file to override JHELP_COMPONENTS_COM_COMPONENTNAME_OPTIONS with something user friendly.
7) Remove COM_COMPONENTNAME_HELP_URL from lang file.
8) Add field "helpURL" to your component config.xml and insert there same url (https://example/{keyref}.html)
9) Try to press "Help" button. Result should be the same as in point 6.
10) Clean helpURL field and save configs.
11) Try to press "Help" button. You should get local help page.
Yes. In this PR also added possibility to use predefined COM_COMPONENT_HELP_URL lang constant. So there is no need to have helpURL field in config.xml
Labels |
Added:
?
|
Labels |
Added:
?
|
If I'm not mistaken the helpURL
parameter has been supported in Joomla for some time, so this PR just seems like duplicating that logic and not offering anything "better" (subjective measurement).
helpURL
still present and supported. This PR just adds one more way to define it. In my mind, help URL should be predefined by developer, not configured by end user. I think it would be great to add something like <helpServer>
tag to manifest in the future.
If it's a hidden parameter then the user won't be able to mess with it unless they hack the database.
I'm not trying to shoot down the idea, honestly, but one of my gripes about Joomla right now is there are a lot of ways to accomplish one task, for better or worse. Instead of standardizing on a common behavior (if you want to have a custom help screen set, define <input name="helpURL" type="hidden" />
in your component's config), this adds another way to accomplish the same thing. As a newbie developer it makes me question "which way is right?" and as "the grumpy old guy" it just annoys me when standard behaviors aren't standardized.
Sounds very reasonable! Glad to reach consensus.
Category | ⇒ | Administration |
Status | New | ⇒ | Pending |
I am not sure I follow, but this can be closed?
Category | Administration | ⇒ | Administration Components |
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-08-01 09:50:26 |
Closed_By | ⇒ | zero-24 |
Closing as requested
Set to "closed" on behalf of @zero-24 by The JTracker Application at issues.joomla.org/joomla-cms/7632
Have you seen #6639
On 5 August 2015 at 13:22, dimonzz notifications@github.com wrote:
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/