Friday, February 18, 2011

SMTP configuration for sending mail with Drupal.


Email is an important part of a website. Sometime we cannot rely on the default SMTP settings provided by the hosting server. In many cases I was unable to send mail because the default sendmail installation no longer functioning. Fortunately I quickly found a solution with the SMTP Authentication Support module.

This module allows Drupal to bypass the PHP mail() function and send email directly to an SMTP server. The module supports SMTP authentication and can even connect to servers using SSL if supported by PHP. 

Thursday, February 3, 2011

How to Integrate AdSense in Drupal 6

AdSense integration in Drupal 6  

Although Drupal  AdSense module is  available in Drupal website (http://drupal.org/project/adsense) , this module is only for Drupal 5 and Drupal 6. If you want to place adsense ad in your Drupal 7 site or do not want to install this module , hope this code will be useful.   

If php filter module not enabled, enable the php filter module. Create a new block and place the code below. Do not forget to change the “Pub Id”.
<?php
$adsencead="<script type='text/javascript'><!--
google_ad_client = 'pub-XXXXXXXXXXXXXXXX';
/* 160x600, created 2/2/2011 */
google_ad_slot = '3339531126';
google_ad_width = 160;
google_ad_height = 600;
//-->
</script>
<script type='text/javascript'
src='http://pagead2.googlesyndication.com/pagead/show_ads.js'>
</script>"
;
echo
$adsencead;
?>


Change the input format from Filtered html to PHP code.



Tuesday, February 1, 2011

How to setup view in Drupal 6


Drupal view setup
Views is a powerful query builder for Drupal that allows you to fetch and present lists and tables of content  to the user in ways that are tailored to your site and your content. Views can provide output in a generic list, a table, or lists of teasers.