/Druppets

Druppets is a set of commonly used snippets of Drupal 6 Code

Primary LanguagePHP

Welcome to Druppets v1.0
source: www.timonweb.com/druppets

Druppets is a set of commonly used snippets of Drupal 6 Code. This set should help with some common and repetitive coding tasks.
The first version of druppets is available for Aptana IDE only (www.aptana.com). It may work with Eclipse based IDEs also,
but I never tested this. Works ok with Aptana 1.5 on PC. Should be ok with Linux/Mac also.

-------------
Requirements:
-------------
1) Aptana IDE installed. Preferrably version 1.5+
2) Drupal 6

--------------
 CONTENTS
--------------
1. Release notes
2. Installation
3. Support and Contribution

-----------------
 1. Release notes
-----------------

Druppets 1.0 has the following snippets divided into 4 categories:

1) Form API:
Check Boxes
Date
Fieldset
File Upload
Hidden
Item
Markup
Password
Password with Confirmation 
Radio Buttons
Select
Submit
TextArea 
TextField 
Value
Weight

2) Func
drupal_add_css
drupal_add_js (inline)
drupal_add_js (file)
Form + Submit Functions
Form + Validation + Submit Functions
Output in Table
Pager
variable_get
variable_set

3) HTML Ready
$base_url;
global $base_url;

4) SQL
COUNT
db_query('DELETE')
db_query('INSERT')
db_query('SELECT') and fetch
db_query('SELECT') single and fetch
db_query('UPDATE')

-----------------
 2. Installation
-----------------

1. In any top-level folder of your Project View, create a folder named snippets (if not already).
2. Unzip content of snippets_here folder to the 'snippets' folder.
3. Restart Aptana.
4. Activate Snippets View (Window -> View -> Snippets)
5. Find a Drupal 6 folder in Snippets View
6. Enjoy!

For more information on how to deal with snippets in Aptana go here: http://www.aptana.com/docs/index.php/Adding_a_new_Snippet

-----------------
 3. Contribute
-----------------

If you found errors or have your own suggestions for snippets, feel free to contact me directly at tim@logler.com or go to http://timonweb.com/druppets