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

Refactoring #6

Open
chrisgo opened this issue Apr 24, 2011 · 0 comments
Open

Refactoring #6

chrisgo opened this issue Apr 24, 2011 · 0 comments

Comments

@chrisgo
Copy link

chrisgo commented Apr 24, 2011

Hi,

I've taken your code and refactored it to do a couple of things (not sure if I broke anything though) and it's fairly major so I'm not sure if I should do a fork + pull request. Here are the changes I have made:

  • Renamed all filenames and PHP classes to debugbar (one word) and not have debug-toolbar or toolbar variants
  • Made it more HMVC (cascading) so the main code is now in a subdir called "kohana" and the base class "Debugbar" is blank (extends Kohana_Debugbar)
  • Created a new controller Kohana_Controller_Debugbar (also a blank class Controller_Debugbar) that follows the same convention as the userguide in terms of pulling up "media" files (js, css and img) - they are created with Route:set() in init.php
  • Moved all the css, js and img directories under a subfolder called media and using route to serve them up (so it's more portable) and renamed/moved css and js files to media/css/debugbar.css, media/js/debugbar.js - no need to copy images to DOCROOT (same as userguide)
  • Made everything output right before the </body> tag - used to have CSS output inline right before the tag which muddled up the View Source (scroll way down to see your code) -- now the JS & CSS are NOT inline and are sent to the output right before the debugbar HTML

TODO

  • Figure out how to enable this without touching index.php -- possibly somewhere in the after() of your base controller
  • CSS and JS cleanup to make everything be "debugbar" vs a mix of debug-toolbar, toolbar, etc.

What do you think?

Thanks,
Chris

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

1 participant