When opening the preferences, by default the first tab “Preferences” and the second accordion “Preferences” is opened. One can use the tab
URL parameter to select the initially open tab:
/prefs.php?tab=genConfig
/prefs.php?tab=feedConfig
/prefs.php?tab=filterConfig
/prefs.php?tab=labelConfig
/prefs.php?tab=userConfig
/prefs.php?tab=systemConfig
This is done via javascript in js/prefs.js
init_second_stage()
Unfortunately, there is currently no way to select the open accordion inside the tab. I need this for my plugin that does external oauth stuff and then redirects back to the preferences, showing the successful registration at the end.
Currently already the second accordion is opened. This is done by adding selected="true"
in the accordion’s HTML tab. So what’s needed in my eyes to make this work for other accordions is to
- transfer a
accordion
GET parameter from the initially calledprefs.php
tobackend.php
- do not set
selected="true"
in the default preferences accordion if the parameter is present - adjust my plugin to check if the accordion parameter is set to its name, and then print out
selected="true"
for its own accordion.
Here is a first patch that adds support for 1+2. What do you think?