Migrated from fixing-and-extending-comicpress v8

johnbintz 2010-09-13 05:13:59 -07:00
parent 07bbba4bf7
commit 28ded9567e
1 changed files with 5 additions and 3 deletions

@ -1,6 +1,6 @@
h2. Where to do work on ComicPress h2. Where to do work on ComicPress
Unless you already have the code written, <em>don't do development on your live site!</em> Install a test/local copy of WordPress and work on that. Unless you already have the code written, <em>don't do development on your live site!</em> Install a test/local copy of WordPress and work on that. This is also the best approach to use when doing work on a new theme for your site ("Theme Tester":http://wordpress.org/extend/plugins/theme-tester/ or some equivalent is the next best).
<notextile> <notextile>
<ul> <ul>
@ -16,9 +16,11 @@ h2. functions.php
If you're not using the default ComicPress theme (say, you're using 3 column or GN), and you haven't customized your <code>functions.php</code> file, a new version of <code>functions.php</code> can (theoretically) be dropped into the target directory without affecting functionality. If you're not using the default ComicPress theme (say, you're using 3 column or GN), and you haven't customized your <code>functions.php</code> file, a new version of <code>functions.php</code> can (theoretically) be dropped into the target directory without affecting functionality.
h2. Debugging Problems in ComicPress h2. Fixing Problems in ComicPress (in the base theme or your own theme)
* Before working on your files, <strong>make backups of everything!</strong> Database and theme files, please. Or, even better, use "git":http://git-scm.com/ to manage your work on the theme. Fixing problems in ComicPress and WordPress gives you a good opportunity to learn "PHP":http://www.php.net/. If you've never done any development work before, it can be scary. There are people on the "forums":http://comicpress.org/forum/ that have good PHP skills. Ask there, please.
* Before working on your files, <strong>make backups of everything!</strong> Database and theme files, please. Or, even better, use "git":http://git-scm.com/ to manage your work on the theme so that you can easily revert if you mess up.
* Make sure error reporting is turned on. On production servers it often isn't (and it shouldn't be). At the top of your <code>functions.php</code> file, add <code>error_reporting(E_ALL)</code> while you're working on an issue, and then remove it when you're done. * Make sure error reporting is turned on. On production servers it often isn't (and it shouldn't be). At the top of your <code>functions.php</code> file, add <code>error_reporting(E_ALL)</code> while you're working on an issue, and then remove it when you're done.
* Use "var_dump":http://us.php.net/manual/en/function.var-dump.php instead of "echo":http://www.php.net/echo to print out variable information. * Use "var_dump":http://us.php.net/manual/en/function.var-dump.php instead of "echo":http://www.php.net/echo to print out variable information.
* Make sure your code is outputting what it really should be outputting by using View Source in your browser. * Make sure your code is outputting what it really should be outputting by using View Source in your browser.