On 2013-10-24 00:30, Paul Gear wrote:
On 10/24/2013 08:54 AM, Tom Laermans wrote: On 24/10/2013 00:34, Paul Gear wrote: On 10/24/2013 07:46 AM, Adam Armstrong wrote: On 2013-10-23 22:40, Paul Gear wrote: ... I made the micrographs patch and did some tweaks on the minigraphs at the same time. I'm happy to work on a patch for you if you can explain it a little more for me. Would something that allows you to specify minigraphs like this work?
$config['frontpage']['minigraphs']['ids'] = "19418/19496,custom_traffic,Dist76-01.AMS4;12345,port_bits,NAME"; ... Define rows and graphs within rows as arrays containing arrays of attributes, that way you don't even need to parse it.
Look at how we build the navbars from an array, this is probably how it should be done.
I was merely preserving backwards compatibility with what was there. If we use a different key instead of ids, then we could do it without breaking compatibility with existing configs.
Or would you rather I just chuck the whole thing and tell people who use it to update their configs? http://be2.php.net/is_array ?
But then you have to keep the old code next to the new code. And we all know how much Adam loves cruft.
But doing that would be my preference, since it's nice to users.
I hope you now have some small amount of understanding about why I didn't want to commit the patch in the first place, and why we tend to view contributions as often more of a burden than a help.
An analogy I've often made is that "donating" code to an open source project is like "donating" a child to an orphanage. Thankfully in this case, the original deadbeat dad has come back to clean up the poop.
My guess is that 3 people are using this, and they would be happy to rewrite their configuration parts if it meant that it works better. They'd have to be pretty adventurous to be using it in the first place, after all!
adam.