By default block body does not support Drupal token. To parse token in block body you need to install Token filter. Following are the steps to install and configure Token filter module: 1) download Token filter module and place in “site/all/default” folder. 2) Go to admin-> module and search for “Token filter”. Select “Token filter” and click “Save ...Read more..
Creating a custom or new block in your Drupal 7 template is very easy. Follow the steps to create it: Step 1. Go to your theme folder and look for “.info” file. I am using theme “corporate” so info file will be located “themes\corporate\corporate.info”. You will see different location/blocks in your theme. like below: regions ...Read more..
Drupal-7 store one way encrypted password in database and can not be recover if we forgot. Below is the code we can use to reset your password of your choice. (You can reset it using sending email also..here I am showing how to reset it using backend) Just create a file “new_password.php” (or with any other name) inside ...Read more..
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..
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..
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..
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..
Here how you can create clean SEO friendly url: Normal practice of using url: 1) http://sforsuresh.in/user.php?u=123 2) http://sforsuresh.in/user.php?u=123&cat=php 3) http://sforsuresh.in/page.php You can just rewrite it like 1) http://sforsuresh.in/user/123 2) http://sforsuresh.in/user/123/php 3) http://sforsuresh.in/page 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/mod_rewrite.so 2) ...Read more..
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 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..