Jump to content

Allow Plugin to Inject Messages [Html] for client Dashboard


Blesta Addons

Recommended Posts

As the title, it would be perfectly to allow plugins inject their own message in the client dashboard .

or add a a new Event that used for client dashboard, is something semilar to Structure event, the actual event inject a (html) in head or start/end body.

the idea is to add event/hook to client info box (start/end), left sidebar (start/end), right content (start/end). Wordpress and Whmxx has this feature .

Link to comment
Share on other sites

I think the best approuch what we have discussed in the office later today, just adding new location for structure, now it support 3 (head/body start/body end) it easy to add more like menu start, menu and, side start, side end, navbar start navbar end ..... ect , then in template file we call the structure location injector.

That simple.

Link to comment
Share on other sites

11 hours ago, activa said:

I think the best approuch what we have discussed in the office later today, just adding new location for structure, now it support 3 (head/body start/body end) it easy to add more like menu start, menu and, side start, side end, navbar start navbar end ..... ect , then in template file we call the structure location injector.

That simple.

You are right, the structure event is sufficient if we add to it other places as you have mentioned . maybe we cann add something like that

$structure['head_start'],
$structure['head_end'],
$structure['maintenance_mode_start'],
$structure['maintenance_mode_end'],
$structure['right_section_start'],
$structure['right_section_end'],
$structure['top_nav_start'],
$structure['top_nav_end'],
$structure['menu_nav_start'],
$structure['menu_nav_end'],
$structure['breadcrumbs_start'],
$structure['breadcrumbs_end'],
$structure['content_start'],
$structure['content_end'],
$structure['footer_start'],
$structure['footer_end'],
$structure['my_info_start'],
$structure['my_info_end'],
$structure['amounts_start'],
$structure['amounts_end'],

or if blesta can pass the $structure as it is to the view then we can customize the view and get our own vars from structure.

Link to comment
Share on other sites

The problem with those structure events is that they are dependent upon the design of the website and are specific to Blesta's current default templates. This limits their usefulness with custom templates and would cause us problems to support in the default templates should we change the design of the interface.

There may be another route to go depending on what you're trying to accomplish.

Link to comment
Share on other sites

Can you give a use-case for this?  Where do you intend to display the messages, and what are the messages for? I would like to add a messaging system to Blesta, for both Staff and Clients, that can alert them of specific things in the interface, from any page. Curious if that fits in with what you're thinking.

Link to comment
Share on other sites

  • Blesta Addons changed the title to Allow Plugin to Inject Messages [Html] for client Dashboard

the intention for injecting messages is injecting custom HTML in some places in client dashboard, also can be for staff.

let say i want to inject html code that has already some more info for certain things of my clients to show them in area X in dashboard. a realistic use case, we are developing a custom plugin that is getting some info from remote server, and we want to include that info right under the user info box .

another use case can be for a system that is blocking user IP, so we want to show the client a big message in the right content (the begin of content) to tell them that their actual IP blacklisted or blocked in our server and further action should be token.

another user case we want to show some clients that they are not has some complete info in their profile a warning message to tell them their profile is incomplete ...ect

 

Link to comment
Share on other sites

  • 2 weeks later...
9 hours ago, Tyson said:

Is it possible for you to tie into the Appcontroller.structure event and set hidden HTML along with JavaScript that moves it to the location you want on page load?

Technically it can be done, but adding inline Html is more reliable than fetching a ajax request then move it, sometimes it can fail and sometimes the response time is so high so the data can not shown in time. another point, blesta has not a special ID to identify some locations like menus or profiles sub-menu ect ...

This request is not a trivial one, is just for making blesta more flexible and powerful capacities .

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.

Loading...
×
×
  • Create New...