Myke623
Well-known member
A personal goal of mine is to write my first add-on, and I have a number of existing projects from which to start. They're actually conversions of php/mysql projects I had created years ago. The question I basically want to ask is, if I cannot process multiple parameters from the URL to/from the add-on, what are some other approaches I could consider?
To better understand my problem, here's some background on one of the projects. I run a website for a competitive fighting game (the Virtua Fighter series), and provide the command list (or moves list) for all the playable characters as a resource:
http://virtuafighter.com/commands/
It's a mysql back-end, with a php front-end. In the header, users may select the game version and character (from that game) of interest. As well as displaying the character's moves, there is some filtering functionality accessed by clicking on the "Filter" link to expose a mini form from. Additionally, users can sort on any column by clicking on the column header.
The simple URL for a character's command list would be:
http://virtuafighter.com/commands/index.php?chara=akira&ver=5fsa
Parameters required:
But if you've got filtering and sorting applied, then the URL gets much busier:
http://virtuafighter.com/commands/index.php?chara=akira&ver=5fsa&order=dmg&sort=desc&q=d&c=gt&v=21
Parameters required:
I'm still very much in the learning phase of XenForo add-ons, but in reading the thread URL's with multiple parameters it appears as though I would have great difficulty using one of the resolveAction* to handle this kind of thing, assuming it were even possible?
One alternative I've yet to explore is to relegate all the filtering/sorting functions to be javascript based, which would only leave me with the Game Version and Character parameters to process. The downside would be that users couldn't permalink to customised views with filters/sort applied.
Would greatly appreciate any thoughts on how I could approach this.
To better understand my problem, here's some background on one of the projects. I run a website for a competitive fighting game (the Virtua Fighter series), and provide the command list (or moves list) for all the playable characters as a resource:
http://virtuafighter.com/commands/
It's a mysql back-end, with a php front-end. In the header, users may select the game version and character (from that game) of interest. As well as displaying the character's moves, there is some filtering functionality accessed by clicking on the "Filter" link to expose a mini form from. Additionally, users can sort on any column by clicking on the column header.
The simple URL for a character's command list would be:
http://virtuafighter.com/commands/index.php?chara=akira&ver=5fsa
Parameters required:
- Character (chara)
- Game version (ver)
But if you've got filtering and sorting applied, then the URL gets much busier:
http://virtuafighter.com/commands/index.php?chara=akira&ver=5fsa&order=dmg&sort=desc&q=d&c=gt&v=21
Parameters required:
- Character (chara)
- Game version (ver)
- Sort Order (order)
- Sort Direction (sort)
- Query type (q)
- Comparitor (c)
- Value (v)
I'm still very much in the learning phase of XenForo add-ons, but in reading the thread URL's with multiple parameters it appears as though I would have great difficulty using one of the resolveAction* to handle this kind of thing, assuming it were even possible?
One alternative I've yet to explore is to relegate all the filtering/sorting functions to be javascript based, which would only leave me with the Game Version and Character parameters to process. The downside would be that users couldn't permalink to customised views with filters/sort applied.
Would greatly appreciate any thoughts on how I could approach this.