Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

bandwidth left tag

Discussion in 'User Experience' started by blaze64, Feb 9, 2003.

  1. blaze64

    blaze64 Well-Known Member

    Joined:
    Feb 5, 2003
    Messages:
    159
    Likes Received:
    0
    Trophy Points:
    166
    Has anyone found out the correct tag for bandwidth remaining? The
    &cpanel print=&$CPDATA{'BWLIMIT'}&&

    seems to work great but it displays bites....I would rather have MB.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,574
    Likes Received:
    3
    Trophy Points:
    343
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    &SCRIPT&
    f = &cpanel print=&$CPDATA{'BWLIMIT'}&& / 1048576 / 1000;
    document.write ( String(f) +& GIG& );
    &/SCRIPT&

    This works perfectly.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. blaze64

    blaze64 Well-Known Member

    Joined:
    Feb 5, 2003
    Messages:
    159
    Likes Received:
    0
    Trophy Points:
    166
    Worked great! Thanks!

    Do you happen to know how to make it read MB ONLY? It reads GIGs now....

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. nieve

    nieve Registered

    Joined:
    Jan 23, 2003
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    151
    &SCRIPT&
    f = &cpanel print=&$CPDATA{'BWLIMIT'}&& / 1048576;
    document.write ( String(f) +& MB& );
    &/SCRIPT&
     
  5. blaze64

    blaze64 Well-Known Member

    Joined:
    Feb 5, 2003
    Messages:
    159
    Likes Received:
    0
    Trophy Points:
    166
    That worked well also! Great!

    Now, this tells displays how much bandwidth your account is allowed. Is there a way for it to show

    1000 mb (per month)
    200 mb (used already)
    -------------------------
    800 mb (amount left) &----- HOW DO YOU DISPLAY ONLY THIS?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. nieve

    nieve Registered

    Joined:
    Jan 23, 2003
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    151
    &SCRIPT&
    f = &cpanel print=&$CPDATA{'BWLIMIT'}&& / 1048576;
    g = f - &cpanel Stats=&countbandwidth()&&;
    document.write ( String(g) +& MB& );
    &/SCRIPT&
     
  7. blaze64

    blaze64 Well-Known Member

    Joined:
    Feb 5, 2003
    Messages:
    159
    Likes Received:
    0
    Trophy Points:
    166
    YOU DA MAN! Thanks! Worked like a charm! Good Job!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    191
    Can somebody please write this again how it should be or tell me whether the following is correct?

    I'm not too good with coding....

    ---------------------
    Edit: Got it working. That was it. I'm proud of myself.:)
     
    #8 casey, Aug 17, 2003
    Last edited: Aug 17, 2003
  9. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    191
    By the way, you'll get a script error if the account has unlimited bandwidth. I just found that out. (It was my own account, so I just changed the limit).

    cPanel.net Support Ticket Number:
     
  10. GetWired

    GetWired Active Member

    Joined:
    Aug 4, 2003
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    156
    bump

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice