PHP

Wednesday, June 12, 2013

List of some best Drupal slideshows

Slide shows play important part in the website to attract visitors. There are different types of slide show with variety of cool effects. Among a lot of slide show modules i prefer some of these modules.
  1. View Slideshow
    Views Slideshow can be used to create a slideshow of any content (not just images) that can appear in a View. Powered by jQuery, it is heavily customizable: you may choose slideshow settings for each View you create. Click here to view the demo.
  2.  Flex Slideshow
    Flex Slider module integrates the Flex Slider library with Drupal and several contributed modules which allows you to build responsive, resizable slideshows. Try out a DEMO
  3. Dynamic Display block
    Dynamic display block slideshows are mainly used to showcase featured content at a prominent place on the frontpage of the site in an attractive way. A featured content slideshow can contain e.g.: New articles, Most popular content, New products, Portfolios, Videos etc. Click Here for DEMO
  4. Galleria
    This module allows users to create image galleries using the Galleria jQuery plugin, found on http://galleria.aino.se. For demo click here
  5. Image Flow
    This module integrates the ImageFlow plugin with views. It has support for the link field. The customizable onClick function can be used to open links, images, or videos in a colorbox. DEMO


 

Tuesday, June 11, 2013

Drupal 7 Module Install file

While creating a new Drupal 7 module, sometimes we need to interact with database. Moreover, we need to create our own table for the module we are creating. This can be achieved using a .install file. We can create  tables for modules manually using MySQL GUI tools, but if we want to make our module install able in any Drupal 7 intallation server then we should create a .install file.
Below are the steps on how to create a .install file:

  1. Open a text editor, i prefer Notepad++.
  2. Create a new file.
  3. Add your install code in the file, sample code is shown in the screenshot below.
  4. Place the file in the module directory, See here on how to create a simple module.
Now when you install the module form admin module section your table will be automatically created in the database.

Sunday, June 2, 2013

Adding a Contact Us form in Drupal 7

Every website needs a contact us form so that the visitors can easily contact the site owner. In case of Drupal, there is a core (packaged with Drupal installation) contact module. This module is disabled by default. I will explain you how to enable and customize this module in Drupal.

Assuming that you have already installed Drupal in your system or server.

  1. Go to modules section (http://www.sitename.com/admin/modules).


  2. Search for contact (I use Browser's search cntrl+f).
  3. Enable It by clicking the check box before it.
  4. Go to contact configuration section (http://www.sitename.com/admin/structure/contact)
  5. Suppose you want to give your users the choice to select where they want to send their contact details then  you can create contact categories here with separate emails to each categories.
  6. Finally, you need to enable the contact link in the menu.
  7. Go to admin -> structure -> menu (http://www.sitename.com/admin/structure/menu).
  8. By default contact menu is under the navigation and it is disabled.
  9. Edit the menu enable it and you are ready to go....