Commit graph

1035 commits

Author SHA1 Message Date
Josh Sherman
fcc6533be7 Updated the paths. 2010-05-15 22:39:25 -04:00
Josh Sherman
489edfd61d Merge branch 'master' of github.com:joshtronic/pickles 2010-05-11 00:53:52 -04:00
Josh Sherman
4060d1f19b Changed templateExists() to return int not bool. 2010-05-11 00:50:34 -04:00
Josh Sherman
d521e15b0f Cleaned up the README 2010-04-21 12:50:29 -07:00
Josh Sherman
ea6930bc23 Moved fatalError() from Controller to Error class.
* Renamed the method to fatal().

 * Added Error class, but I may be factoring it out and replacing it with strong dependency of PHP built-in Exceptions.

 * Cleaned up some other stuff too.
2010-03-30 22:28:20 -04:00
Josh Sherman
b1d7ef7645 Added better error handling
* Nice HTML output for errors

 * Cleaned up some @todo's while creating some new ones

 * Added a method for setting the request variable for the module that only the Controller can use

 * Fixed that nasty infinite loop, even though it's not ideal yet.
2010-03-28 23:05:46 -04:00
Josh Sherman
a3e16f6006 Updated documentation.
* Includes documentation on the new XML Display class.
2010-03-27 15:26:21 -04:00
Josh Sherman
f4cf8d5a9a Added a sample Apache config. 2010-03-27 15:24:46 -04:00
Josh Sherman
462e15041b Started building out a sample site instance. 2010-03-26 22:38:29 -04:00
Josh Sherman
af63f84cd0 Removed some indecisiveness from the Log class. 2010-03-26 22:04:39 -04:00
Josh Sherman
ddafcd54d7 Added return type switching.
* Uncommented the return type logic in the controller and implemented it (no sanity checking on if the return type is valid as per the module)

 * Cleaned up some @todo's in the Controller class

 * Added the XML Display class
2010-03-26 21:12:54 -04:00
Josh Sherman
41ac51664f Updated documentation. 2010-03-26 17:35:53 -04:00
Josh Sherman
8480ebdb9e Added CSS class and JS file to the template scope. 2010-03-24 20:02:11 -04:00
Josh Sherman
9efdc08496 Updated log path to use the log path constant 2010-03-24 18:48:13 -04:00
Josh Sherman
fefcfd52e5 Added logging of input parameters
* Logs the input parameters (if available) with the query and slow query entries.

 * Uses the new JSON constant to determine if it should use json_encode() or serialize()
2010-03-24 18:47:24 -04:00
Josh Sherman
3fd46374b8 Updated JSON Display class to use new constant. 2010-03-24 18:47:10 -04:00
Josh Sherman
ccbfbe5981 Added constant to hold if json_encode is available 2010-03-24 18:45:36 -04:00
Josh Sherman
eb1fd8e364 Updated show/hide logic on form submission.
* Instead of hiding the elements I'm marking them as readonly.

 * Refactored the logic to apply read/write access at the end of the block so there's no duplicate code.
2010-03-21 11:33:12 -04:00
Josh Sherman
ecff6637fa Added .ajax class to the auto Ajaxing of forms.
* Forcing every form to be Ajax was proving problematic, so now to define a form as an ajax form it must include the .ajax class.

 * Wondering if .pickles-ajax would be a better choice as it's less likely to collide with someone's existing naming conventions.
2010-03-21 00:10:33 -04:00
Josh Sherman
a77acc5c04 Fixed input buttons clearing out on form submit. 2010-03-19 18:22:14 -04:00
Josh Sherman
d0c02393bf Fixed AJAX form submission and permissions. 2010-03-19 17:58:06 -04:00
Josh Sherman
b91123cec9 Updated the template handling for PHP Templates. 2010-03-18 09:30:04 -04:00
Josh Sherman
8146c2584d Updated SQL generation logic in Model class.
* Found a bug with column values containing IS anywhere in the string.

 * Updated both the column check and value check to include a preceeding space (column) and trailing space (value) to correct the issue.
2010-03-17 21:49:17 -04:00
Josh Sherman
a6b992014b Updated JSON class.
* Updated the documentation slightly

 * Added PECL json 1.2.1 to the vendors directory to help out any poor unfortunate souls that aren't running PHP 5.2+

 * Not sure the legality behind including PECL json, according to PHP License 3.01, it should be okay (it's not modified, and I haven't derived any code from it).
2010-03-16 23:03:14 -04:00
Josh Sherman
cda9c7d28e Implementing the Database class.
* Updated the Database class to work like a Singleton with a getInstance() method.

 * The Database class does not have a private constructor so it can still be instantiated in case someone needs to do so.

 * Replaced Logger class with Log class.

 * Updated Module to have an instance of the Database object as well as the Model class.

 * In my perfect vision for usage, the Module classes should never talk directly to the database, but do so via Models, but I know that's asking a lot, so I'm leaving in some options for folks.

 * Updated documentation.
2010-03-16 22:54:21 -04:00
Josh Sherman
8c1ecea92b Refactored Smarty display logic. 2010-03-15 23:57:36 -04:00
Josh Sherman
a2073f71c4 Fixed typo in variable name
* Still had a lingering ->site when the interrogated variable moved to ->module.
2010-03-14 18:53:59 -04:00
Josh Sherman
efad51e92f Refactoring Display logic.
* Revamping the display logic, lots of code is being removed / streamlined.
2010-03-14 18:42:13 -04:00
Josh Sherman
7ae9569f59 Updated module variables some more.
* Defaulted all variables to null since false is a valid value for the variables.

 * Contemplating removing all of the variable declarations and changing the sanity check from == null to !isset(), although this would eliminate the nice documentation that is generated from the delcarations?  Maybe I can leave the comments and remove the variables?  Nah, seems hackey.

 * Updated getter to check the module section of the config instead of the site section of the config.  Just seemed to make more sense.
2010-03-14 15:59:55 -04:00
Josh Sherman
1e3c48d126 Updated Module variables.
* Moved variables from the public scope to protected.

 * Added magic methods to prohibit overriding the variables directly and to "magically" load config values when module variables aren't set.
2010-03-14 15:54:53 -04:00
Josh Sherman
1eff5c3db7 Made INI the new PICKLES config standard
* SimpleXML was becoming a pain to maintain as there was differences between versions of PHP 5.x that prohibited me from being truely 5.0.0+ compliant.

 * The move to INI is because it's still good enough for PHP to use php.ini as a standard, and the support in PHP is built in and hasn't changed in a while

 * XML was also a bit bloated, and the point behind PICKLES is to kick the bloat.

 * May add support for a config file in pure PHP and/or JSON.

 * Added logic to prohibit the overriding of config variables.
2010-03-14 15:51:25 -04:00
Josh Sherman
a191a99561 Added error_reporting()
* I talk a big game about E_STRICT, but seems I no longer had it set.
2010-03-14 15:50:51 -04:00
Josh Sherman
e2c2e6db1c Updated the README. 2010-03-14 11:30:23 -04:00
Josh Sherman
92c65d723e Updated documentation. 2010-03-14 11:11:44 -04:00
Josh Sherman
6434c2a6c8 Added TODO file
* Updated documentation generation script to include the TODO file.
2010-03-14 11:10:21 -04:00
Josh Sherman
1f26dcd30e Added jQuery Validation Plugin. 2010-03-14 11:06:22 -04:00
Josh Sherman
f4655e3339 Refactored pickles.php __autoload()
* Replaced the if...elseif...elseif...else with a single if..else and a foreach to check each directory for the file to load.

 * Updated log paths to sit on the site level in a private directory.
2010-03-14 10:57:26 -04:00
Josh Sherman
0cdd8e080a Added generated documentation.
* I suppressed the vendor packages to save space (<500K versus 10MB)
2010-03-13 14:45:17 -05:00
Josh Sherman
62efd59e5e Updated doc generation script. 2010-03-13 14:44:42 -05:00
Josh Sherman
b105ca976e Removed a stray ; 2010-03-13 14:42:13 -05:00
Josh Sherman
e6a046b402 Added core.js
* Script contains some generic default functionality

 * Includes PICKLES automatic Ajax handling

 * Zebra stripes are applied to tables (assuming the even and odd classes are defined)

 * Forms automatically have return false applied on submit.

 * Includes functions disableEnterKey(), autoTab() and truncate()
2010-03-13 14:14:13 -05:00
Josh Sherman
56038e3871 Added Model class.
* The Model class is what all data models should be extending.
2010-03-12 23:43:00 -05:00
Josh Sherman
7814b5dacb Updated @package name from pickles to PICKLES. 2010-03-12 23:42:21 -05:00
Josh Sherman
31624b5d2c Updated docs.
* Added README to advise on how to generate docs

 * Moved generate file to a sub directory under scripts.
2010-03-12 23:28:52 -05:00
Josh Sherman
71aefe0b8f Moved reset.css to vendors directory
* Even though it's "explicitly in the public domain", I didn't write it and felt it should be in the vendors directory.
2010-03-12 23:11:19 -05:00
Josh Sherman
4cfce9fb3c Updated foundation.css
* Added some text-decoration and font-variant classes and a reset (normal) class.
2010-03-12 23:07:46 -05:00
Josh Sherman
a6ccb2c23e Removed ajax.js
* This script was a self-rolled Ajax library for use in PICKLES.

 * It is being replaced by a simpler / more powerful jQuery rolled solution.
2010-03-12 23:01:29 -05:00
Josh Sherman
744040bf46 Renamed frame break script. 2010-03-12 23:00:56 -05:00
Josh Sherman
8bff272e8b Added comment header and refactored code slightly. 2010-03-12 22:57:19 -05:00
Josh Sherman
746efec194 Updates to vendor code
* Upgraded FCKEditor 2.6.4 to CKEditor 3.2

 * Moved jQuery to the vendors directory

 * Added new symbolic links to the appropriate public directories
2010-03-12 22:51:56 -05:00