How to

Benjamin Melançon's picture

A Quick Drupal Module to Block All Variations of a Google Address

Book element

  • How to
  • Google lets you put any number of periods in your gmail address, and it ignores all of them when receiving mail for you.

    Try it; it's fun!

    Spammers have taken advantage of this, unfortunately, to spam more and more easily.

    If you see a Gmail address with about as many periods as letters, it is probably a spammer. If that address turns up twice, differing only by the number or placement of periods, it is pretty certainly a spammer.

  • Benjamin Melançon's picture

    Add a Resource content type

    Book element

  • How to
  • http://definitivedrupal.org/admin/structure/types/add
    Give it a name, Resource. The machine name is just fine as it is, resource. Give it a description, A reference page or other resource for the Definitive Guide to Drupal 7. Connects to a book chapter.

    Set the default publishing options to published and create new revision.

    There's no reason to have any menus available on Menu settings, we'll be making links to these resources from their respective chapters.

  • Explanation

  • Incomplete. Needs nodereference to book chapter, some clever theming.
  • Benjamin Melançon's picture

    Form element titles and the invisible #title_display property

    Book element

  • How to
  • Note: Forms are made to look how they are at two layers, the Forms API and the theme layer.

    [Words below are mostly Everett's verbatim]

    Drupal 7 provides a #title_display property that can be used with any form element that supports the #title property. The #title_display property tells the form system how to render #title

  • Explanation

  • In the intro to module development i guess...
  • Benjamin Melançon's picture

    Getting Vim

    Book element

  • How to
  • Vim for windows can be installed as part of Cygwin or standalone, http://www.vim.org/download.php#pc. A graphical version for Mac is available, http://code.google.com/p/macvim/. For Linux, graphical vim (gvim) is available through our operating system's package manager, such as Ubuntu's Software Center.

  • Explanation

  • To be referenced from page 3ish of Intro to Module Development. Probably belongs in the Development Environment chapter.
  • Benjamin Melançon's picture

    Installing spam protection

    Book element

  • How to
  • We started getting a spam registration a minute – granted, only for a couple minutes – but it was still worrying enough to look for some anti-spam firepower.

    drush dl mollom

    Push the changes to our live site.

    Enable Mollom at admin/modules.

    Register the site at Mollom.com.

    Copy the API keys for public and private to the Mollom settings page on our site, admin/config/content/mollom/settings

    ...

    hmm. It tells us "The configured Mollom API keys are invalid."

  • Benjamin Melançon's picture

    Mercenary module development: AJAX Form Messages

    Book element

  • How to
  • Developing a module for hire can be a lot of fun, especially with a good client, because the requirements are figured out and laid out for us.

    Although the request was to build off of an earlier module (made public but not released on Drupal.org), the goals expanded enough that it makes sense to start fresh— the client, who has Drupal 6 needs, even OKd a Drupal 7 first approach.

    We make a new module in a working copy of Drupal and immediately start a git repository for the module.

  • Explanation

  • better wording of no v command
  • Benjamin Melançon's picture

    How to run a Code Sprint

    Book element

  • How to
  • Find a place.

    Electricity and internet are all we need, but it never hurts to plan on feeding the code sprinters, also.

    Find some people.

    Some veteran programmers signed up before calling a sprint helps ensure that all issues can be handled. Ideally, someone with commit access to the project or projects that will be worked on should be present, or at least committed to work remotely.

  • Explanation

  • Notes while at the Acquia D7 code sprint called by Dries.
  • Benjamin Melançon's picture

    Add a language

    Tags

  • unfinished
  • Book element

  • How to
  • [not tested, notes jotted down while helping fellow code sprinter test the translation of Forum titles]

    Enable locale module

    [new] In Drupal 7, the fastest way to add a language is to place the package of po files in the Drupal root directory and then add the language. It finds the po files automatically. (We do not go to import a language as in Drupal 6. Now we only use import for individual po files we add later.)

  • Explanation

  • It's imperative that we cover as much translation, user interface and
  • Pages

    Subscribe to How to