Pedro Posada | drupal 6
  • Posted on December 23, 2009 - 4:37pm
    http://www.realityloop.com/blog/2009/05/24/fixing-gd-image-rotation-drupal-6-ubuntu-server-810

    Thanks a lot for this really good quick fix to gd library in ubuntu.

    I modified the first two lines:
    deb http://packages.dotdeb.org stable all deb-src deb http://packages.dotdeb.org stable all
    I also noticed that the /etc/apt/sources.lst file in ubuntu is called sources.list
  • Posted on August 28, 2009 - 3:09pm
    I wanted to make one of the pages in my site look and feel completely different than the rest of the site. I wanted to use a different style sheet css file for this page and also didn't want to override all the existing styles. I found a very good post about it on http://drupal.org/node/258756
  • Posted on July 22, 2009 - 5:24pm
    In order to make the path_redirect module handle redirections with wildcards, I created a patch for it. There wasn't a simple way to do wildcard redirections through the .htaccess file. Some times is important to make a wildcard drupal redirects. The way wildcards work: When you want to redirect a path like "/about/" to "/" then any path based in about will be redirected to "/" like "/about/something/" or "about/anything" will be redirected to "/". Patched module is in the attachment. The attachment contains all the module files already patched. Files patched:
  • Posted on July 10, 2009 - 9:54am
    http://drupal.org/project/nodetrail Some handy tips to get the nodetrail module up and running quickly. Nodetrail is a great module that allows you set customs menu trails to any node. When you install the node, you will get error messages, in order to fix them modify nodetrail.module file. Line 26 missing parameter array('mlid' => 0): $options = menu_parent_options(menu_get_menus(),array('mlid' => 0)); Line 98 correct function name _nodetrail_recurse_crumbs: _nodetrail_recurse_crumbs($tree, $item, $crumbs);
  • Posted on June 29, 2009 - 9:20am
    Creating a node programmatically. The best code snippet I found about this: http://drupal.org/node/178506#comment-1590834 Some people say is better to use drupal_execute(), but on my experience I would recommend to use the snippet above.
  • Posted on June 5, 2009 - 3:37pm
    Quick and easy php snippet to have the page title not show on only certain node types. Copy and paste the code below inside your template.php file. type == 'my_node_type'){ $variables['title'] = ''; } } } ?> Works on Drupal 6
  • Posted on March 27, 2009 - 1:02pm

    How to create secondary local tasks or secondary tabs, also called sub tab (second level) menu items.

    It was not clear to me why it was necessary to create a MENU_DEFAULT_LOCAL_TASK in every tab level. In order to tell drupal's menu system to show primary and secondary local tasks, there is a need to create a default local task every time. The default local task points to the same page as the parent item but has a path longer by one element.

    Parent path:
    'admin'

    Default primary local task path:
    'admin/home'

  • Posted on March 25, 2009 - 5:02pm

    Very useful lines of code to embed "Views 2" views into your nodes. Works almost as the old use_pager, $view->nodes_per_block)); ?> in Drupal 5 but for Drupal 6. This is also a way to embed views programatically into your pages and nodes.

    The following lines of code will load a view and print the display.

  • Posted on March 7, 2009 - 5:43pm

    This piece of code is to generate a menu or list of links to taxonomy pages. I used it inside a block. I created a view that shows all items under certain taxonomy term.

    It is basically a taxonomy menu but you can customized an place it anywhere.

    Good link to learn more about embedding your own views: http://groups.drupal.org/node/10129

  • Posted on February 19, 2009 - 12:37pm

    I was trying to do the same on drupal 6.x I used to do with drupal 5.x to post a form inside a node. In oder words, to embed a node add form inside the body text area of a page. But I was getting fatal errors. I went to drupal.org site and found out that 6.x doesn't include some files when rendering the pages.

    http://drupal.org/node/312189

    Basically this is what I used to do on Drupal 5.x: