< Day Day Up > |
Hack 76. Take a Walk on the Lighter SideGmail with grace from any web browser, whether JavaScript-disabled, not yet supported, text-only, or on a PDA or mobile phone. Being a child of Google, Gmail hides all of its complexity behind a rich, deep, feature-packed yet user-friendly web mail interface, assuming you have the right browser—one of recent vintage—for the job. But what to do if your IT department hasn't upgraded your version of the Internet Explorer browser since Windows 95, you're quite happy with the text-only Lynx browser, you're running the latest nightly build of browser XYZ, which Gmail simply doesn't like, or you're trying to reach your mail from a PDA or smartphone? Gmail-lite (home page: http://sourceforge.net/projects/gmail-lite, SourceForge project page: http://sourceforge.net/projects/gmail-lite; GNU Public License), as the name suggests, puts a plain HTML face on Gmail. It is a PHP application that proxies your interactions with Gmail, allowing you to surf using whatever browser you have at hand or just plain prefer just plain prefer, while keeping Gmail happy with its end of the conversation. The authors of gmail-lite have done a fantastic job, affording you a plain HTML interface to just about every bit of functionality Gmail provides through its more interactive JavaScript-based frontend. 6.9.1. Installing the HackYou have to marvel at the wonders of PHP-based applications and their simple installation. Assuming you have the prerequisites taken care of, it's just a matter of downloading, unpacking, and enjoying. I installed gmail-lite both on my local Mac OS X laptop and under my hosted ISP account in seconds each.
Download gmail-lite (http://sourceforge.net/projects/gmail-lite) and unpack the distribution (0.56 at the time of this writing, but yours is sure to be a later version) somewhere under your web server's document root, where the rest of your web site lives (ask your system administrator or service provider if you're not sure where this is): $ tar -xvzf gmail-lite- 0.56 .tar.gz gmail-lite-0.56/ gmail-lite-0.56/compose.php gmail-lite-0.56/config.php gmail-lite-0.56/debug.php gmail-lite-0.56/diagnose.php gmail-lite-0.56/dl.php gmail-lite-0.56/docs.html gmail-lite-0.56/index.php gmail-lite-0.56/INSTALL gmail-lite-0.56/libgmailer.php gmail-lite-0.56/logout.php gmail-lite-0.56/main.php gmail-lite-0.56/star.gif $ mv gmail-lite-0.56 gmail-lite
To verify that everything went to plan, point your web browser at diagnose.php using the URL corresponding to the gmail-lite directory on your web site—e.g., http://www.example.com/~rael/gmail-lite/diagnose.php The resulting page should look like Figure 6-18. Figure 6-18. The diagnose.php script makes sure that everything is installed as expectedIf diagnose.php does indicate that something's gone wrong, consult the installation and troubleshooting documentation in the INSTALL text file in your gmail-lite folder. 6.9.2. Running the HackPoint your computer's web browser at the URL corresponding to the gmail-mobile directory on your web site—e.g., http://www.example.com/~rael/gmail-lite (or just click the "Press here..." link on the diagnose.php page).
Figure 6-19 shows the plain HTML login screen as it will appear in a typical browser window. Enter your Gmail login (e.g., username@gmail.com) and password, alter the time zone if you feel so inclined, and click the "sign-in" button. Figure 6-19. A gloriously plain HTML Gmail login page in a typical browser windowYou're greeted with a summary page with links to your Gmail Inbox, Sent, Trash, and Spam folders, Starred messages, and personal labels—shown in Figure 6-20 as it appears in a smartphone XHTML web browser. Figure 6-20. A summary of the state of your Gmail account as it appears in a smartphone XHTML browserClick the Inbox link and you'll be presented with a simple list of your incoming messages, as shown on a Pocket PC in Figure 6-21. At the top is a quick-link toolbar and pull-down menus for switching views, exploring labeled mail, and searching your Gmail messages ["Gmail Search Syntax" earlier in this chapter]. (Click the Get button after making your selections or entering a search query.) At the bottom are actions you can apply to any number of checked messages (check the associated checkbox to the right of a message subject to act upon it), including archive/unarchive, label, star/unstar, mark as read/unread, mark/unmark as spam, and trash/untrash. (Click the Do button to apply any action.) Figure 6-21. Your Gmail inbox, as seen through a Pocket PCSelect any email message to open it. Figure 6-22 shows a typical email message viewed in the text-only Lynx browser. The layout of individual message pages is much like that of the Inbox (or any folder) view. As you can see in the figure, I'm about to take a look at all my "foo"-labeled messages. Figure 6-22. An individual message in the Lynx text-only browserSo, there you have it: a plain old HTML interface to about anything you can do through Gmail proper. (In all likelihood, by the time you read this, Gmail will have built its own plain HTML version without all the browser and JavaScript requirements. Still, this is a great hack and worth fiddling about with.)
6.9.3. See Also
|
< Day Day Up > |