Submit Blog Login Last Submitted Blogs RSS Archive Contact  
Mukesh Chapagain\'s Blog
 
 
 
Mukesh Chapagain\'s Blog
Web development, Software programming, tutorials, code, Ajax, SEO, Freelancer Nepal, php programming, dot net, javascript, mysql
Language: English
RSS Feeds for this Blog
Statistics
Unique Visitors: 90
Total Unique Visitors: 85302
Visitors Out: 522
Total Visitors Out: 522
 
 
Articles
Left or Right Align your image, adsense code or other advertisement in wordpress
2008-11-21 05:00:34
Suppose you want to show your google adsense in the top-left side of your post. If you simply put yo......
 
How to show child page (sub page) list in parent page in wordpress?
2008-11-19 03:53:24
Suppose, you have many sub pages (child pages) of a single parent page. You want to show the ......
 
How to change the source code and modify/parse a website?
2008-11-14 01:45:48
Earlier I had written an article on How to get(view) html source code of a website .......
 
Displaying all products and new products listing in column/grid layout - Zen-cart
2008-11-02 04:04:16
Exactly before one year, I was doing a shopping cart project in Zen-cart. I had to display ‘All ......
 
How to fix row height in zen-cart product listing?
2008-07-27 07:28:03
Almost one year back, I had problem with the product display in Zen-cart. I searched for help in zen-cart forum. I started a topic over there. But at last, I myself had to post the solution on that thread.. coz, I found the solution. I just wanted to include that problem and solution in [...]......
 
File Upload in PEAR and Smarty
2008-07-21 05:07:18
For uploading files, you need to install a package of PEAR called ‘HTTP_Upload’ along with the installation of PEAR and Smarty. HTTP_Upload is used for easy and secure managment of files submitted via HTML forms. This package provides an advanced system for managing uploads of files via HTML <input type=”file” /> fields. Features include: 1) Handling of [...]......
 
Pagination in PEAR and Smarty
2008-07-20 05:20:53
First of all, you need to install PEAR in your web server. Then you need to install Smarty. After that, you need to install a package in PEAR. It’s called ‘Pager’. Pager is a class to page an array of data. It is taken as input and it is paged according to various parameters. Pager also [...]......
 
Using database in PEAR and Smarty
2008-07-18 01:00:57
For using database, you need to install a package of PEAR called ‘MDB2’ along with the installation of PEAR and Smarty. MDB2 provides a common API for all support RDBMS. Connecting to database To connect to a database through PEAR::MDB2, you have to create a valid DSN - data source name. This DSN consists in the following parts: phptype: [...]......
 
Creating selection list, using foreach and section loop in Smarty
2008-07-16 01:56:29
In this article, I will be illustrating and explaining about foreach and section loop used in Smarty. I will be using these loops for creating a selection list. We can create selection list from a custom Smarty function called ‘html_options’. html_options is a custom function that creates html option group with provided data. It [...]......
 
Templating in Smarty
2008-07-14 03:35:19
You can also include other smarty template files in one smarty template. This brings the use of template function available in Smarty. You may want to make a constant header and footer for your entire website. For this purpose, you can use the ‘include’ tag. Include tags are used for including other templates in the current [...]......
 
Installing the Smarty Template Engine
2008-07-11 07:19:45
At first you need to download Smarty from http://smarty.php.net/download.php or you can download it directly from http://chapagain.googlecode.com/files/smarty.zip. Extract the zip file. Rename the extracted folder as ‘smarty’. Then, copy the folder ‘smarty’ to your working directory present inside the root directory of your web server. There are different ways to install Smarty. 1) You [...]......
 
How to setup Google AdSense for your website
2008-07-09 08:17:48
This article will provide you step by step guide to setup Google AdSense. Follow the steps below and start earning money with Google AdSense. 1) Log in to http://adsense.google.com with your gmail account. 2) Click the “AdSense Setup” tab. 3) Choose adsense type that you want to set up. There are two types of adsense. One is “AdSense [...]......
 
How to get html source code of a website
2008-07-02 07:49:52
In this article, I will be illustrating about getting html source code of any website. I have done this in PHP. I created an html form for submitting the website url. After the url is submitted, the PHP code does all the magic to display full html source code of that particular website. The source code [...]......
 
Google is retiring AdSense Referrals
2008-07-01 04:10:23
Today, I got an email from adsense-noreply@google.com with the subject “We are retiring AdSense Referrals”. It says that during the last week of August, the AdSense referrals feature will be retired for both AdWords advertiser products and Google products. Beginning in late August, any remaining referral ads on your site will no longer work, and [...]......
 
An Introduction to Smarty Template Engine
2008-06-29 00:32:30
Smarty is a template engine for PHP. More specifically, it facilitates a manageable way to separate application logic and content from its presentation. This is best described in a situation where the application programmer and the template designer play different roles, or in most cases is not the same person. One day the programmer [...]......
 
An Introduction to PEAR
2008-06-27 07:11:31
PEAR is short for “PHP Extension and Application Repository” and is pronounced just like the fruit. It is a repository of PHP software code. The PEAR project was founded in 1999 by Stig S. Bakken to promote the re-use of code that performs common functions. PEAR is a code library that can reduce development time [...]......
 
Boyfriend 5.0 to Husband 1.0
2008-05-11 05:10:38
Dear Tech Support: Last year I upgraded from Boyfriend 5.0 to Husband 1.0 and noticed a slow down in the overall performance, particularly in the flower and jewelry applications that had operated flawlessly under Boyfriend 5.0. In addition, Husband 1.0 uninstalled many other valuable programs, such as Romance 9.5 and Personal Attention 6.5, but installed undesirable [...]......
 
PHP code for creating RSS Feed
2008-05-11 01:50:33
I had posted an article with an introduction to RSS. In this tutorial, I am going to post code for creating RSS feed in PHP. The database used is MySQL. Let us first create a database and a table in MySQL. Then we insert some data in the database. CEATE DATABASE article; use article; CREATE TABLE ‘news’ ( ‘id’ INT( [...]......
 
Flock – A social networking web browser
2008-05-07 06:07:23
I just found a very cool web browser built on Mozilla’s Firefox codebase. This browser is best for all the social networking junkies. Here is what wikipedia has written about Flock: “Flock 1.1 integrates social networking and media services including Facebook, YouTube, Twitter, Flickr, Blogger, etc. When logging into to any of the supported social services, Flock [...]......
 
An introduction to RSS
2008-05-07 04:21:11
RSS stands for Really Simple Syndication. RSS was designed to show selected data. Without RSS, users will have to check your site daily to check for new updates. This may be too time-consuming for many users. With an RSS feed (RSS is often called a News Feed or RSS Feed) they can check your site faster using [...]......
 
Website statistic (User Information) in Javascript
2008-03-31 00:06:42
From the code below, you can get Resolution, Page title, Page url, Agent name, Browser name and Page Referrer. <span[...]......
 
Website statistic (User Information) in PHP
2008-03-30 02:17:11
From the code below, you can get IP Address, Page name, Browser name, Operating System name, and Page Referrer name. Note: If you directly run this code, you will not get Referrer name. To view referrer information, you can link the page below from any other page. <?php /********************************* WEBSITE STATISTIC IN PHP Getting user information in PHP Programmed By: [...]......
 
Displaying date and time
2008-03-23 00:09:31
I find timestamp more flexible to use. Using time function which returns current Unix timestamp. We have the flexibility to change the timestamp according to the display requirement for our date and time by using date function. <span$time = time(); echo "Current Unix timestamp: "; echo $time; echo "<br/><br/>"; //manipulating the current timestamp [...]......
 
Page refresh in PHP
2008-03-19 07:05:39
Refreshing page in PHP with “meta http-equiv”. refresh.html <html> <head> <title>Page Refresh Test</title> </head> <body> <span[...]......
 
Go back link in Javascript
2008-03-19 06:48:06
I had problem giving the back link and I found this solution: <a href=’javascript:self.history.back();’>Go Back</a> This helped me. Hope this will be useful to you as well. goback.html <html> <head> <title>Go Back Test</title> </head> <body> Go Back to Previous link, Test Page <br/><br/> Click the link below for the test: <br/><br/> <a href="goback2.php">CLICK ME</a> </body> </html> goback2.php <?php echo "Thank You for visiting."; echo "<br/><br/>"; echo "Please click ANY of the given link to go [...]......
 
Generating random image
2008-03-19 06:38:08
Generating/Displaying random image in PHP. <?php /********************************* RANDOM IMAGE GENERATION <span*********************************/ //storing images in an array $images = array(1 => "mukesh1.jpg", 2 => "mukesh2.jpg", 3 => "mukesh4.jpg", 4 => "mukesh6.jpg", 5 => "mukesh9.jpg"); //printing the array /*** print_r($images); ***/ //generating random number //we have 5 elements in the array above //so we will generate random number from 1 to 5 $num = rand(1,5); //printing the images echo "Random [...]......
 
 
 
 
eXTReMe Tracker