Pedro Posada | Blog
  • Posted on June 16, 2008 - 10:10am
    When using "VIEWS" you can insert this into your node.tpl.php. This will allow you to create Zebra style lists of teasers and/or full nodes.
    http://drupal.org/node/82241
  • Posted on May 26, 2008 - 4:16pm
    Code snippet to build collapsible fieldset like this one:
  • Posted on May 26, 2008 - 10:19am
    Display a block on certain pages by url and by node type.
  • Posted on May 15, 2008 - 4:22pm

    This php snippet is useful for customizing the behavior of the "My account" link. Sometimes you want to place a login link in one of the menus. It might be confusing sometimes because after you login, the link won't show as "Logout" but as "My account". This is not ideal so you can use the snippet to make it show as "Logout".

    Place this code inside your template.php file.

  • Posted on May 12, 2008 - 2:30pm
    Sometimes on some hosts you will get an error or warning after installing Drupal that says "register_globals is enabled". You can correct this by creating a php.ini file in your drupal root directory and then inserting the following line of code: register_globals = Off you can see the complete drupal post here: http://drupal.org/node/216882
  • Posted on May 12, 2008 - 2:18pm

    Copy and paste the following line at the beginning of your .htaccess file:

    ##
    AddType x-mapp-php5 .php
    AddHandler x-mapp-php5 .php
    ##

    go to http://drupal.org/node/232773 for the complete drupal forum post.

    ADDITIONAL IMPORTANT INFORMATION

  • Posted on April 24, 2008 - 4:40pm
    Php snippet to insert a webform in any node.
  • Posted on April 22, 2008 - 12:02pm
    .htaccess code snippet to have any url to redirect to another url. You would insert this in your .htaccess file. This is very useful when you are migrating a static html site into a Drupal site.
  • Posted on April 17, 2008 - 12:14am
    Snippet to generate a CSV (comma separated values) file from any table or combination of tables from the data base.
  • Posted on April 16, 2008 - 11:40am
    I have come across this issue many times now. It started to appear in Drupal 5.x . The reason is not completely clear to me but some say that it has something to do with the tac_lite module. It seems that when you enable this module and then you disable it, it won't properly restore the node_access table in the database. It won't create the default node_access row. To fix it, just run the following query: