17
Jun, 2015
suresh's picture

0 Comments | Submitted by suresh

The Vimeo Advanced API allows the users to access, edit, and upload videos (if approved). With the advanced API, we will be able to create albums, add videos to albums, channels, and groups as well. Let's take a look at what you need to do in order to make the vimeo advanced API work in drupal:
  1. Install the vimeo API on your drupal site.
  2. Register your site with vimeo and get the Consumer Keys.
  3. Authorize your site and get the OAuth Tokens.
  4. Start using the Advanced API for vimeo.
Installing the vimeo API
  • Download the "Advanced API PHP Library" from here
  • Extract the contents of the zip file and move them to a folder called "vimeo" on the root of your drupal website.
Registering the drupal site with Vimeo
  • Login to your vimeo account, and register your website as a new "app" at https://developer.vimeo.com/apps/new
  • Enter the values of required field.
  • Use the URL of your website as the 'Application URL'.
  • Enter the "Application Callback URL", which is very important as the authentication process will start from here.
  • When you are registering an app for the first time, then you may have to wait for a human to authorize the app request.
  • Get your 'Consumer Key' and 'Consumer Secret' and save them to proceed forward.

Read more →

16
Jun, 2015
sivaji's picture

0 Comments | Submitted by sivaji

This is one of the bothering issues we had lately in our project. I'm summarizing the list of causes and possible ways to fix / mitigate the same. So what is Apache's Internal Dummy Connection is all about? Official Wiki page explains it better. See snip below,

When the Apache HTTP Server manages its child processes, it needs a way to wake up processes that are listening for new connections. To do this, it sends a simple HTTP request back to itself. This request will appear in the access_log file with the remote address set to the loop-back interface (typically 127.0.0.1 or ::1 if IPv6 is configured). If you log the User-Agent string (as in the combined log format), you will see the server signature followed by "(internal dummy connection)" on non-SSL servers. During certain periods you may see up to one such request for each httpd child process.

#1: VirtualHost

As mentioned, Apache makes a call to itself. If your default VirtualHost is configured to serve dynamic database driven site like Drupal, it will certainly result in increased resource utilization. Changing the same to serve static index.html should make the dummy http request faster and less resource intense. Even if you have directory listing, symbolic links and/or AllowOverriding turned on, it is suggested to disable them.

#2: .htaccess Rewrite Rule

If default VirtualHost couldn't be changed for some reason, with mod_rewrite you can prevent request hitting the Drupal with rewrite rule. 

Read more →

10
Jun, 2015
suresh's picture

0 Comments | Submitted by suresh

GitLab is a web-based Git repository manager with wiki and issue tracking features. GitLab is written in ruby on rails.

Installing gitlab omnibus package won't be that difficult following the guide given here. But when it comes to installing gitlab on centos 5.5, it isn't that easy as there are no omnibus packages available for centos systems with version less than 6.5. So let's look at the steps that need to be followed to make gitlab installation successful on centos 5.5:

1. Install the development tools necessary to compile applications from source

Read more →

16
Apr, 2015
selvam's picture

0 Comments | Submitted by selvam

Drupal has a solid Ajax interface, we can hook into the Ajax events at various places. I will explain some 5 important methods,
 
1) beforeSerialize - called before data is packed and runs before the beforeSend & beforeSubmit
2) beforeSubmit - called before the ajax request
3) beforeSend - called just before the ajax request
4) success - called after ajax event returns data
5) complete - called after the request ends
 
Lets say you want to capture some ajax event (in built or made by other module) to do some event like Views refresh. We can use a very simple logic to do that.
 

Read more →

03
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().
<?php
/**
 * 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 →

Subscribe to RSS - Drupal planet