[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Phpgroupware-developers] msgbox function and template blocks
From: |
Dan Kuykendall (Seek3r) |
Subject: |
Re: [Phpgroupware-developers] msgbox function and template blocks |
Date: |
Fri, 24 May 2002 15:21:36 -0700 |
btw, I have subverted common->error_list() to use common->msgbox().
This will make for backwards compatibility and immediately get msgbox
into use.
Dan
"Dan Kuykendall (Seek3r)" wrote:
>
> I have added a msgbox function to the common class and it is loaded in
> the phpgw_header function.
>
> basicly if you set some messages in the
> $GLOBALS['phpgw_info']['flags']['msgbox_data'] array
> a msgbox will be displayed to the user right below the navbar and before
> the app has a chance to sneak anything above it.
>
> So an app developer can display the msgbox with info they need to return
> to the user like this:
>
> $GLOBALS['phpgw_info']['flags']['msgbox_data']['Please enter a first
> name']=False;
>
> As long as they do this before the header is generated, it will appear
> as desired.
>
> =False indicated that it was an error msg, but you can also set =True
> and that will indicate a positive result, something like this:
>
> $GLOBALS['phpgw_info']['flags']['msgbox_data']['Record Saved']=True;
>
> A positive message will generally have a green checkmark or something
> like that, depending on the template set. A negative message will have a
> red X or something like that.
>
> You can also stack messages up. This is the primary benefit of the way
> its designed.
>
> $GLOBALS['phpgw_info']['flags']['msgbox_data']['Please enter a first
> name']=False;
> $GLOBALS['phpgw_info']['flags']['msgbox_data']['Please enter a last
> name']=False;
> $GLOBALS['phpgw_info']['flags']['msgbox_data']['Something good had to
> come of this']=True;
>
> This will generate a msgbox with all three rows properly indicated.
>
> The template blocks for this are going to be in the common.tpl for each
> template set. only the default template set has one so far and the
> msgbox is pretty basic and ugly, but as each template set starts
> supporting the common.tpl the msgbox will pretty up a great deal.
>
> Oh!
> App developers can also use the msgbox function directly if they want.
> It will return the msgbox, so you can then output it however works for
> you.
>
> Seek3r
>
> _______________________________________________
> Phpgroupware-developers mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/phpgroupware-developers