Pedro Posada
  • Clean URLs was causing Error 500 - Internal server error
    Posted on April 3, 2009 - 2:20pm

    I was getting the anoying Error 500 - Internal server error on my 1and1 home shared hosting again.

    I tried all the fixes on this site but still not getting passed the error page.

    Then I realized that the front page of my site was working fine but the resto of the pages weren't. So I figured that there might be a problem with the clean URLs. I checked my .htaccess file and there it was.

    # RewriteBase /
    

    I uncommented that line.

    RewriteBase /
    

    This solved the problem.

     

  • Setting up MENU_LOCAL_TASK for secondary tabs
    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'

  • Embed VIEWS 2 into nodes
    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.

  • Memory limit error on MAMP
    Posted on March 22, 2009 - 7:06pm

    I am developing drupal sites locally on my MacBook using MAMP.

    I was getting a lot of memory limit errors.

    I modified the php.ini file and also the settings.php fiel in drupal. None of them solved my problems.

    I inserted this line in my .htaccess file inside the drupal folder:

    php_value memory_limit  "100M"
    

    That line goes right after

    # PHP 5, Apache 1 and 2.
    <IfModule mod_php5.c>
    

    This solved my problem.

     

  • Create list of links to taxonomy terms
    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

  • Bulk delete nodes
    Posted on March 4, 2009 - 11:41am

    Insert snippet into a node's body. Select the php input format and submit the node.

    I found it here: http://www.computerminds.co.uk/bulk-deleting-drupal-nodes-particular-content-type
  • How to embed a node form into a page in Druapl 6
    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:

  • Defenders of the Faith
    Posted on February 9, 2009 - 1:56pm
  • Power of Food
    Posted on February 6, 2009 - 1:26pm
  • VIAJE AMAZONAS
    Posted on November 18, 2008 - 1:43am

    Ver archivo adjunto