Pedro Posada
  • Text list of all countries
    Posted on January 17, 2010 - 7:19pm
    Very handy simple list of country names. I use this list for country select boxes or drop down boxes all the time.
  • Make .htaccess files visible in Aptana Studio
    Posted on January 14, 2010 - 12:01pm
    I was having issues getting the .htaccess file to show up in the files window in Aptana. I went to Window->Preferences but there was no clue about fixing it. But here is the solution.

    1. In the "Navigator" view or "Project Explorer" view, look at the top of the view and you'll see a small triangle/arrow pointing downwards.
    2. Left-click this triangle and select the "Filters..." menu option.
    3. In the resulting popup window, uncheck the ".* resources" filter. Once this has been applied all .* files such as .htaccess will be shown
  • Fixing GD image rotation for Drupal 6 on Ubuntu
    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
  • How to reset my Drupal admin password?
    Posted on December 9, 2009 - 10:17am
    This is the best php tip I have found for reseting drupal administrator's password.
    You will need access to phpMyAdmin or some way to manage your database. Run this query
    update users set pass=md5('NEWPASS') where uid = 1;
    I found the info here: http://kb.siteground.com/article/How_to_reset_my_Drupal_admin_password.html
  • BRING DOWN IE6
    Posted on September 17, 2009 - 11:50am
    Very interesting website about bringing down Internet Explorer 6. As far as I am concerned, no one in the world should use IE6 ever again and pretty much all the sites should warn and force users to switch to much better alternatives like Fire Fox, Safari and Chrome web browsers.

    http://www.bringdownie6.com/

    If you agree and want to contribute to the progress of accessibility and usability on the web paste the following code into your website:
  • Remove or disable style sheets for single node on Drupal
    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
  • 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.