Webspeaks

Thursday, May 31, 2012

Login and Register Script with Linkedin API and Javascript

Linkedin is the topmost social network for professionals. In this article I have explained how to use the Linkedin JavaScript API to access and use the user details from Linkedin. Linkedin provides a very beautiful API for developers to fetch the user details. We can use these details for a number of purpose on our web pages like login/register using Linkedin, showing user details from Linkedin, form autofills etc. See the live demo.

Tuesday, May 29, 2012

Highlight Threaded Author Comments on Blogger - The Simplest Way

If you have implemented the threaded comments on your blogger blog then it is a bit tricky to highlight the author comments. The template hacks are rarely available for this. I searched over the web and came up by solutions that involved using jQuery library for highlighting the author comments. But that would increase the page load time. So I decided to find the hack myself. After half an hour I came up with the simple solution written in pure JavaScript. This hack finds all the comments on the page and then detects if the comment has been posted by author or someone else. Then we add our custom class to highlight the comment posted by the author.
Note: This hack has been developed for the default blogger template. If you have customized the comment section, implementation may vary. You can check this implementation on this blog at this article.

Monday, May 28, 2012

Search Google Plus Profiles using PHP and Google Plus API

The main aim of this application is to go familiar with the Google Plus API usage. Google Plus provides an extremely easy to use API to access the public contents on it. Here we will create a simple search application to search user profiles on Google Plus. See the live demo.

Thursday, May 24, 2012

Add New Column to Existing Database Table in Magento

While writing codes for Magento, sometimes you would like to add new columns to existing tables in Magento database. These situations arise very frequently in Magento programming. Suppose you want to add a custom 'referred_by' column to the items in your wishlist. Magento stores the wishlist items in the 'wishlist_item' table. So here we will add 'referred_by' column to the table. This column will store the id of the customer who referred a certain product. Now we will see how to add this column to existing 'wishlist_item' table. For this you have to create a custom module (how to create Magento module). Suppose you have created your module 'Web' under 'Company' namespace. In the sql installer file for this module, we will write the code to add the new column.

Thursday, May 17, 2012

Insert 'Read More' button in Blogger Imported posts in Wordpress

If you have just imported your posts and comments from Blogger to WordPress then you might have faced two problems:
1. There is a '>' symbol prepended to each post title and post content.
2. Your 'Read more' button from blogger posts is missing.
I have found a simple solution for these problems.

Wednesday, May 16, 2012

jCouch - A jQuery Plugin for Distraction Free Page View

jCouch is a very lightweight jQuery plugin that provides you the feature of viewing a web page in distraction free mode. If your website is text oriented and the visitors on your site prefer reading your site content then this plugin will allow the users to read your web pages in the most convenient way without being distracted by other less useful content on the site. The plugin allows you to combine the selective parts of the web page in a single view. See the live demo.
 Features
  • Light weight
  • Easily customizable
  • Zoom text feature
  • Full jQuery Selectors Support
  • Disable on pressing 'Esc'

Wednesday, May 9, 2012

How to create custom module in TikiWiki

TikiWiki or simply Tiki, is a free and open source wiki-based, content management system and Online office suite written primarily in PHP. Tiki is a powerful all-in-one web-based application, offering collaboration, publishing, commerce, social networking, CRM and office productivity tools. If you have just started your Tiki development then you will frequently need to create custom modules in TikiWiki. In this article I will tell you how to create your custom TikiWiki module from scratch. For creating you own module, you need to add two files in TikiWiki:
  • A php module file
  • A smarty template file

Tuesday, May 8, 2012

How to Test PHP Emails on Localhost

While developing web applications on localhost you must have always missed the functionality to send mails. As localhost does not support email service, so it has always been a bottleneck for email testing on localhost. But I have found a simple way to test emails on localhost using PHP. I have overridden the default mail() function of PHP to create a text/html file based on the email format. If the email is in html format, an HTML file is created otherwise a text file is created. You can see in this file what exactly is the content sent in your mail. See how does it work.

Thursday, May 3, 2012

Magento Customer Chat Extension - Live Demo Released

I have released the live demo of my 'Customer Chat' extension for Magento. If you still dont know what this extension is, read this article.
Quick Overview: Magento Customer Chat extension allows the customers on your store to communicate with each other in real time. The logged in customers on your store can see other logged in customers and chat with each other. The chat boxes are opened in Gmail style and new chat notifications are also shown over the browser window title bar.

Wednesday, May 2, 2012

Add/Update Attribute Option Values Programmatically in Magento

Adding/Updating the attribute option values programmatically in Magento can be tedious sometimes. Adding attribute options through custom codes is not big deal but updating the values for already added attribute options is tricky enough.
Problem: Lets understand this by an example. Suppose we have a product attribute 'manufacturer'. It is of type select/dropdown. And we have few options added in it like Mac, Google, Android etc. Now at some point in our Magento application we want to update these options with Apple, Nexus, HTC etc without using the admin panel, then it is a problem.