Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include in other project, return in html area #20

Open
bueltge opened this issue Jul 13, 2012 · 7 comments
Open

Include in other project, return in html area #20

bueltge opened this issue Jul 13, 2012 · 7 comments

Comments

@bueltge
Copy link

bueltge commented Jul 13, 2012

Thanks for your nice project.
I would like to include this in my small debugging plugin for WordPress, its easier to use without coding and also on client sites.
But i inlcude all returns in an html area, for use in tabs and view only, wat is important.

But i dont find not an hint in your documentatino, how it is possible to include this without an direkt echo at start.
maybe you can help me?

If you see on my project, than you find an small example on the inc/about.phphow works my retur of input and you can also see this on the scrrenshoot inside the repo.
https://github.com/bueltge/Debug-Objects

Thanks!

@JosephLenton
Copy link
Owner

Hey,

Thanks for your nice project.

Thanks, I'm glad you like it.

I don't quite follow your request; I can see multiple ways to interpret what you are asking, so I'd like to ask if you could explain a little further what it is you are trying to achieve.

When an error has occurred, do you want to control where the output is shown, within the page? Currently it just replaces the page with the error HTML, is this what you want to change?

Or is the problem to do with integrating PHP Error into your plugin?

@bueltge
Copy link
Author

bueltge commented Jul 17, 2012

Thanks for the reply and yes, I like the plugin.
I will control the output; I will it embeded in an html-markup, not as overlay about the screen. Important for us devs in WordPress it is, that we can use your nice lib not as replace of the html, but as output inside from markup to see the markup of WP and the error-notices.

@JosephLenton
Copy link
Owner

Ok, I'm starting to understand what you want to do with this.

However after you after just the error messages, without any HTML formatting, or do you want them with the HTML formatting? i.e. so you can place the HTML output within your own container?

@bueltge
Copy link
Author

bueltge commented Jul 19, 2012

Great and thanks for understand my cruesome English.
You can get the message with html, but not replace the current html from screen. I will include the message and html inside a div. May different parts on the plugin was viewable with tabs. Each tab have different content.

@JosephLenton
Copy link
Owner

Ok, at the weekend when I get time, I'll add in a callback which can be called instead of the current display logic. This will just pass in the HTML. Something like:

    reportError( array(
        'on_display' => function( $html ) {
            // handle you display here
        }
    ) );

Does that sound ok?

I'll also offer other parameters for the rest of the error/exception information, just in case you need it. For example

    reportError( array(
        'on_display' => function( $html, $ex, $message, $file, $line, $stack ) {
            // handle you display here
        }
    ) );

However note that when an exception is hit, the page will stop anyway. That isn't me, that's PHP, because the exception is not handled by the user code.

@bueltge
Copy link
Author

bueltge commented Jul 19, 2012

great and many thanks for your reply and todo!

@bueltge
Copy link
Author

bueltge commented Dec 17, 2012

Hi Joseph,
current do you have no dev version for this implementation, or?
Thanks for your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants