Drupal coder

Panic Coda Drupal plugin

Panic's Coda is a great editor/IDE (mac only). Since the latest version a new Plugin architecture is available. I haven't found any Drupal plugins yet, so I decided to write my own.

You can download the latest version from github.

Version 4 release notes

  • FEATURE : Next to Control + H which searches the Drupal API and shows the results in the Coda browser you now have Control + Alt + H which displays the API in your external browser.
  • FEATURE : Tiny URL - Everyone does it, now this plugin too. Turns http://www.drupalcoder.com into http://tinyurl.com/yh3t3q5.
  • BUGFIX : Fixed a problem where extra whitespace was sometimes added after a replace command.

Version 3 release notes

PHP Unserialize

Turns a string like

a:16:{i:0;i:61;i:1;i:58;i:2;i:56;i:3;i:31;i:4;i:30;i:5;i:29;i:6;i:24;i:7;i:21;i:8;i:15;i:9;i:14;i:10;i:11;i:11;i:7;i:12;i:5;i:13;i:3;i:14;i:2;i:15;i:1;}

into

Array
(
    [0] => 61
    [1] => 58
    [2] => 56
    [3] => 31
    [4] => 30
    [5] => 29
    [6] => 24
    [7] => 21
    [8] => 15
    [9] => 14
    [10] => 11
    [11] => 7
    [12] => 5
    [13] => 3
    [14] => 2
    [15] => 1
)

JSON Decode

Turns a string like

{"wine":3,"sugar":4,"lemon":22}

into

Array
(
    [wine] => 3
    [sugar] => 4
    [lemon] => 22
)

Version 1 and 2 release notes

  • Drupal
    • API
    • Remove db query table accolades
    • Flush caches (Remark : only site mode)
    • Run cron (Remark : only site mode)
    • Create module (Remark : will be put in sites/all/modules/custom/...)
    • Delete cron semaphore (Remark : only site mode)
    • Backup (Remark : only site mode and needs backup_migrate)
  • Text
    • Remove trailing spaces
    • Uppercase
    • Lowercase
    • Slug
    • MD5
    • Base64 encode
    • Base64 decode
    • Join lines
    • Trim and join lines
    • Trim and join lines with space
    • Calculate length
    • Sort lines
    • Sort lines and remove duplicates
  • HTML
    • URL escape line/selection
    • URL unescape line/selection
    • Unordered list
    • Ordered list
    • Encode entities
    • Decode entities
    • Encode entites (exclude tags)
  • PHP
    • Run
    • Tidy
    • Validate syntax
  • XML
    • Format
  • HTTP
    • curl
    • wget
  • Source
    • Align assignments

Comments

I installed the plugin but I can't use. Where the menu of functions is displayed ?

Tanks in advance.

Is there any way to get intensense for PHP variables? I mean when I start typing php variable name it should suggest a list of variables to chose from. Thanks

To install:

1. Download .zip or .tar.gz file from github.
2. Uncompress.
3. Rename the uncompressed folder to "CodaScriptPlugin.codaplugin". Mac OS X will prompt you to choose a file extension. Choose "Use .codaplugin."
(after doing this the icon should change to something that resembles a lego-block)
4. Double click on the icon, and it will automatically be copied to the correct location and installation is complete.

Alternatively, for step 4, you could drag-and-drop or copy-and-paste the .codaplugin file to the directory: ~/Library/Application Support/Coda/Plug-ins

That's it.

Anyone tell me how to install the plugin? I've tried clicking on CodaScriptPlugin -- renaming it to CodaScriptPlugin.codapluin but to no avail.

I would love to install this plugin, but when I download the package from github, there is no .codaplugin file, and running the Unix Executable File give me a "cannot execute binary file" error.

Any help would be appreciate.

Thanks,
Rene

Getting the same error when trying to install the source code.

I get an error when I try to execute the script file. Am I missing something?

Awesome! Everyone loves Coda now, after you have extended it.

Nice

I use free PHP IDE - Codelobster PHP Edition with special Drupal plug-in.

@Saugar : Yes. Preferences > Editor > Custom Syntax Modes

Is there a way to make Coda recognize fu.module files to be php files?

Get the latest version of the Drupal Coda Plugin.

Menu items are only available if you have opened some file.

I thought I set up my local site correctly, in my local file browser I see the drupal index.php and all of the files however all the menu options are grayed out. What am I doing worng? Using Drupal 3 plugin.

The remove trailing spaces seems to cause Coda to lockup, and require force quitting ...

Any chance you could create a screencast showing how to do some of the basics with this plugin? It looks pretty handy.

Works great! I love Coda, and having recently switched to Drupal I love the plugin. It really helps a lot.

You have to be in a Coda local Site. The root of the Coda local Site should be the root of your Drupal site.

Awesome plugin. Thanks a lot!

Any way to make some of these local-only features work with remote sites? With my current workflow I work with only a remote site and no local site so it would be great if these features would still work. In any case, great work!

Awesome plugin. Thanks a lot!

Hi Robert,

No. That's not available. Templates aren't provided in Coda (yet I hope).

I had a look to Coda some months ago but I stayed with TextMate because of the Drupal integration via bundles. I might have a look to this plugin and Coda again. Thanks for this.

BTW, you might want to join Drupal IDE group (http://groups.drupal.org/drupal-ide) to let everybody know about your pluguin.

And finally, somtehing I appreciate much from TextMate and it bundles is the help we have, with the Drupal bundle, to write drupal code (functions, menu items, etc). Is this functionality available with your plugin and Coda? That would be great.

Hi Btully,

It's your local root that's important, that has to point to your drupal installation (where index.php resides among others)

Wow, Davy -- this looks really impressive! Thanks so much for taking the time to put this together.

I'm a little unclear on how to get some of the items working within the Drupal menu. You mentioned above that "you have to be in a Coda local Site". Can you explain some more on how this works? Items such as "flush caches", "create module" and "run cron" are not doing anything for me -- so I was curious as to what it's supposed to do. I am running Drupal locally via MAMP and my Coda site's local url correctly points to the site. But again, when I select any of those über-cool menu items, nothing happens.

Thanks again!

Do you have a sites/all/modules/custom folder?

This is great!

Can't seem to get the create module feature working though, I'm using the 'sites' feature with the drupal root as the root of my local site.

the ^H lookup is awesome :)

I absolutely love Coda and now have you to thank for extending it even more!

Thanks!

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options