Blogs

Content managers have to deal always with metadata provided by imagery of your website, this can be a tedious task for them and obviously it takes time to fill out all the meta data for your images so they can be  properly displayed on the site, indexed by search providers, etc.

One of the easiest ways I found to get information from an image file on Drupal is by using a module called Exif, this module uses the exif specification format to get the information used by digital cameras for example. This…

Read more...
Friday, February 14, 2014

On this tutorial we will learn how to easily install the necessary Ruby packages needed on Ubuntu 14.04 in order to run compass and let Drupal do the magic with SASS.

On a terminal window type:

$sudo apt-get install ruby ruby-dev

once ruby is installed, run:

$sudo gem install compass
$sudo gem install sass

and there you go!

run "compass watch" on the Drupal theme folder you chose for you site and that's all, Compass will start scanning all the *.scsc files and compile all the changes on your styles.

$cd /my-drupal-site/sites/all/themes/my-responsive-theme-with-sass-support/
$compass watch

Enjoy!

Wednesday, February 12, 2014

Some helpful samples that can be used to process data after a query on Drupal.


<?php
// Retrieve all records into an indexed array of stdClass objects.
$result->fetchAll();

// Retrieve all records into an associative array keyed by the field in the result specified.
$result->fetchAllAssoc($field);

// Retrieve a 2-column result set as an associative array of field 1 => field 2.
$result->fetchAllKeyed();
// You can also specify which two fields to use by specifying the column numbers for each field
$result->fetchAllKeyed(0,2); // would be field 0 => field 2
$result->fetchAllKeyed(1,0); // would be field 1 => field 0

// Retrieve a 1-column result set as one single array.
$result->fetchCol();
// Column number can be specified otherwise defaults to first column
$result->fetchCol($column_index);
?>

Friday, September 27, 2013

The idea of this blog post is to show how to install and configure a secure FTP access to your server and provide support for your users.

I'm configuring it so all you users can have their /home/{username} directory available as their FTP folder(s) which I think is one of the most secure ways of configuring an FTP service. After following this tutorial you can create a "ftp" user in your system without ssh access (you can google that ;) ) and use it as you generic ftp user. First of all we need to download the FTP server, in this case I'm going to be using VSFTPD, in order to download it, we need to add the ppa to our system by issuing the following commands:

# sudo add-apt-repository ppa:thefrontiergroup/vsftpd sudo apt-get update

and then install the package:

# sudo apt-get install vsftpd

Read more...
Thursday, September 19, 2013

Zend Server 6 is the latest Application Server for PHP development supported and distributed by Zend, it's an awesome piece of software the lets you deploy and manage your PHP apps in no time.
There are tons of new features on this version compared to what we had previously on ZS 5. Totally recommended!

Below i'm describing how to install it on Ubuntu Server 13.04:

login on your server as root:

1) edit the /etc/apt/sources.list file and add the following entry:
    deb http://repos.zend.com/zend-server/6.1/deb_ssl1.0 server non-free
    *Note: this repo will also work with Ubuntu 12.04/12.10

update your repositories
# apt-get update

add the public key with this command:
# wget http://repos.zend.com/zend.key -O- |apt-key add -

and finally, install the packages :
# apt-get install install zend-server-ce…

Read more...
Thursday, August 15, 2013