Jump to content
MikeDVB

WHMCS 5.0 Style Bar Widgets for Monthly Completed Orders and Monthly Income

Recommended Posts

I missed the old bar-style widgets from 5.0 when we moved to 5.1 so I originally adapted the 5.0 modules directly to 5.1. My adapted widgets quit working on 5.2 so I created new widgets from the ground up. I won't pretend I wrote the code myself, I simply took the "New Customers" report and the "Annual Income" reports and converted them into Widget format. Anybody with a basic understanding of PHP could likely do this in a few minutes but this saves you the time.

 

The source isn't encoded, you're welcome to modify/improve/redistribute. If you do make an upgrade/change I would appreciate you posting it in this thread so your changes can possibly be combined into the original.

 

Here's a screen-shot (click for a larger image):

overview-widgets-whmcs-small.png

 

It can be downloaded from here: http://www.mddhosting.com/files/bar_widgets_5214.tar.gz

 

Installation of the module is the same as any other set of widgets - the .tar.gz contains "annual_orders_bars.php" and "annual_overview_bars.php" which you would simply place in your /whmcs/modules/widgets folder. Once you've done this you can activate the widgets for whoever you wish via WHMS -> Setup -> Administrator Roles (widget options are at the very bottom of each role).

 

This is only tested with 5.2.1, however, if you try it on 5.1.X do post and let me know if it works for you if you don't mind.

Edited by Infopro
Updated link to download by request

Share this post


Link to post
Share on other sites

I added the legend on the left side of the graphs, it now says "Default Currency" and "Number of Orders".

Share this post


Link to post
Share on other sites

Can you increase the width of the bar as we had in the past. I mean the length of the bar is OK but the width is less. Can you increase it, it will look very beautiful by this.

Share this post


Link to post
Share on other sites

It just uses the built in graph function with whmcs. I'm not sure if there is an option for bar width, I'll have to look into it but don't hold your breath.

Share this post


Link to post
Share on other sites

Indeed, it should work with all new versions until they change something major with widgets, but I do appreciate the update/feedback :).

Share this post


Link to post
Share on other sites

Not sure, I haven't messed with it much [been too busy]. If you modify it for a wider bar and the modification affects no other parts of WHMCS - feel free to make the modification and upload it here.

Share this post


Link to post
Share on other sites

Hi mike, looking into this furter, google visualisations do not support this as the bars are dynamically created according to the number of bars needed and the width of the area they are contained into, There is however a way to do this with jquery so i will make a modification and get it up later on with screen shots. Its on my devbox so i will have to fake some data to show the bars but i can do it.

Share this post


Link to post
Share on other sites
Hi mike, looking into this furter, google visualisations do not support this as the bars are dynamically created according to the number of bars needed and the width of the area they are contained into, There is however a way to do this with jquery so i will make a modification and get it up later on with screen shots. Its on my devbox so i will have to fake some data to show the bars but i can do it.

 

 

I am not an expert in this field, so I am not not going to modify anything. If you make any modification, please share it. Thanks MikeDVB and CDJ Hosting

Share this post


Link to post
Share on other sites

These appear to have broken, now display "a[mc] is not a function" in the box.

The default ones function fine (boy do I miss these bar style ones though)

 

Will stare at the code later, hopefully someone may be able to assist prior to that though!!

Share this post


Link to post
Share on other sites
These appear to have broken under the 5.2.14 update, now display "a[mc] is not a function" in the box.

The default ones function fine (boy do I miss these bar style ones though)

 

Will stare at the code later, hopefully someone may be able to assist prior to that though!!

 

In chrome: Object 2012 has no method 'split'

Share this post


Link to post
Share on other sites

Yep, Google broke this - since I use it every day I'll be doing what I can to fix it but ultimately it does rely upon some resources provided by WHMCS.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines