1 minute reading time (152 words)

Creating your own ajax popups and actions in Jomsocial


Everyone using Jomsocial like how they show those nice popup windows when you add friends, send a message or join a group.

In a project where you integrate more features or other extensions into Jomsocial, it's important to use the same look and feel for the popups so that there is a consistent look throughout the site. With Jomsocial's plugin architecture it is possible to add your own popups and actions. We're demonstrating here an example, which allows you to group your friends as Friends/Family/Acquaintances etc

1. Let's start by adding a 'Change Group' link on the list of friends page. Override the list of friends page to add a new link 'Change Group'

<a onclick="changeGroup(<?php echo $user->id; ?>)" href="javascript:void(0);">
	<?php echo JText::_('COM_COMMUNITY_ADD_GROUP_FRIEND'); ?>

2. Next, we'll need to define the changeGroup function on the page

function changeGroup(friendid) {
	var ajaxCall = 'jax.call("community","plugins,coverride,ajaxUpdateConnection", '+friendid+')';
	cWindowShow(ajaxCall, 'Update Group', 450, 300);


Techjoomla is Coming to Joomla Day India
Join Joomlart & Techjoomla in Helping raise 1M $ f...

Related Posts


By accepting you will be accessing a service provided by a third-party external to https://techjoomla.com/

Blog Topics