Jump to content

Rapidswitch Bandwidth Module


Recommended Posts

Hi

if anyone resells Rapidswitch Dedi or VPS Servers here is a perfect little bandwidth graph tool you can add in to WHMCS.

 

firstly on the hosting plan for the Dedi/VPS add 2 custom fields:

 

rsbwid (Display Order 0)

rsbwkey (Display Order 1)

 

in rapidswitch control panel open the bandwidth graphs so u can see weekly/monthly etc. right click one of the images and go to properties. you can get the serverID and Bandwidth key from here. Set this on the clients hosting plan in the correct fields.

 

next open templates/YOUR-TEMPLATE/clientareaproductdetails.tpl

 

find the line that begins with

 

{$LANG.clientareaaccountaddons}

 

the line above paste:

 

{if $groupname eq "My Dedicated Server Group Name Goes Here"}

<p class="heading2">Bandwidth Graphs</p>

<table cellspacing="1" cellpadding="0" class="frame">

<tr>

<td><table width="100%" cellpadding="2">

<tr>

<td nowrap class="fieldarea"><strong>Total Usage:</strong></td>

<td width="100%"><strong></strong></td>

</tr>

</table>

<table border="0" cellpadding="0" cellspacing="5" class="frame">

<tr>

<td nowrap class="fieldarea">Last 4 Hours<br>(Updated every 1 minute): </td>

<td><div align="center"><img src="https://bandwidth.rapidswitch.com/BWGraph.aspx?serverid={$customfields.1.value}&graphkey={$customfields.2.value}&external=1&gd=newgraph1&timeperiod=4hour" /></div></td>

</tr>

<tr>

<td nowrap class="fieldarea">Last 24 Hours<br>(5 minute average): </td>

<td><div align="center"><img src="https://bandwidth.rapidswitch.com/BWGraph.aspx?serverid={$customfields.1.value}&graphkey={$customfields.2.value}&external=1&gd=newgraph1&timeperiod=1day" /></div></td>

</tr>

<tr>

<td nowrap class="fieldarea">Last 7 Days<br>(5 minute average): </td>

<td><div align="center"><img src="https://bandwidth.rapidswitch.com/BWGraph.aspx?serverid={$customfields.1.value}&graphkey={$customfields.2.value}&external=1&gd=newgraph1&timeperiod=1week" /></div></td>

</tr>

<tr>

<td nowrap class="fieldarea">Last Month<br>(5 minute average): </td>

<td><div align="center"><img src="https://bandwidth.rapidswitch.com/BWGraph.aspx?serverid={$customfields.1.value}&graphkey={$customfields.2.value}&external=1&gd=newgraph1&timeperiod=1month" /></div></td>

</tr>

<tr>

<td nowrap class="fieldarea">Yearly Graph<br>(1 Day average): </td>

<td><div align="center"><img src="https://bandwidth.rapidswitch.com/BWGraph.aspx?serverid={$customfields.1.value}&graphkey={$customfields.2.value}&external=1&gd=newgraph1&timeperiod=1year" /></div></td>

</tr>

</table></td>

</tr>

</table>

{/if}

 

replace My Dedicated Server Group Name Goes Here with the product group name

Edited by cyberhostpro
Link to comment
Share on other sites

Just found a small problem ;)

 

I have dedicated servers and VPS servers in two different groups namely "Dedicated Servers" and "VPS Servers"

 

Now I though I could just update the template by adding a second table with a switch for VPS servers instead but it breaks the script by duplicating the product details.

 

Any ideas?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated