You are here

Blogs

Say you have an .apk file and you want to install it on your emulator, how do u do that? If you are new to Android and looking for a way to test some of the currently available Android applications, here is how to proceed :

If you have Apple's me.com (now iCloud) email service, you'll likely already have setup your Mail program for sending and retrieving your day-to-day email messages. But what if you want the Drupal site on your MAMP PRO 2's localhost to be able to send out emails directly from PHP? Can't use Apple's Mail app for that, no way. You gotta use Postfix.

1. You'll need XCode in your life (for many other things like gcc for other programs), go to the App Store and install it. Make sure you find the installer after it downloads and load it up.
2. Now if you don't have Homebrew you should, I'm even surprised I'm bothering to tell you how but here it is, in the terminal:

/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"

3. Install ffmpeg:

brew install ffmpeg

Seems basic but the part that is not in black and white when searching this hook is how to set up the theme render element.
Below is about all the help I could find, but looking into the field.module I was able to figure out how to make a theme function for my custom element.

<?php
function hook_node_view($node, $view_mode, $langcode) {
$node->content['my_additional_field'] = array(
'#markup' => $additional_field,
'#weight' => 10,
'#theme' => 'mymodule_my_additional_field',
);
}

1. 99% of us use macs, so for the Phase 1 of this article I'm sticking to that.
2. I'm not going to go for all the options, I'm going for the fastest, most scalable, most robust and quick results.: MAMP PRO - deal with it.
3. This will involve installing Memcache, XHProf and Homebrew.

Synopsis: Yes, you *can* use Drush to update *only* your Drupal core without touching the modules. Here's how.

Kinda simple but there seems to be a lack of docs showing where you would want to add your '#autocomplete_path' to a cck textfield.
Once you have set up your autocomplete functions and menus as shown here: Textfield that uses autocomplete.

Step 1: Add an afterbuild to your form alter.

$form['#after_build'][] = '_autocomplete_afterbuild';

D7 - http://www.computerminds.co.uk/articles/creating-new-field-formatters-dr...

For the A.D.D.'ers: Example Module Files attached at the bottom.

Simple example of creating a custom Display Field. This is something that I keep using over and over again because with a small bit of code you can really flex what a field can do. Matt has made me blog on it to make a code example easy to get to.

NOTE - This is basically a living document, so expect it to grow be revised and changed!

There's a long somewhat religious war as far as what you should do with the settings.php file when checking it out to your local and deploying to dev, test and prod environments. The most common and now NOT my recommended way is to simply set svn ignore on the settings.php file on the directory above it... so:
Exclude settings.php from a directory by typing (in this directory):
svn propset svn:ignore settings.php
To show the ignored files, type:
svn status --no-ignore