Posts Tagged ‘PHP’

Tutorial on how to create a theme in Drupal or create custom theme in Drupal

Tutorial on how to create a theme in Drupal or create custom theme in Drupal Following is the step by step guide to create a theme in drupal. Lets say name of your new theme is “mytheme“. Where to place the theme? All custom themes are generally places in “sites/all/themes/” folder. Create a “themes” folder […]

Automation testing using integration of Selenium, PHPUnit, Ant and create reports

Prerequisites for the integration of automation suit Selenium, PHPUnit and Ant are as below- http://www.unclecode.com/2010/05/install-phpunit-on-wamp-xamp-manually-without-pear/ http://www.unclecode.com/2012/05/how-to-setup-selenium-webdriver-and-execute-automation-script/ http://www.unclecode.com/2012/06/executing-and-creating-selenium-rc-automation-test-cases-using-phpunit-by-sebastian-bergmann/ Install Ant Download ant from http://ant.apache.org/bindownload.cgi “zip” file for windows. Follow all the steps for installation http://ant.apache.org/manual/install.html and  also optionally install the libraries as mentioned Automation testing using integration of Selenium, PHPUnit and Ant Run Selenium through command […]

Executing and Creating Selenium RC automation test cases using PHPUnit (by Sebastian Bergmann)

Setup PHPUnit framework http://www.unclecode.com/2010/05/install-phpunit-on-wamp-xamp-manually-without-pear/ assuming PHP 5.2.x is already installed in your system. If not download wamp to install PHP or browse php.net download section to install PHP. Make sure your PHP path is set in your environment so that you can execute PHP through command prompt. For reference check step 3 and 4 of […]

Executing and Creating Selenium RC automation test cases using Pear Selenium package

Download and install latest Java JRE (if does not exist on your system) Make sure you have installed PHP and its path is set in your environment so that you can execute php through command prompt. For reference check step 3 and 4 of article http://www.unclecode.com/2010/05/install-phpunit-on-wamp-xamp-manually-without-pear/ Download Selenium server and start the server through following […]

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.

Tutorial Article on 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 […]

Tutorial Article 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 […]

n