The Techjoomla Blog

Stay updated with all the latest happenings at Techjoomla. From news about the developments in your favourite extensions to Tips & Tricks about the Joomla CMS, Framework & Development.
Font size: +
1 minute reading time (152 words)

Creating your own ajax popups and actions in Jomsocial

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'); ?>
</a> 

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);
}

 

0
×
Stay Informed

When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn't miss them.

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

Related Posts

 

Blog Topics