Bestrafung Posted August 26, 2014 Share Posted August 26, 2014 I have created a custom WHMCS integration based on my website's theme using the documentation provided by the WHMCS team. I've customized mostly everything but have one small issue. On the client area home page the ticket statuses seem to only have a span to set the color. Would it be possible to add more CSS to the ticket status instead of just a simple color declaration? I mostly just want to change the font weight and add a text shadow. I'm sure it's a simple problem to fix but I'm not sure what file generates the span so any pointers would be appreciated. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 26, 2014 Share Posted August 26, 2014 I don't think that you can do this by modifying any setting in the Admin Area, but you should be able to by modifying the client area homepage template (clientareahome.tpl) - the ticket status is shown using... {$ticket.status} what you can do is modify this by replacing an existing value... for example, I think the default color for "Open" is #779500, so if you wanted to add bold to this, you would do the following... {$ticket.status|replace:'color:#779500':'color:#779500;font-weight:bold;'} you can also use multiple replaces in the same line - so if we want to add a red text shadow to "Answered" (#000000) as well, we would use... {$ticket.status|replace:'color:#779500':'color:#779500;font-weight:bold;'|replace:'color:#000000':'color:#000000;text-shadow:2px 2px 4px #ff0000'} as long as you aren't using the same colors for different ticket statuses, this should work (though even if you are, its probably simple enough to code around if required). 0 Quote Link to comment Share on other sites More sharing options...
Bestrafung Posted August 27, 2014 Author Share Posted August 27, 2014 I don't think that you can do this by modifying any setting in the Admin Area, but you should be able to by modifying the client area homepage template (clientareahome.tpl) - the ticket status is shown using... {$ticket.status} what you can do is modify this by replacing an existing value... for example, I think the default color for "Open" is #779500, so if you wanted to add bold to this, you would do the following... {$ticket.status|replace:'color:#779500':'color:#779500;font-weight:bold;'} you can also use multiple replaces in the same line - so if we want to add a red text shadow to "Answered" (#000000) as well, we would use... {$ticket.status|replace:'color:#779500':'color:#779500;font-weight:bold;'|replace:'color:#000000':'color:#000000;text-shadow:2px 2px 4px #ff0000'} as long as you aren't using the same colors for different ticket statuses, this should work (though even if you are, its probably simple enough to code around if required). Thank you for the reply. I wasn't able to get that working for some reason but it was probably just a syntax issue. I achieved the same result with a CSS rule which makes for less code. In a somewhat unrelated note, if anyone needs to add color to the priorities I figured that out as well. Change: {$ticket.urgency} To: <span class="{if $ticket.urgency === "High"}textred{elseif $ticket.urgency === "Medium"}textgreen{/if}">{$ticket.urgency}</span> Then add your CSS rules for .textred and .textgreen or change the names as needed. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.