You are here

Drupal Follow Block Customization Manual

Look to your right and you'll see a list of social icons under "Follow Me" (my other websites Mediography.by & Vector.dj have their own versions). To do this I use a Drupal module called Follow on all of my websites because it's my favorite one for letting people know where to follow me on social networks. Today I'll show you some slick tricks on customizing this module. Here we go:

1) One of the main problems with this module is the lack of a good consistent image set. For example, most of the images are round, but some are square. And only images of the most popular websites are supported.

But if you noticed, my image sets are much nicer. Here's what you can do to get the same results:

A) Google "social icons", and you'll find a gazillion different sets of icons. Choose whatever set that has all the icons you need for your website. And if you are thinking about creating a custom icon so that members of your website can enter whatever link they want, make sure whatever you create will match the ones you use.

I got mine from Enfuzed (download) for their simplicity. Most of their icons are perfect, and I was able to easily create a better looking icon for SoundCloud. I was also able to create a matched set for Mixcloud & Mediography.by that integrated well with them.

Here is the full list of all the ones that I use on my websites (download), to save you a bit of time from having to create them yourself by cropping them one by one from the original file:

          
          
          

Mediography.by Social Media Icons

B) Then just replace the existing icons with this set.

2) When you go to configure the module in admin/config/services/follow, you'll notice a default set of social networks listed. To change this list, just open the follow.inc file and change the code in lines 325 - 393 to exactly how you want it.

3) If you want to add the capability for your users to add custom links, you'll need to do a couple of things:

A) First, add the following code to line 325 in the follow.inc file:

'custom' => array(
'title' => t('Custom'),
'domain' => '',
),

B) Now upload the file, and try submitting a custom link. You should get an error message. To get rid of this problem, change the code in lines 210 - 214 in the follow.inc file to the following:

form_error($form, $message);
}
//else {
//$message = t('The specified path is invalid. Please enter a path on this site (e.g. rss.xml or taxonomy/term/1/feed).');
//}

The result of all this can be best seen at my Mediography.by profile page. Towards the right top, you'll see the social icons for following the company itself. And towards the right, you'll see the social icons for following me.

I hope this blog post inspires you to customize this awesome module and use it to its full potential. Good luck! :)

You are here