Posts Tagged ‘PHP’

Drupal- Ten Easy Step to Step Guide on How to Run Multiple Web Sites from single Drupal Installation with the same code base (multi-site)

The key is that you need to create multiple MySQl database (for different websites), create a new directory in “/sites/your-site-name” folder which includes “default.setting.php” file renamed to “settings.php” and finally have your virtual host settings correctly setup. Thats it!

Install PHPUnit Manually without Pear for a Single Project to test source code classes with or without Wamp/XAMP installation

Step By Step Guide to install PHPUnit This tutorial is an easy start to test your PHP source code which is build using classes i.e. OOP’s with/without wamp/xamp doesn’t really matter. The key to PHPUnit installation is set correct include path of your PHPUnit directory and extend correct phpUnit class in test case file. Related [...]

Drupal- What is the difference between Page.tpl.php and Node.tpl.php in drupal?

There is a very basic question which everyone asks that what is the basic differences between node.tpl.php and page.tpl.php? Page.tpl.php This template holds the wireframe of the webpage/website like- blocks, regions, header, footer, css, js files and most importantly “main content” etc..

Drupal- How to include a file in drupal template, theme like common Header, Footer

Here is how you can include a common header, footer in drupal- <?php include ($directory.”/includes/header.php”); ?> “$directory” is a variable automatically available in Drupal which holds the value of a path to your currently executed theme.

Drupal- How to add a drop down menu to your website using CSS SuckerFish Menu

A drop down menu can be easily added to you website using basic CSS. Here we will explain that how to add a drop down menu to your drupal theme using one of the best menu system available- SuckerFish Menu.

Drupal- How to place a “name” attribute anchor link in menu item

If you are trying to place a “name” attribute in menu hyperlink then this can be accomplished by declaring  a function in your template.php file as below-

Drupal- List of Top most useful Drupal Modules, add on modules

When I started with drupal I installed number of modules which can be helpful in achieving a particular task. I am just listing down the top most important modules which are required for a full fledged website development using CMS- Drupal- There are no download links provided for some of the modules but they can [...]

Drupal- How to disable “Submitted by” author, date in Content Pages, Content Types

This can be easily disabled in Themes Global Setting configuration found at- Go to Admin -> Themes -> “Configure” Tab -> Global Settings. You can find the settings in this section.

How to use POST method/request in PHP CURL, Execute HTTP POST method in PHP CURL

PHP Curl is a powerful tool provided to the community as a souvenir. In simple words Curl is basically used to communicate with remote host, send a request and get a response. The response may contain data like a message, error response etc. So its a very simple process. There are certain Curl commands through [...]

How to send an attachment in an email using PHP- (PHP Send Email with Attachment)

Sending a valid email through coding guidelines has lately become a challenge. The spamming has taken roll all over the internet and out inbox full of unwanted emails. Smart mail servers scans each and every bit of email information, its headers, content etc. and then deciding to keep it in inbox or move it to [...]

Install PHPUnit On Wamp / Xamp Manually without Pear

All over the internet you can hundred of articles dealing with the installation of PHPUnit with Pear but rarely you will find any help for manual installation of PHPUnit with PHP or Wamp or XAMP on windows without installing Pear. There is no difference for the installation of PHPUnit if you have only PHP working [...]

Parse / Read RSS Feed using PHP

Reading any RSS feed using PHP is not a complex job. RSS feed is also a kind of XML with information defined in a pre-defined format. So the task is simple. We need to read the remote RSS file, parse the XML and display the content. Thats it!!! I have observed that programmers these days [...]

mPDF- Script to create PDF from HTML using PHP on the Fly

In my previous post I have discussed creating a PDF file form HTML code using PHP on the fly through domPDF library. These kind of requirements generally come up when you creating accounting softwares and are required to send an online invoice, quote or any other confidential document to customer or any user through email. [...]

Jquery with PHP Crop Image and Save Image thumbnail on the Fly

Internet world is getting very cozy whilst internet web pages are evolving to more user friendly approach i.e. web2.0. Most of the social networking websites like dating sites, photo albums sites are providing ability to the user to crop their image/photo and save them on the fly. As a developer you must be wondering that [...]

Jquery Add New Text Fields Dynamically

We have already disucssed with examples the power of Jquery, whether it is Jquery with Ajax, image uploading, form validation etc. We can very easily add fields dynamically to our html code dynamically. This means a virtual HTML code is inserted into your HTML code. The basic fundamental is that we are just appending required [...]