CodeMode

Hi! I am Geshan Manandhar, a Bachelor's of Information Management (BIM) graduate. Currently I am working as a developer (PHP) at Young Innvovations Pvt Limited.

Feb
26

Random header image on page refresh (applicable to Drupal theme)

Some time back, we needed to get a random header image on every page refresh for a client. So I devised a simple way to select a header image from any 5 given images and show it on a page. How did I do it with PHP and CSS is explained below:
Jan
14

Start learning PHP with slides and sample code 4 (Day 8-10), Learn PHP and MYSQL in 10 Days

In continuation to the previous posts and slides. This the last one in the batch day 8 - 10. You can learn PHP and MYSQL in 10 days.

Get all the slides and code from day 1 to 10 here, or try the alternate link here.

Here are the slides for day 8-10
Dec
30

Start learning PHP with slides and sample code 3 (Day 5-7)

The course continues for PHP and MYSQL. Learn PHP and MYSQL database handling with slides/presentation and sample code. Get the slides and code samples below:








Dec
28

Taming Drupal Node Teaser and Node Title 2 (for custom content)

In continuation to my previous post about "Taming Drupal Node Title and Teaser" this is part 2 of the Drupal node title and teaser taming tweak by editing node-type.tpl.php.(type is your content type like story, project or custom type like news or project etc). This is what your teaser for front page look like after the tweak is applied and after some great theming :-).
Dec
23

Start learning PHP with slides and sample code 2 (Day 2-4)

The PHP classes are running on Friday, Saturday and Sunday. These are the slides of Day 2, 3 and 4 and the sample codes as below:


The Day 2 Slide on PHP Variables, Operators ETC:


Dec
17

Start learning PHP with slides and sample code

I recently had to start PHP class for BIM 5th Batch of Prime College so thought I'd post the slides and sample code online at my new Drupal 6 site http://www.geshanmanandhar.com/slides/php . Grab the slides and codes at the above URL. Here is the slide for day 1, other things will be updated soon.



You can get the related links at http://delicious.com/geshan/107
Jan
22

Getting multiple values from a single selection of a form.

Have you ever tried to get multiple values from a single - selection/list box. It allows multiple selection with a simple attribute of multiple="multiple" but it does not work. The trick to make it work is use an array. How See below:


<html>
<head>
<title>The Form Page</title>
</head>
<body>
<p><strong>Form Page</strong></p>
<form name="per_info" method="post" action="insert.php">

Dec
17

WYSIWYG Inside Text Area : TinyMce

Want to edit the text you add for your web application or website with at WYSIWYG (What You See Is What You Get) editor inside your text-area. Here is a perfect solution for you, its mainly free, easy to install, fast to load, platform independent and may even be integrated to the Content Management System (CMS) you are using. It called TinyMCE.

Dec
17

WYSIWYG Inside Text Area : TinyMce

Want to edit the text you add for your web application or website with at WYSIWYG (What You See Is What You Get) editor inside your text-area. Here is a perfect solution for you, its mainly free, easy to install, fast to load, platform independent and may even be integrated to the Content Management System (CMS) you are using. It called TinyMCE.

Dec
16

Santa make CSS fully Programmable

Christmas is around 10 days away, here is my wish to Santa.

Dear Santa,
Sometimes I think why is Cascading Style Sheet(CSS) not fully programmable like other programming languages? I'll be glad if this Christmas you can gift us (whole web designing and programming fraternity) something like CSS 2.0 or CSS++. That will largely simplify the way we do CSS. I hope you devise someting that will make all the webpages we develop look same in all the browers though it is Firefox, Internet Explorer, Opera, Netscape and we don't ever have to use