How to dizzy the next guy

Events happening in the community are now at Drupal community events on www.drupal.org.
moshe weitzman's picture

I wrote this on my blog 1 year ago. I bet the list could be made even more fiendish today

Drupal has gained some powerful tools in recent year(s). They are all valid and useful. When used improperly though, they can become dizzying. Consider these misdirections ....

  • Rewrite arbitrary SQL queries fom your own module
  • Rewrite forms from your own module. Add/remove fields and change the Action attribute
  • Alias some system urls so he can't tell what module is handling the page
  • Implement some theme() functions so he can't find who is outputting an HTML chunk
  • Drop small node-story.tpl.php files in the theme directory so that he can't figure out why stories look different.
  • Use menu.module to restructure your Navigation block. Change some link text while you are there.
  • Use the 'arbitrary PHP' feature of blocks to show only for certain people on certain pages.
  • Implement advanced database prefixing so that he looks at the wrong tables by accident. Ouch!
  • Switch themes from some obscure part of your code by changing the global $custom_theme variable.

Comments

The evil block

cburschka's picture

Use the 'arbitrary PHP' feature of blocks to show only for certain people on certain pages.

I once did this as an April Fool's joke on my blog:

  1. <script type="text/javascript">for (x in document.write ) { document.write(x) }</script> into a block (this crashes IE6 and IE7 immediately).
  2. <?php
    return preg_match('/MSIE/', $_SERVER['USER_AGENT']) && ( date("h") + date("m") ) % 7 == 0 || rand(0, 12) < 2;
    ?>
    (basically, once in a blue moon for IE users)

One of my IE-using friends hated me for a good long while afterward...

Also

sfyn's picture

Use i18n, language fields, and the language filter more or less at random throughout your site so that harmonizing the language interface is actually impossible.

Drupal for Evil

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: