Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-16-2005, 07:41 AM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Sparkline graphing hack... I've built one, is there a demand for it to be published?

I've built a sparkline plugin named sparkplug.

Sparklines are documented here:
http://www.edwardtufte.com/bboard/q-...1OR&topic_id=1

And to give you an idea, mine look like this:


I have sparklines currently indicating:
* Forum stats on the home page
** Number of threads per day over the past month
** Number of posts per day over the past month
** Number of new users per day over the past month
* Member list and member info pages
** Number of posts per day over the past month by that user

It also accounts for style changes, and will modify the background colour accordingly.

Further, it has file caching built in to prevent any sparkline being generated twice within a 12 hour period. Worst case scenario is that a user gets an update once every 24 hours as I use 12 hours on the file based cache, and then add 12 hours to the expiry header of the image when we send it to the browser.

Anyhow... it works fine, but will need a little tidying if there is a demand for this kind of thing to be published... I'd also like a little peer review on the file cache side of things, namely, how to cope with errors.

I also haven't localised the tooltips/alt text of the images.

Take a look and let me know what you think.
Reply With Quote
  #2  
Old 10-06-2005, 01:35 PM
Bad Bunny's Avatar
Bad Bunny Bad Bunny is offline
 
Join Date: Apr 2002
Posts: 555
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by buro9
I've built a sparkline plugin named sparkplug.

Sparklines are documented here:
http://www.edwardtufte.com/bboard/q-...1OR&topic_id=1

And to give you an idea, mine look like this:


I have sparklines currently indicating:
* Forum stats on the home page
** Number of threads per day over the past month
** Number of posts per day over the past month
** Number of new users per day over the past month
* Member list and member info pages
** Number of posts per day over the past month by that user

It also accounts for style changes, and will modify the background colour accordingly.

Further, it has file caching built in to prevent any sparkline being generated twice within a 12 hour period. Worst case scenario is that a user gets an update once every 24 hours as I use 12 hours on the file based cache, and then add 12 hours to the expiry header of the image when we send it to the browser.

Anyhow... it works fine, but will need a little tidying if there is a demand for this kind of thing to be published... I'd also like a little peer review on the file cache side of things, namely, how to cope with errors.

I also haven't localised the tooltips/alt text of the images.

Take a look and let me know what you think.
It's interesting. I had no idea so much thought went into tiny graphs. I would be interested, but it looks like I am the only one. lol
Reply With Quote
  #3  
Old 10-06-2005, 02:21 PM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Bad Bunny
It's interesting. I had no idea so much thought went into tiny graphs. I would be interested, but it looks like I am the only one. lol
Well I'd taken them off my site when I upgraded.

I'm going to add them again soon... so I shall package it when I do.

It won't be a Plugin though, it will definately require uploading files... an Extension at the least.

Note though... the cached files can multiply wildly!
Reply With Quote
  #4  
Old 10-06-2005, 03:52 PM
Bad Bunny's Avatar
Bad Bunny Bad Bunny is offline
 
Join Date: Apr 2002
Posts: 555
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by buro9
Well I'd taken them off my site when I upgraded.

I'm going to add them again soon... so I shall package it when I do.

It won't be a Plugin though, it will definately require uploading files... an Extension at the least.

Note though... the cached files can multiply wildly!
hmmm
Extensions are fine. But I have grown lazy and don't like editing vb files anymore. lol
I even use plugin system for my own mods I do on my boards.
Reply With Quote
  #5  
Old 10-06-2005, 06:22 PM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Bad Bunny
hmmm
Extensions are fine. But I have grown lazy and don't like editing vb files anymore. lol
I even use plugin system for my own mods I do on my boards.
I loved the plugin system the first time I saw it. Then I installed loads and saw that it all ended up in the datastore and was bloating the database traffic for every page, whether or not that page needed the plugin or not.

I like the plugin system... but now I'm personally stripping out all PHP, placing it in the files in the right places or creating external files, and only using the product system to manage phrases, templates, settings, etc.

That's probably how I shall release it... as files to upload, and a product to install. I'll avoid PHP edits if I can... but if I do do them, they will be few and far between.
Reply With Quote
  #6  
Old 10-06-2005, 06:32 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I want this and I want it now, mister!

How's that for showing support?
Reply With Quote
  #7  
Old 10-06-2005, 06:41 PM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
I want this and I want it now, mister!

How's that for showing support?
Haha... I'm supposed to be packing to go see my girl in Sweden!

I'll do it next week

Actually... I might do it on mine this evening and then take care of packaging next week

Quote:
Originally Posted by buro9
Haha... I'm supposed to be packing to go see my girl in Sweden!

I'll do it next week

Actually... I might do it on mine this evening and then take care of packaging next week
Re-installed on mine, updated for 3.5.

It consists solely of file uploads and template edits at the moment, but then, I haven't yet moved the tooltips to phrases (can I be bothered? does anyone here really need a Product just to have tooltips localised?).

I've also adjusted it so that the forum home sparklines feature dots and text indicating:
In Red: Lowest value in the data
In Green: Highest value in the data
In Blue: Most recent value in the data

Finally... beware... if you have lots of styles, because alpha's do not work in .png's, I'm generating a new image for EACH UNIQUE BGCOLOR! This will simply multiply the number of images it has generated.

And erm... yeah, go have a look to see if you like:
http://www.bowlie.com/forum/

If you like, I'll package for Monday maybe... or Wednesday.
Reply With Quote
  #8  
Old 10-06-2005, 11:21 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh, sure! Torture us over some woman. I see how you are now.
Reply With Quote
  #9  
Old 10-07-2005, 12:33 PM
buro9 buro9 is offline
 
Join Date: Feb 2002
Location: London, UK
Posts: 585
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This appears to be working quite well... but I'm going to have a play and see if I can get PNG alpha's working rather than generate a new image per colour scheme.

Question: Would you rather have alpha's knowing they don't work in IE but do in FF, Safari, Opera... or would you rather have an image generated per unique background colour?
Reply With Quote
  #10  
Old 10-07-2005, 12:57 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I use IE so the pngs wouldn't do me any good.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:46 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04537 seconds
  • Memory Usage 2,268KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete