user-avatar
Today is Thursday
November 21, 2024

Tag: invite

May 13, 2014

JavaScript browser code to invite all your friends to like facebook page

by viggy — Categories: FOSS, FSMK, FSMK, programming, web — Tags: , , , , , 1 Comment

We have recently announced the FSMK Summer Camp for the year 2014 and also have a facebook page for the same. We wanted to spread the word out about the page by inviting all our friends to ‘like’ the page. FB shows you a list of your friendsĀ  and gives an option to click ‘invite’ for each one of them separately. When you do this, the invited friend gets a notification about the invite and hence more chances of his liking the page.

However this is still cumbersome as it means to invite all your friends which may be around 1000+, you have to click invite so many times.

But you have java script to the rescue. All you need to do is open javascript console on your browser and then execute the following code:


//Note that there is a space after uiButton. This class is the class of the invite button.
var inputs =
document.getElementsByClassName('uiButton _1sm');

for( var i=0; i < inputs.length; i++)
{
inputs[i].click();
}


To find out how to run javascript code in Firefox, check the following link.

If sadly you are not using the best and fastest browser, Firefox, then you can of course find similar tutorials for other browsers or realize it is time to switch to Firefox as Firefox29 is just released and its AWESOME!!!

P.S. The code was shared to me by Karthik Nayak from BMSIT GLUG.

February 15, 2011

How to make Users as Invite only in Drupal

by viggy — Categories: Uncategorized — Tags: , , , , , Leave a comment

If you are creating a specific site, you wouldnt want anyone Tom and Harry to be able to register in the site. Also you would not want the burden of adding users completely on the admin. The best solution for that is to allow existing users to Invite other users. This will ensure that any time you always have users who are linked to each other.
To enable this feature, you need to enable Invite module, http://drupal.org/project/invite. The settings are very basic. After enabling the invite module, you will have a Invite tab under User management. Change the settings as you want. Also after this, make sure that you go to User settings and change the Public registrations: to “New user registration by invitation only.” This should enable already existing users to see a link “Invite a friend” on their main menu.
Now I need to find out how to restrict the number of invites per user.