Jump to content

Create Alert or Panel with PHP


gbotica

Recommended Posts

Regarding the creation of Alert and Panel elements for the Six theme, as described here:

 

http://docs.whmcs.com/Customising_the_Six_Theme#Alerts

 

Is there a way to create these elements with PHP via a hook (i.e. without needing to edit templates?)

 

Something like:

 

add_hook('ClientAreaPageAnnouncements', 1, function($vars) {

       // create an Alert or Panel for the Announcements page...

       );
   }
);

 

Presumably this would output to the top of the page?

 

Thanks in advance.

Link to comment
Share on other sites

Thanks for your response. I'm not trying to set a Alert Notification, rather the Alert and Panel elements as per:

 

http://docs.whmcs.com/Customising_the_Six_Theme#Alerts

 

There are template tags for outputting the blue notification to the page body and also a panel like on the homepage, for example:

 

{include file="$template/includes/panel.tpl" type="warning" headerTitle="Optional title goes here" bodyContent="Body content to display goes here" footerContent="Optional footer content goes here"}

 

Is there a way to create these inside a page hook?

 

Thanks for your help.

Link to comment
Share on other sites

Thanks for your response. I'm not trying to set a Alert Notification, rather the Alert and Panel elements as per:

 

http://docs.whmcs.com/Customising_the_Six_Theme#Alerts

 

There are template tags for outputting the blue notification to the page body and also a panel like on the homepage, for example:

 

{include file="$template/includes/panel.tpl" type="warning" headerTitle="Optional title goes here" bodyContent="Body content to display goes here" footerContent="Optional footer content goes here"}

 

Is there a way to create these inside a page hook?

 

Thanks for your help.

No it's only available to be included inside template files.

 

- - - Updated - - -

 

at least not by default, but you can edit your template to listen to ActionHooks and parse those messages!

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