I should have done this earler, but I found time to do this only now. I have a set of mostly used snippets of Drupal 6 code which helps me a lot during my Drupal development. It's not so big, but most of snippets are really handy. So I decided to share this set with you and gave it a funny name Druppets :)
Please welcome, Druppets 1.0:
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
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')
Further development
If people will find this set useful I will continue to maintain it and will add more snippets. Feel free to make suggestions here in comments or contact me directly:
Links
Posted in Web Development, August 4th, 2009
I suggest to try free PHP IDE
By Stas (not verified)I suggest to try free PHP IDE - Codelobster PHP Edition with special Drupal plug-in.
Great stuff! One issue: the
By Nielsz (not verified)Great stuff!
One issue:
the "Form + Submit" contains a validate function, and the "Form + Validation + Submit" doesn't.
this is really cool. It works
By blairski (not verified)Hello blairsky! Thanks! Of
By TimHello blairsky!
Thanks! Of course we can do this. But I have no idea how to accomplish this. Do you have some thoughts? Contact me: http://timonweb.com/about
Hello, Thanks for the
By Gijs (not verified)Hello,
Thanks for the snippets. Really nice, saves me allot of time.
In your readme.txt you write "Restart Aptana."
A project refresh is enough to get the snippets in the snippets view.
Fine, really amazing
By Tom (not verified)Fine, really amazing
very very useful, thanks for
By ashley (not verified)very very useful, thanks for sharing this!
hey! This is amazing stuff!
By Thomas (not verified)hey! This is amazing stuff! Thank you very much. Snippets are great, will send my additions soon.
Post new comment