Jump to content

Homepage Panels Hook


Terra

Recommended Posts

Hi everyone,

 

I'm creating new homepage panels via an action hook, but I'm unsure how I can achieve this:

 

1. Check if client has unpaid invoices

2. If client has unpaid invoices, provide link to page with unpaid invoice(s)

 

How can I get the client's invoice data in a hook? Do I need to run my own db query or is the data accessible to me in some form?

 

Advice appreciated, Edith

Link to comment
Share on other sites

On a different note, the documentation on changing existing panels appears very poor.

 

This has worked for me to change sort order & colour on the existing domain registration box:

 

#We change the sort order and colour

if (!is_null($homePagePanels->getChild('Register a New Domain'))) {

$register = $homePagePanels->getChild('Register a New Domain');

$register->setOrder('300');

$register->setExtras(array(

'color' => 'magenta'

));

}

 

Hope this helps anyone else updating their homepanels!

 

PS: Similar to the query raised here https://forum.whmcs.com/showthread.php?104951-Updating-default-panel-colors-on-client-area-homepage , but as the thread is over 180 days old, it can't be updated.

Link to comment
Share on other sites

On a different note, the documentation on changing existing panels appears very poor.

PS: Similar to the query raised here https://forum.whmcs.com/showthread.php?104951-Updating-default-panel-colors-on-client-area-homepage , but as the thread is over 180 days old, it can't be updated.

lol - that was when v6 had been launched with very poor documentation and we were all fumbling in the dark trying to figure out how things work... the documentation hasn't improved, but we know more now. :)

 

don't forget that you don't have to stick with the 20+ panel colours defined by WHMCS - you can use your own... you just need to define it first in custom.css :idea:

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