The attached patch adds some functionality which allows "included" poll modes to provide theme functions for outputting the result page.

The problem with the existing system is you can either theme individual bars or the entire pre-rendered chart. You cant intercept the raw-data at theme level to change the way the chart as a whole is represented. This makes custom integration with something like the Google Chart API pretty much impossible...

This patch, as I said, allows modes to define additionaal theme hooks - in this case Binary and Ranking both get their own theme function for outputting a chart. The theme function takes an array of data - each row in the array is essentially the arguments you'd pass through to theme_advpoll_bar

I'd really appreciate this getting committed as it'd make a developers life LOT easier. I'd also appreciate any feedback or improvements you think could make this better.

CommentFileSizeAuthor
advpoll_improved_theming.patch4.96 KBnicholasthompson

Comments

ChrisKennedy’s picture

Code looks nice & clean; don't have time to test but if it works & makes things better for developers/themers it sounds great to me. Cleaning up advpoll theming has been on my to-do list for a long time but sadly haven't had time to really learn the d6 system yet.

gobinathm’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

D6 is EOL hence this issue won't be fixed (or) attended. So closing it.