View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0027992||mantisbt||documentation||public||2021-02-24 15:14||2021-03-07 18:28|
|Target Version||2.25.0||Fixed in Version||2.25.0|
|Summary||0027992: Remove helper_alternate_class() calls from Developers Guide and document alternative|
I went to a plugin page and got a bunch of errors, "Deprecated functionality: "helper_alternate_class", use "CSS" instead."
I do not know what that means. I have a kind of vague idea from a lot of searching, but there are no specific examples. 0016471 says "This is not needed with modern CSS styled layouts." which is nice to know I guess? But not very specific about the hows and whys.
The Developers Guide example plugin code still calls that helper_alternate_class() function. It would be nice to update that with an example of what a "modern CSS styled layout" is when it's at home.
|Tags||No tags attached.|
Thanks for the heads up. Indeed the Developers' Guide should have been updated, sorry about that.
What this means, is that the helper_alternate_class() function will be removed in a future version of Mantis; the deprecation message is there to inform administrators and plugin developers that they need to do something about this before it becomes an actual error.
Until the documentation has been revised, you can have a look at one of the bundled plug-ins for reference (e.g. MantisCoreFormatting) and more specifically how it was updated to remove the helper_alternate_class() function, as well as changesets attached to 0016471.
This is how the Developers' Guide example plugin looks like in MantisBT 2.24.4
I have revised the Example Plugin, which is now available as a standalone repo: https://github.com/mantisbt-plugins/Example
The attached screenshot shows how it looks like now.
MantisBT: master 3868bdb9
2021-02-26 19:00:07Details Diff
|Doc: improve Dev Guide Plugins section
- General revision and various improvements to the "Building a Plugin"
- Remove references to deprecated helper_alternate_class() function
- remove the "Example Plugin Source Listing" section, code is now hosted
in a GitHub repository in the mantisbt-plugins organization 
- Improve the Example Plugin; for details, see 
Fixes 0027992, 0027993
|mod - docbook/Developers_Guide/en-US/Plugins.xml||Diff File|
|mod - docbook/Developers_Guide/en-US/Plugins_Building.xml||Diff File|
|rm - docbook/Developers_Guide/en-US/Plugins_Building_Source.xml||Diff File|