myGUIDE random notes, random thoughts

31May/070

Organizing emails in outlook express

Emails have become an integral part of our daily activities. For many of us, a day will not be complete without checking at least once our electronic mailboxes. And for those who are away from families and loved ones, life without an email is simply unthinkable.

Organizing emails can save you a lot of time especially when you’re receiving a lot of spam emails. For instance, all emails coming from family members can be stored in a folder different from the default Inbox folder. In the same way, emails from friends or from different mailing lists can also be separated into different folders. A bulk folder can also be created to store emails coming from someone you don’t know. Organizing your emails can also expedite the retrieval of previous emails in that you only need to search a specific folder rather than the entire Inbox folder.

To configure your mailer to deliver new emails automatically to different folders aside from the default inbox folder, you need to use filters or message rules as outlook express calls them. The step-by-step instruction in doing this in outlook express is given in the following paragraphs.

28May/070

News Ticker for PhpWebSite

In this post, we will combine the two scripts described in the last two entries, namely, A Javascript News Ticker and Extending phpWebSite for mobile access, into a single script that will display in a news ticker the most recent articles of your (phpWebSite) PWS-based website. The functions defined in these two articles will be reused here with minimal modifications. So if you have not yet read these articles, this is the right time to do so. Simply click the link provided above and return here afterwards.

To incorporate the new script into phpWebSite, we will use theme.php and theme.tpl included in every phpWebSite theme. theme.tpl defines the overall layout or template of your site, while theme.php facilitates the inclusion of php files into phpWebSite. We will be manipulating these two files in order to include the php script for our news ticker. But before this, we will first describe the script itself.

The basic idea is to use the javascript described in the news ticker article for the news ticker part. But instead of hard-coding the title and link arrays, as we did before, we will use the script in Extending phpWebSite for mobile access article to extract the titles and links of the most recent articles in your PWS-based website. We then output everything into a <script> html tag and insert this into phpWebSite using theme.tpl.

16May/070

A Javascript News Ticker

News tickers are common in news websites. A news ticker is usually used to draw user's attention to the site's latest news headlines. It can also provide a direct link to the displayed news item so that readers can immediately access the full content from anywhere within the site. One such ticker can be seen at the Philippines Today website. This post describes how to create a simple news ticker you can use on your own website using javascript.

To start with, we define two arrays. One contains the titles of the news items to be displayed and the other the links to access these items. Here, we will explicitly specify the titles and the links within the code for simplicity. Other methods, such as via RSS, can be used to implement automatic retrieval of titles and links that will be displayed in the ticker. But this will not be covered here. Our first javascript code will be like this:

10May/070

Extending phpWebSite for mobile access

I have been using phpWebsite in a couple of websites I am administering. It provides a complete content management system and has several modules you can use in order to customize the contents of your site. You can exclude features you don't need and install only the ones you will use. Most of all, phpWebsite is free and developed using PHP, an HTML-embedded scripting language that I am familiar with.

Recently, I have been thinking of providing a text-only version of my websites so that the contents can also be viewed using web-enabled mobile phones or text-only browsers. What I want for the text-only version is to have an index page that will display the title of the most recent entries with links to the full article and an entry page that will display the full content of a given article.

I started searching the Internet for a third party phpWebSite module that would do the trick, but to no avail. Because of this, I decided to make one myself. Since I am not still familiar with the inner workings of phpWebSite and how its modules are organized, I decided to make a script that is independent from it, not a phpWebSite module. However, the script will still be pulling out data from the phpWebSite database and possibly recycle some of the pre-defined functions already available in the package. Hopefully, I can rewrite the script as a full-pledged module in the future. The script's organization and code is summarized next.

6May/070

Finding IP and MAC addresses on Windows XP

According to Wikipedia, an IP (Internet Protocol) address is a unique address that certain electronic devices, such as computers, use in order to identify and communicate with each other on a network utilizing the Internet Protocol standard. In simple terms, it is the address of a computer in the network, which you need in order to reach that computer. On the other hand, a MAC (Media Access Control) address is a unique identifier attached to most network adapters. It is like a name for a particular network adapter.

To get these information in Windows XP, you will need to open a Command Prompt. To do this, click the Start button on the Windows taskbar, then choose All Programs. Choose the Accessory folder, then click Command Prompt. Alternatively, you can also click the Start button, then choose Run. Type cmd in the text box that appears. In either approach, a Command Prompt window will be launched on the desktop. In this command window, type

ipconfig /all

This will display the Windows IP configuration. Locate the appropriate Ethernet adapter. The entry for the IP address is your IP address. This is usually a series of numbers separated by dots (eg., 192.168.0.253). The entry for the Physical Address is your MAC address. This is usually a series of hexadecimal numbers separated by dashes (e.g., 00-04-00-AB-23-CC).

In summary, to know your current IP configuration, launch the Command Prompt window (Start > All Programs > Accessory > Command Prompt), then type ipconfig /all.

1May/070

Problem running GTK applications remotely

This entry was originally posted in my old 360.yahoo.com blog.

I encountered this problem while testing a gtk application I developed. The application was installed in a remote machine, which could be accessed via ssh. Every time I ran the program, I got this error message "... BadWindow (invalid Window parameter) ...".

I initially thought that the problem was related to the X window system. After searching the Internet, I found out that the problem is an ssh issue, or more precisely, X11 and TCP forwarding in ssh. There are two possible solutions to resolve this problem:

  1. using the -Y option in ssh. The -Y option enables trusted X11 forwarding. Note that the -X option also doesn't work. You can run ssh as follows:
    [user] $ ssh -Y hostname
  2. put "ForwardX11Trusted=yes" option in the ssh configuration file. The personal configuration for ssh can be placed in .ssh/config in your home directory ($HOME/.ssh/config)

With this, the problem was solved!

Tagged as: , , , No Comments