Creating Email Templates in PHP
Published on : 07.03.2010
Category : PHP Viewed : 13 times.
The technique is simple
The template text (including variables and html tags) will be stored in database. We will create a table with 2 fields i.e name and text. Each template will be give a unique name. A sample entry is shown in the image below
A PHP script will read template text from the database, update varlues of variables and will send the email
For this tutorial, i haved created a table to store all the templates a webiste needs. See a snapshot of this table below
Every... |
Displaying Records in Multiple Columns Using PHP
Published on : 07.03.2010
Category : PHP Viewed : 14 times.
For this article, i have selected a table members, containing each member's pic and some other text detail. The members will be shown in multiple columns as shown in the picture below.
The technique is to use 2 loops (one nested inside the other). The outter loop creates rows and the inner loop creates columns. The only thing we have to take care of is the inner loop creates equal number of columns for each row. If there are no more records the inner loop should print a blank column.... |
Creating a Basic Template System in PHP
Published on : 07.03.2010
Category : PHP Viewed : 17 times.
After implmenting this template system in your webistes, you will achieve the following benefits
If you have a lot of pages that use the same design. If you want to make a layout change in the header, menu, footer or right section then you don't have to update numerous files. You will have to edit a single php file
You will have less vertical scrolling when typing PHP code as the whole section will be replaced by a single line of php (i.e we will use php include function to include... |
Camera tool in Excel
Published on : 06.03.2010
Category : MS Excel Viewed : 22 times.
The Camera tool allows you to select a range of cells and literally insert a live picture into a spreadsheet. Any change to the range of cells will automatically update the image.
The Camera tool allows you to select a range of cells and literally insert a live picture into a spreadsheet. Any change to the range of cells will automatically update the image.
In order to use the Camera tool, we must first add it to the Command Bar. There is a well documented tutorial on... |
Create a KVM-based virtual server in 3 steps
Published on : 02.03.2010
Category : Linux Viewed : 52 times.
The Linux Kernel-based Virtual Machine (KVM) is free, open source virtualization software for Linux based on the Intel VT-X and AMD-V hardware virtualization extensions and a modified version of QEMU (work is underway to get the required changes upstream). KVM—in the form of kvm.ko, a loadable kernel module that provides the core virtualization infrastructure and processor-specific modules kvm-intel.ko... |
Creating Quality Document Scans
Published on : 02.03.2010
Category : Linux Viewed : 26 times.
While we can all dream about the world of paper being replaced with computers and electronic documents, we all know that is still only a dream. In the course of doing my graduate studies, I have often needed to make copies of articles and books reserved in the library. I've grown accustom to scanning these documents and archiving them with the rest of my course work, and in the process I've learned to make high quality scans, suitable for printing if necessary, and still a ... |
Libvirt and Python
Published on : 01.03.2010
Category : Linux Viewed : 32 times.
The previous example illustrated the control of domains using the command-line utility virsh. Let's now look an example of domain control using Python. Python was the libvirt-supported scripting language and provides a clean, object-oriented interface to the libvirt API.
In this example, I explore some of the same operations that I demonstrated with the virsh utility (list, suspend, resume, and so on). The... |
Libvirt and the virtualization shell
Published on : 01.03.2010
Category : Linux Viewed : 36 times.
Now that I've covered some of the architecture of libvirt, let's look at some examples of the use of the libvirt virtualization API. I start by using an application called virsh (virtualization shell), which is built on top of libvirt. This shell permits use of much of the libvirt functionality but in an interactive (shell-based) fashion. In this section, I demonstrate some of the aspects of VM manipulation... |
Means of control
Published on : 01.03.2010
Category : Linux Viewed : 22 times.
With libvirt, you have two distinct means of control. The first is demonstrated in Figure 1, where the management application and domains exist on the same node. In this case, the management application works through libvirt to control the local domains. The other means of control exist when the management application and the domains are on separate nodes. In this case, remote communication is ... |
Location-aware search with Apache Lucene and Solr
Published on : 01.03.2010
Category : Linux Viewed : 22 times.
Location, location, location! Just as location is king in real estate, search plus location awareness can yield significant dividends in helping users effectively and efficiently find information. For instance, if you are a business-directory provider (such as a "Yellow Pages" site), when a user searches for a plumber, the site should return results for plumbers near the user's home. If you run a tourism site, you might want to allow travelers to search for places of interest near their... |