Revision: 13789
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at May 6, 2009 09:58 by krunkosaurus
Initial Code
if (Ka.Info.PAGE === "search/searchPage.jsp" && Ka.Util.getLocationParam('mediaType') === 'group') { $j(function() { var userid = Ka.Info.USERID; var aff = Ka.Info.AFFILIATESITEID; $j('#ka_contentContainer li.ka_list').each(function() { var $li = $j(this); var group = $li.find('h4 a:first').attr('href').match(/\/(\d.*)\//)[1]; var $button = $j('<button>Join Group</button>').click(function() { KickAppsBizComponent.joinClub(group, userid, aff, function(joined) { if (joined) { $button.text('joined').attr('disabled', 'disabled'); } }); }); KickAppsBizComponent.isUserMemberOfClub(userid, group, aff, function(isMember) { if (!isMember) { $li.append($button); } }); }); }); }
Initial URL
Initial Description
For a way to add quick "join group" functionality to your group list page - put this code in your AC footer (wrapped in script tags). --<br> For more tips and tricks checkout the <a href="http://www.kickdeveloper.com/resources">KickApps resources page</a>.
Initial Title
KickApps: Add join group to groups list page
Initial Tags
Initial Language
JavaScript