Sunday, September 25, 2011

Install Smarty and Configure it with Xampp or Wamp on Windows


Web template engine for PHP, Smarty is best. It is helpful for web project that are performs by different people (e.g. programmer and designer). Smarty separates PHP from HTML, application logic and content from its presentation. It helps to replace business logic or design logic without hampering each other.

Configuration:
1. Download the latest XAMPP version from http://www.apachefriends.org/
2. Install at C: directory. (C:\xampp)
3. Create a new folder in xampp folder and rename it to smarty. (C:\xampp\smarty)
4. Download the latest Smarty version from http://www.smarty.net/
5. Unzip the content of Smarty zip file to smarty folder. (C:\xampp\smarty)
6. Create two folders templates_c and cache inside it. (C:\xampp\smarty\templates_c and C:\xampp\smarty\cache)
7. Open php.ini file (C:\xampp\php\php.ini), search for Paths and Directories. At Windows part, replace the line
include_path = ".;C:\xampp\php\pear\"
with
include_path = ".;C:\xampp\php\pear\;C:\xampp\smarty\libs\"
or Simply add the following
include_path = ".;C:\xampp\smarty\libs\"
8. Create a new folder in htdocs folder and rename it to smarty. (C:\xampp\htdocs\smarty)
9. Create two folders configs and templates inside it. (C:\xampp\htdocs\smarty\configs and C:\xampp\htdocs\smarty\templates)
10. Smarty configuration is done. Create two scripts index.php and index.tpl to test Smarty template engine.
11. Place index.php inside C:\xampp\htdocs\smarty\ and index.tpl inside C:\xampp\htdocs\smarty\templates\
index.php
<?php
// load Smarty library
require('Smarty.class.php');
$smarty = new Smarty;
$smarty->template_dir = 'C:/xampp/htdocs/smarty/templates';
$smarty->config_dir = 'C:/xampp/htdocs/smarty/config';
$smarty->cache_dir = 'C:/xampp/smarty/cache';
$smarty->compile_dir = 'C:/xampp/smarty/templates_c';
$smarty->assign('name','uzzal !!');
$smarty->display('index.tpl');
?>
index.tpl
<html>
<body>
Hello, {$name}
<body>
<html>
12. Open the web browser and type in the URL http://localhost/smarty

Sunday, February 13, 2011

Setup Android Environment on Ubuntu 10.10

Android Environment on Ubuntu 10.10
Welcome new Android developers. As a new android developer you face some difficulties to setup environment specially Ubuntu (Linux). That's why,This article try to make easy & understandable to new developers.

Tuesday, February 8, 2011

Installing Android SDK on Ubuntu 10.10

 Android SDK install process..

Android developers need install android SDK to develop android application. It is easy to install on Windows platform but in Linux (Ubuntu) it is quite difficult for new developers. That's why I try to make it easy. Lets come on to install sdk on Ubuntu 10.10 or as like. 

Step 1: First you need to download SDK from http://developer.android.com/sdk/index.html. Download it from Linux (i386) row.

Step 2: After downloaded it try to extract to a specific location. You can do it by right clicking on folder -> Extract Here or by the following command.
 tar xzf  dir/android-sdk.tar
Where dir is the directory location of sdk and  android-sdk is the name of your sdk

Monday, February 7, 2011

Prerequisite for Configuring NAS

Setting up a NAS drive on a network....
You are trying  to set up a storage device on your home or office network to store music, videos, pictures and all other necessary document in a central place. But you don't know the requirement to setting up a Network-Attached Storag(NAS). This article for you.

NAS drives are a practical file storage solution because data is kept at a central location and is made available to all users on the network.

Thursday, February 3, 2011

Installing Eclipse Helios on Ubuntu 10.10

Eclipse Install on Ubuntu
 To install eclipse on ubuntu you need to download it first from http://www.eclipse.org/downloads/
Extract the downloaded file by right click on it and extract here or running the following:

tar xzf dir/eclipse-SDK-3.3.1.1-linux-gtk.tar.gz

Where eclipse-SDK-3.3.1.1-linux-gtk is your eclipse-SDK name with version and dir is the directory of eclipse-sdk.