Author Topic: [Quick Fix] Missing code for new theme. Here is a little help  (Read 1432 times)

0 Members and 1 Guest are viewing this topic.

Offline Patrick

  • 620
  • 17
  • Active Participant
  • *****
  • HBF Volunteer
Anyone who decided to use the new Modern client area theme which are probably many of you as it's quite nice. Kris again (as he did in the side panel theme when it was first made) forgot to include the "Available Credit" code in to the dashboard.  If your customers ever had credit, they had no where telling them just how much unless it was to be applied to an open invoice.

The code you need is this.

Code: [Select]
           
{if $acc_credit>0}
      <div class="greenbox">{$lang.credit}: <strong>{$acc_credit|price:$currency}</strong></div>
{/if}

You can place this code on line 18-19 of the dashboard.tpl file located in {template}/clientarea/dashboard.tpl

Now after you do that, it's a little big for this template in my opinion.  This next part is just added customization should you feel like you would like to modify the green div.
Now enter {template}/css/main.css line 3071 you will see a div tag .greenbox {.  Instead of complicating it, i'll just give you my modification to it which makes it a little cleaner.  Feel free to play with the settings if you know how.

Code: [Select]
.greenbox {
    margin-bottom:20px;
    background: #e3f89d;
    border:1px solid #c7ee4c;
    color:#537113;
    padding:5px 5px 8px;
}

Hopefully this helps those of you looking to add this
« Last Edit: May 15, 2013, 02:53:29 AM by Lawrence »
Patrick - Forum Rules
Insanity: doing the same thing over and over again and expecting different results. - Albert Einstein

Offline Lawrence

  • 574
  • 22
  • Community Manager
  • Active Participant
  • *****
    • Lawrence Wright
Re: Missing code for new theme. Here is a little help
« Reply #1 on: May 13, 2013, 11:54:10 PM »
Very helpful! I was about to update to the new theme, and I have a lot of clients with credit balances. Thanks Pat, saved me a few tickets. :)
Skype: sociallarry | AIM: larry.aim@aim.com | Forum Rules & Information

These forums are hosted by me with no intentions to ever monetize them. These forums are here solely for the benfit of the HostBill community.

Offline Patrick

  • 620
  • 17
  • Active Participant
  • *****
  • HBF Volunteer
Re: Missing code for new theme. Here is a little help
« Reply #2 on: May 14, 2013, 12:57:46 AM »
I'm glad.  Anything that free's up the helpdesk is a win in any category :)
Patrick - Forum Rules
Insanity: doing the same thing over and over again and expecting different results. - Albert Einstein

Offline Lawrence

  • 574
  • 22
  • Community Manager
  • Active Participant
  • *****
    • Lawrence Wright
Re: [Quick Fix] Missing code for new theme. Here is a little help
« Reply #3 on: May 15, 2013, 05:10:30 AM »
Just applied your fix, and worked like a charm. Thanks Patrick!
Skype: sociallarry | AIM: larry.aim@aim.com | Forum Rules & Information

These forums are hosted by me with no intentions to ever monetize them. These forums are here solely for the benfit of the HostBill community.

Offline tallship

  • 619
  • 19
  • Active Participant
  • *****
  • Manager Network Services
    • Skype - tallship
    • Business Internet and Telephony since 1985.
Re: [Quick Fix] Missing code for new theme. Here is a little help
« Reply #4 on: May 15, 2013, 02:53:08 PM »
This is for the new theme released in 4.5.6?


I hadn't actually upgraded yet from last week but I think I'll do that now since I haven't seen any showstoppers yet :)
Bradley D. Thornton - Manager Network Services, NorthTech Computer   TEL: +1.310.388.9469 (US) | +44.203.318.2755 (UK) | +61.390.088.072 (AU) | +41.43.508.05.10 (CH)
Registered Linux User #190795 - "Ask Bill why the string in [MS-DOS] function 9 is terminated by a dollar sign. Ask him, because he can't answer. Only I know that." - Dr. Gary Kildall.

Offline Lawrence

  • 574
  • 22
  • Community Manager
  • Active Participant
  • *****
    • Lawrence Wright
Re: [Quick Fix] Missing code for new theme. Here is a little help
« Reply #5 on: May 15, 2013, 05:52:20 PM »
There're a few theme issues, but for the most part many easily correctable. Many of the issues reside in the order pages, but that's primarily because the order pages are all coded differently and only work with certain client portal themes. I just adjust as necessary.

I just don't like adjusting them every update because I replace all theme changes during updates. I wouldn't want to make a backup of a theme and there be a valid security fix. When a change is made, I take a note of it and re-apply it in the proper files.

Little things like what Patrick's post fixes are too often overlooked during new releases, so hopefully it improves overtime.
Skype: sociallarry | AIM: larry.aim@aim.com | Forum Rules & Information

These forums are hosted by me with no intentions to ever monetize them. These forums are here solely for the benfit of the HostBill community.