Pedro Posada
  • Upload large image files to drupal
    Posted on August 7, 2009 - 11:48am
    I am building a website for a photographer. I want the photographer to be able to do bulk or mass image uploads. Usually the images are very big files around 3MB to 5Mb each. I figured the best way to do this was by using image and image_pub modules. This way the photographer can use the Gallery Remote Java Client to create galleries and preview bulk uploads.
  • Path redirect wildcard patch for path_redirect module
    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:
  • Nodetrail module fix
    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);
  • Creating a node programmatically
    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.
  • Remove Page title based on node type
    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
  • Jorge Posada Photography
    Posted on May 3, 2009 - 7:20pm
  • Ingles y Frances en Canada
    Posted on April 27, 2009 - 1:35pm
  • Casa Lilly Bed and Breakfast
    Posted on April 27, 2009 - 12:45pm
  • Myweigh.com
    Posted on April 14, 2009 - 8:23pm
  • Regular Expression snippet preg_match_all
    Posted on April 12, 2009 - 6:18pm

    I was trying to extract the text of an html tag using regular expressions. It seems that preg_match_all is a good option to do this. I wanted to extract the taxonomy term name from within a views display template. I needed to embed a views inside another views. I needed to use part of the parent view's html as an argument for the nested view. I used preg_match_all to extract the term name from an html tag.