Category Archives: General

Install Eclipse PDT ( PHP Development Tools ) on Ubuntu

First lets install Eclipse

sudo apt-get install eclipse

Once installed open Eclipse then go to “Help->Install New Software”, from the options “Work with:” chose one, in my case the only one available was “Indigo Update Site – http://download.eclipse.org/releases/indigo/” once selected, click on search an select “PHP Development Tools (PDT) SDK Feature”

See a list of loaded apache modules

If you want to see wich modules are loaded by apache, just open a terminal and type:

  1.  
  2. apache2ctl -M
  3.  

And you will get something like this:

  1.  
  2. rene@rene-desktop:~$ apache2ctl -M
  3. Loaded Modules:
  4.  core_module (static)
  5.  log_config_module (static)
  6.  logio_module (static)
  7.  version_module (static)
  8.  mpm_prefork_module (static)
  9.  http_module (static)
  10.  so_module (static)
  11.  alias_module (shared)
  12.  auth_basic_module (shared)
  13.  authn_file_module (shared)
  14.  authz_default_module (shared)
  15.  authz_groupfile_module (shared)
  16.  authz_host_module (shared)
  17.  authz_user_module (shared)
  18.  autoindex_module (shared)
  19.  cgi_module (shared)
  20.  deflate_module (shared)
  21.  dir_module (shared)
  22.  env_module (shared)
  23.  mime_module (shared)
  24.  negotiation_module (shared)
  25.  php5_module (shared)
  26.  reqtimeout_module (shared)
  27.  rewrite_module (shared)
  28.  setenvif_module (shared)
  29.  status_module (shared)
  30. Syntax OK
  31.  

Use google docs to embed PDF documents and PowerPoint presentations on your site

If you want to embed a PDF file or a Powerpoint presentation on your site, a pretty easy way to do it, is just go to https://docs.google.com/viewer, introduce the pdf url, click on “Generate Link” and you will get a url to share with your users, where they can see the pdf file on the web or get the html code to embed on your web site

If you want to create the html code on you own is pretty easy just insert an iframe that points to http://docs.google.com/viewer and pass two parameters url=http://yousite.com/pdfile and embed=true and that’s it now you have a pdf embeded on your site

  1.  
  2. <iframe src="http://docs.google.com/viewer?url=http%3A%2F%2Fwww.mywebexperiences.com%2Fwp-content%2Fuploads%2F2010%2F04%2Fphp-cheat-sheet-v2.pdf&embedded=true" width="600" height="780" style="border: none;"></iframe>
  3.  

PHP Cheat Sheet (V2) Creative Commons License (Attribution, Non-Commercial, Share Alike).

Via : Embeddable Google Document Viewer

Google Maps Operation aborted on IE

If you are getting an annoying message like this

“Internet Explorer cannot open the Internet site”
“Operation aborted”

When trying to see a web page that contains a google map.
And right after the message pop ups Internet Explorer shows an empty page here are some tips to help you fixing this issue

First thing you’ll have to do. Is to move all the code used to generate the map to a function and call it once the page is loaded

  1.  
  2. function loadMap() {
  3.         // JS code to create your map
  4. }
  5. window.onload=function() {
  6.         loadMap();
  7. }
  8.  

If you are using prototype you can use

  1.  
  2. document.observe("dom:loaded", loadMap );
  3.  
  4. OR
  5.  
  6. Event.observe(window, ‘load’, loadMap, false);
  7.  

Or you can add an onload attribute to your body tag

  1.  
  2. <body onload="loadMap()">
  3.  

If you are using polylines you should add vml namespace to your header and should look like this

  1.  
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  3.    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
  5. <style type="text/css">
  6. v\:* {
  7. behavior:url(#default#VML);
  8. }
  9. </style>
  10.  

Loading the javascript needed to generate the map as an external file , and adding defer attribute so internet explorer will wait until it loads the page before executing the Javascript. It has the same effect than moving your JS code to the bottom of the page.

  1.  
  2. <script src="maps.js" type="text/javascript"  defer="defer"></script>
  3.  

It can be also a problem with a base tag messing wiht IE more info on
http://www.shauninman.com/archive/2007/04/13/operation_aborted

Google Developer Day 2008 – Mexico City

Yesterday, Monday 23 2008 I have the opportunity to assist to the Google Developer Day Mexico City, the first two talks were about Google and the Mexican market and an overview of their new product for developers ( android, maps, open social, etc. ) this first two talks were in Spanish, after a launch it was a breakout with 4 different options, the talks i have the opportunity to go were:

  • Open Social introduction by Chris Schalk: Open Social is a technology that allow us to create applications for social networks with the advantage it will run on every platform that supports open socials ( Hi5, Orkut, IGoogle, Linkedin ) the talk was about Were Open Social is going, what can we do and what to expect from it, Google friend connect,, how to create some basic application and how to implement on our how servers.
  • IGoogle + gadgets by Bruno Bowden: IGoogle is you own personalized start page where you can add a lot of gadgets to it ( weather, jobs gmail, etc. ) This talk was about creating gadgets for IGoogle , and the new support of Open Social and the new canvas mode
  • Gears by Dion Almaer: this was the talk i like the most, i really like the idea that we can use gears to create an offline version or speed a site up like wordpress.com is doing, but when i got home and try to install gears on my machine i realized that Linux 64 bits is not supported :-(
  • Google Maps API Advanced by Pamela Fox: This talks was about using tile layers with Google maps so we can use our own maps, images or anything we want to zoom in using Google maps, right now i am using Zoomifyer for this purpose but i hope with this info move to Google maps. pretty cool!

What is this?

What is this all about?

Well i am a Mexican computer science engineer, focused on web development, i like to work with perl, php, css, xhtml, javascript, ajax, etc. and this will be my playground. Where i will put my experiences while i am working, learning and living from web development.

My first languaje is not english, so if something is not well written please let me know