Drupal 7: Adding custom fields for Profile page.

April 1, 2015
DRUPAL 7 If you want to add additional fields for profile and registeration pages in Drupal-7 follow following steps: 1) Enable (if not enable) the Profile module from Admin -> Module. 2) Go to Admin -> Configuration -> Account settings -> Manage Fields. You will see “Add new field” label. Enter Label for new field and data type for ...
Read more..

wordpress custom role capabilities

March 24, 2015
Besides default capabilities in wordpress, we can set additional capabilities for our custom plugins or custom pages. Setting custom role capabilities in wordpress for custom plugin is as below: Add following line in your plugin file (suppose you have created a test plugin with folder name as “test_plugin” than put the following lines in “test_plugin.php” file: function add_new_capability() ...
Read more..

Sending email from localhost

March 18, 2015
Now developer can test email functionality before deploying to the production or staging server in his local environment itself. Just we need to change few files in XAMPP to make it working. You need to change two files for it, i.e. php.ini file which you will find “C:\xampp\php\php.ini” and another is sendmail.ini which can be located ...
Read more..

Auto login to WordPress using user email id or id

March 10, 2015
Using inbuilt functions of Wordpress user can do auto login for the application. As a client requirement my wordpress need auto login using user email id, so after doing some google i came to know about function wp_set_current_user() which sets the current user (but does not do auto login) and wp_set_auth_cookie sets the authentication cookies ...
Read more..

Genrating SEO friendly url using .htaccess and modrewrite

September 29, 2014
Here how you can create clean SEO friendly url: Normal practice of using url: 1) 2) 3) You can just rewrite it like 1) 2) 3) Let see how we can achieve this: 1) You need to enable “mod_rewrite” of apache as below: For enabling “mod_rewrite” open file “httpd.conf” and remove “#” from beginning of the below line: LoadModule rewrite_module modules/ 2) ...
Read more..

Creating Contact us page in Drupal 7

September 10, 2014
Following are the steps to enable, configure and adding Contact us form: Enabling Contact module: Login to Admin and click on “Modules” link from the top admin menu you will see below screen. Check the Contact module and save configuration button at the bottom. By checking you made it available to use in your application.   Now need to ...
Read more..

RSS feeds generator

September 1, 2014
RSS is an easy way to provide contents of your sites in form of XML. RSS is written using XML, so we can define our own tags while generating RSS feeds. Here I provided a sample PHP code how we can generate RSS feeds for the site. By following this blog you will be able to generate ...
Read more..

Migrating content/node from drupal 4.x to drupal 7.x

April 11, 2014
Drupal having a huge support with version 6 > but with 4.X with no support and 5.x with limited support. Initially I install few module to import node/content with CSV/XML but they are not working as expected. I need to import content first which include mainly title, description images(more than one) and attachments (more than ...
Read more..

What is the difference between SMTP server mail() and PHP mail()

April 9, 2014
PHP support mail() function for sending mails. And in general we use it as it fast and easy to do it. But by doing this we for exactly what we are doing this. Because when we use mail() native function of php it goes to Spam box and not in inbox of the intended recipient.
Read more..

Wamp server port conflict with skype

March 24, 2014
If you are a PHP developer with WAMP install in you system which gives error for port number (if skype is already started). WAMP does not go green if you are logged in to skype and wanted to start your WAMP server it will not start. We can solve this problem in two ways: A) Start your WAMP ...
Read more..