Friday, January 25, 2008

Troubleshooter - How To Build A Better Web Sie

Building A Better
Web Site-

When it comes to Web sites, HTML can be limiting. Learn how PHP can expand the possibilities.

Most SoHo businesses today need to have a Web presence, especially given the increasing number of searches for products and solutions being conducted online. The days of

consulting the Yellow Pages are almost gone, at least in every city or town that’s been Net-enabled for the past two years. Previously, in this space, we’ve shown you how you can set up a very basic HTML-based Web site— at almost no cost. Now, for you to take your Web site to the next level, and start creating a true online presence, you need to get into the world of scripted Web pages, and things such as serverside scripting to create dynamic Web pages that will give your site the professional look it needs. This is where coding languages such as Microsoft’s ASP (Active Server Pages) and PHP (PHP: Hypertext Preprocessor) come in. However, it’s not something that just anyone can sit down and learn overnight. For
the SoHo segment, or even for a personal Web site, hiring a few site developers to build your site is also not an option. What next, then?
      Nuke ’em PHP, the open source alternative to Microsoft’s ASP, is the obvious choice to build a Web site. Why? Because it is cross-platform—a PHP site can be hosted on any Web
server, running any OS, unlike ASP, which needs a Microsoft OS— and because it’s open source. The biggest advantage of open source software is the thousands of developers who dedicate time to improve or simplify such software. PHP-Nuke is a project by dedicated developers who decided that people shouldn’t need to know how to code in order to develop
their own PHP-based Web sites.
     There are many offshoots of PHP-Nuke, which is the beauty of open source, and these are listed in the box “Options”. The installation and control panel of each do not logically
differ much from PHP-Nuke, so you can feel free to experiment with some of them as well. Here, however, we will stick to PHP-Nuke, and learn how to install, configure, and finally, tweak it to give you a Web site that’s unique and looks exactly what you want it to look like.

Prerequisites
There are some things you will need to have in place before you can begin setting up your site, such as a domain name and hosting space on a Web server that supports PHP and MySQL databases. Both are relatively easy to find.
On GoDaddy.com, for example, a .COM domain will cost about $9 (Rs 390) yearly and basic hosting with 25 GB data transfer and 500 MB Web space will cost about $4 (Rs 175) a month. This brings your total yearly expenditure to about $57 (Rs 2,500). Thankfully, this is all you will have to pay. Using this article, you will be able to set up a personal or company Web site for exactly that price and not a paisa more.
        Getting PHP-Nuke Once you’ve bought your domain name and Web hosting, the next step is to download the PHP-Nuke installer from www.phpnuke.org. The latest version will cost you $10 (Rs 435) to download, but they offer the previous version for free. So, as of the writing of this article, if the latest version is 7.8, you can download version 7.7 for free. The latest free version is available at http://snipurl.com/digit_php.
Installing PHP-Nuke Once you have downloaded the file, unzip it to your hard drive. You will see three folders—‘html’, ‘sql’ and ‘upgrades’, along with multiple text files.
Since you are freshly installing PHP-Nuke, all that concerns you is the ‘html’ and ‘sql’ folders. The ‘upgrades’ folder is meant for those of you upgrading PHP-Nuke to the latest version. The first thing you should do is read the ‘Readme’ and the ‘Install’ text files, as you should do before preparing to install any software. Now all you have to do is follow the step-by-step instructions below to install PHP-Nuke.

STEP 1
Creating A New MySQL
Database

A MySQL database is what a PHP Web site uses to store data. It reads the MySQL database and displays content, and the settings that you select.
When you sign up for Web hosting, you will be told how to control your databases. Most hosting companies offer a simple phpMyAdmin or mysqladmin front-end for managing your databases. In our example, using GoDaddy.com’s hosting package, we got an allocation of one database, which we created from our account at GoDaddy.com itself. You will have to create a database here and call it anything you want. Now you will have to use the phpMyAdmin or mysqladmin front-end to create the hundreds of tables and thousands of fields in
MySQL that PHP-Nuke needs. Fortunately, all you need to do is find a link called SQL, as shown in the accompanying screenshots.

STEP 2
Adding PHP-Nuke

Tables To The Database


Once you click on the SQL link, you will see something similar to what’s shown in the screenshots. There will be an option to upload a file to the server and run the SQL commands in it. Basically, you need to upload the file called ‘nuke.sql’ which is in the ‘sql’ folder you came across after unzipping the PHP-Nuke installer. There will be a button titled
 Choose’, which will ask you to select a file from your hard disk. Select the file ‘nuke.sql’ and click Go’. This will execute all the required SQL commands, and you can now begin uploading your Web content.

STEP 3
Editing The config.php
File Correctly


In the ‘html’ folder, you will find a file called config.php. Open this with a text editor such as Notepad or Wordpad. You will see the following lines:

$dbhost = “localhost”;

$dbuname = “root”;
$dbpass = “”;
$dbname = “nuke”;
$prefix = “nuke”;
$user_prefix = “nuke”;
$dbtype = “MySQL”;
$sitekey = “<something>”;
$gfx_chk = 0;
$subscription_url = “”;
$admin_file = “admin”;
$advanced_editor = 0;

These are the default settings, and you will need to change these. An explanation for each field is given within the config.php file itself. The important ones you should take special care when changing are: à $dbhost = “localhost”; Set this to wherever your MySQL database is hosted. With GoDaddy hosting, this is generally something like “mysqladmin99. secureserver.net”. If you are sure that the database is hosted on the same machine as the Web server, then leaving this to “localhost” should be fine. à $dbusername = “<name>”; Here, “<name>” is the username you set with your hosting provider for database management. à $dbname = “<dbname>”; Here you should enter the database name you set in Step 1

for your database. à $admin_file = “admin”; If you want to change the name of the admin.php file to something else, say “da-big-boss.php”, for obvious security reasons, then you
should change this setting to reflect that ($admin_file = “da-bigboss”;). Make sure that this setting and whatever you rename the admin.php file to always match, or you will end up with a nonfunctional site.

STEP 4
Uploading The Site

Now you’re finally through with all the actual editing and changing. All you have to do is upload all the files, as they are, to your Web server’s root directory. This will take a while, and may fail frequently on slower connections.

 It would be best to find an FTP utility that supports resume and allows you to upload folders and keep folder structures. If you have a decent connection, Internet Explorer will also do just fine.
Once everything is uploaded, just type in your domain in a browser and you will see a message on the main page that tells you to create an admin account and set a password. Once this is done, you will be logged into the Administration Control Panel (ACP). This is where you will be able to tweak your site and its content—all from within your browser.

STEP 5
Understanding The
PHP-Nuke Layout


Once you’ve gotten all the above steps right, you will have reached the Administrative Control Panel (ACP) for your PHPNuke Web site. Now, before you can start building your site, you need to know what each little icon in your ACP means, and how you can leverage them within your site. Since we cannot list all of them in detail, we will only cover the most important ones. You should be able to decipher the rest easily enough by clicking on them Preferences
 This is where you set all the important settings of your site, such as the name of the site, the logo it uses, the theme or colour of the entire site, and all administrative information and settings.

Make sure to set all the correct information here first. You should also check out the different theme options that come bundled with
PHP-Nuke and decide on one tha  suits your site best. You can always tweak the design later, or even download a PHP-Nuke theme from
the thousands available online

Blocks
Blocks are just that—blocks! The different boxes you see around the default site that you already have
are its blocks. We have marked out different blocks in boxes in the accompanying screenshot to better illustrate this. From the ACP, you can control which blocks are shown on your site, and more importantly, where on the site they appear.
You will see the following details mentioned: Title, Position, Weight, Type, Status, Visible To, and Functions with Edit, Activate/ Deactivate, Delete and Show options. So, for example, let’s say you want to move the Login block to the left of the Web site and disable the Languages block: First, you click on the Edit icon in line with ‘Languages’. In the new page that loads, you will see that you can change the option for Activate to ‘No’. This will deactivate the Languages module, and you should also set the ‘Visible to Subscribers’ option to ‘No’, to hide the Languages block.
Now, just edit the Login block the same way, and just set the value of “Position” to “Left”.
Now you can go ahead and play about with the blocks to see what you want where and what you want to remove. You can also create new blocks, with links to new pages that you construct. It’s really very easy once you do it yourself.

Modules
Modules are like functions of your Web site, and can be controlled easily using the ACP. Clicking on
the Modules link takes you to a page with a long list of modules. Here you have to choose what’s important for your site to have and what isn’t. Remember, there has to be at least one module linked to your home page.
By default, this is set to the News module, as PHP-Nuke was primarily built for community boards. You can change this to anything else, and you can also download and install more modules from the Net. By default, the following modules are active after you install PHP-Nuke:
AvantGo, Downloads, Feedback, Journal, Private Messages, Recommend Us, Search, Statistics, Stories Archive, Submit News, Surveys, Top 10, Topics, Web

Links, Your Account. The easiest way to learn what each one is, is to click on the link and see where you go. It’s all pretty straightforward. Messages
The default message you see in your home page is listed here. Messages are sort of like posts that get priority over everything else in the home page. They can be set to be permanent, such as an introduction to your site, or temporary, such as informing site visitors that the downloads section will be down for a week. You can also have messages only

for registered users, or other administrators—basically different usergroups.

STEP 6
Investing The Time

Though this will only get you started with your Web site, PHP-Nuke is built to be easy to understand. Even if you do come across problems, or cannot understand something, there are hundreds of forums that discuss and solve any questions or problems that people face.
In the end, how well-designed and snazzy your site looks depends solely on the amount of time you can dedicate to it. You

can also add a shopping cart and a payment gateway, and sell your goods online. The options are unlimited, especially with PHP Nuke modules, which seem to be made for each and every function you could ever imagine.

Building your dream site is a

lot easier now—all it takes is some
time, the right keywords in Google,
and a little bit of bandwidth!


awdhesh_shadow@yahoo.co.in

1 comments:

Onion Insights said...

Hi

We at Onion Insights (onioninsights.blogspot.com) are always happy to come across bloggers like you. We are also glad to inform you that your writing skills can now be put to good use and you can make some extra money too.

Get paid to shop, dine and report and make some extra money using your writing and observation skills. The concept is pretty simple. Top retail chains, five star properties and fast food chains in India hire our services to get their stores evaluated through the eyes of a normal customer. We are looking for people in Lucknow who frequently visit these outlets and write well.

Every week there are a certain number of reviews in your city. Based on your availability and interest, you can choose to perform a review for us. You visit the outlet and notice what’s going on. You then go to our website and fill in a report which has a questionnaire and comment boxes to help you document your observations.

Within 15-20 days you will be paid a pre determined shopper fee which will include an reimbursement for any amount spent in the store plus an additional shopper fee. That’s how the system works.

Follow the below mentioned steps to sign up as an OI reviewer

Go to this link http://www.sassieshop.com/2dcs
Click on new shopper sign up
Click "India" under new shopper and click on "go"
Enter your basic information in the form and click on "sign me up"

Please call us at +919769781001 or shoot us an email at support@onioninsights.com if you have any other queries or any difficulty while signing up.

Warm Regards,

OI Team