Aug, 2015
suresh's picture

1 Comments | Submitted by suresh

Moodle is a free and open-source software learning management system written in PHP and distributed under the GNU General Public License. Moodle is used for blended learning, distance education, flipped classroom and other e-learning projects in schools, universities, workplaces and other sectors.

Our main objective is that we wanted to manage all the users from Drupal i.e., use drupal as the front end for managing users. For this purpose, we have a moodle plugin and drupal module. Drupal services is a moodle authorization plugin that allows for SSO between Drupal and Moodle. Moodle SSO provides the Drupal functionality required to allow the Moodle training management system to SSO share Drupal sessions. 

In order to make SSO work, we need to ensure that sites can share cookies. Drupal and moodle sites should have url like drupal.example.com and moodle.example.com. As mentioned earlier, sites should be able to share cookies. To make sites use shared cookie, we need set the value of $cookie_domain in settings.php file on the drupal site. In our case, the site urls was something like drupal.example.com and moodle.example.com. For these type of sub-domains, the cookie_domain value can be set like the below one:

Read more →

Aug, 2015
Manikandan's picture

1 Comments | Submitted by Manikandan

This post explains about creating slideshow in drupal. There are many ways and plugins available to create slideshow in drupal and I am going to discuss some methods which will be very efficient and useful.

1) Using Views slideshow module

2) Using jQuery cSlider plugin

3) Using Bootstrap carousel

1. Using Views slideshow module:

The modules required for this method are:

  1) Views

  2) Views slideshow

  3) jQuery cycle plugin ( Download here and place it at sites/all/libraries/jquery.cycle/)

Enable the added modules. To create views slideshow, create a new content type for instance "Slideshow" with an image field which can be used as slideshow image.

Add multiple slideshow nodes with images. Then, we have to create a view block with slideshow content. Select "slideshow" as required format and configure transition effect in the Settings link.


After saving this view, place this view block at neccessary region at admin/structure/blocks.

2. Using jQuery cSlider plugin:

1) You can download this plugin from here. There is also a demo file in this plugin which can be used as a reference.

Read more →

Aug, 2015
sasikumar's picture

1 Comments | Submitted by sasikumar

As we all know that, we were all getting projects and clients across the globe. But doing a multilingual website with each having different set of requirements make the website handling tougher and tougher. Also, building a multilingual web site involves much more than translating content from one language to another. Translation must be done with an awareness of a language's idioms as spoken within a geographic region. But in Drupal we’ve been provided with rich set of core and contrib modules, which supports translation for our website(s). When we go deeper in the concept of Drupal Translation, there is a lot more can be learnt. Well, here I explain you a few concepts that i’ve come across.

The Translation Methods:

In Drupal 7, we have two different types of translation methods, which we can call as two main modules to implement translation of content in order to make a site multilingual. One is Entity Translation (contrib) and the other one is Content Translation (core).

  1. Content Translation

    1. a core Drupal module that allows you to translate nodes.

    2. Translated nodes are mapped together, but if they are distinct nodes that can be treated separately.

  1. Entity Translation

    1. Translation module lets you translate particular fields, while only a single node or entity is created.

Read more →

Apr, 2015

0 Comments | Submitted by Gurumoorthi

This blog describes how to hide "Promoted to front page" and "Sticky at top of lists" options from node editing page in Drupal. When adding or editing a node, you can see "Publishing options" at bottom of the page which contains 'Published', 'Promoted to front page' and 'Sticky at top of lists' checkbox options. The below image shows you the three options:
   Disable promoted to front page and sticky at top of lists options
The "Published" option is used to publish the content. The "Promoted to front page" option is used to display content in the front page. The 'Sticky at top of lists' option is used to keep the content sticked to the top of front page. If you don't need to show "Promoted to front page" and "Sticky at top of lists" options, then you can hide those options easily. You can hide these options by altering the form either using either hook_form_alter() or hook_form_form_id_alter().
 * Implement hook_form_FORM_ID_alter().
function kf_form_article_node_form(&$form, $&form_state) {
  // hide promoted to front page option
  if (isset($form['options']['promote'])) {
    $form['options']['promote']['#access'] = FALSE;

  // hide sticky at top of lists option
  if (isset($form['options']['sticky'])) {
    $form['options']['sticky']['#access'] = FALSE;

Read more →

Mar, 2015

0 Comments | Submitted by Gurumoorthi

This blog describes how to solve PDOException - SQLSTATE[22003] - Numeric value out of range: 1264 Out of range. When you try to store large integer value in 'integer' field type, then you will get this error. It is because the maximum value of 'integer' field type is exceeded. 
For example, you want to store phone number in a content type. Then you may create new field with 'integer' field type in the content type. When you store 10 digit phone number in this field, "PDOException error" will be shown. MySQL allows you to store values from -2147483648 to 2147483647 in integer field type if signed, so you can't store phone number in 'integer' field type. MySQL allocates 4 bytes for 'integer' field type ie.,
4 bytes = 4 x 8 = 32 bits
2^32 => 4294967296 values
2^32 - 1 => 4294967295 (if unsigned, 0 to 4294967295 values)
-2^(32 - 1) to (2^(32 - 1) - 1) => -2147483648 to 2147483647 (if signed, -2147483648 to 2147483647 values).
If you want to store large integer value, then you need to use field type either 'bigint' or 'text field'. If you choose 'bigint', then there is no need to add custom validation for phone number field. On the other hand, if you choose 'text field' then you need to add custom validation using either hook_form_alter() or hook_form_form_id_alter().
 * Implement hook_form_alter()
function kf_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id == 'your_form_id') {

Read more →

Subscribe to RSS - Drupal 7