Page 1 of 1

IPBoard Load ArrowChat for specific groups

PostPosted: 11 Jul 2012, 14:04
by bulletprooftemplates
Hi Folks,

I wanted to set up arrowchat on our community so that only certain usergroups have access to it rather than all logged in users.

This was actually a lot easier to accomplish than I at first imagined, it took a bit of google-ing and sideways thinking but I got it working, so I thought I'd share in case anyone else wants to do something similar.


IPBoard v3.2.x +

Step 1:
Install arrow chat as per installation instructions

Step 2:
When you are asked to add code to your IPBoard templates add it wrapped in the following IPB if statements where the array values are the id's of the groups that you want to grant access to arrowchat:

Header Code:
Code: Select all
<if test="IPSMember::isInGroup($this->memberData, array('3', '12'))">
<!-- ARROWCHAT -->
<link type="text/css" rel="stylesheet" id="arrowchat_css" media="all" href="/arrowchat/external.php?type=css" charset="utf-8" />
<script type="text/javascript" src="/arrowchat/includes/js/jquery.js"></script>
<script type="text/javascript" src="/arrowchat/includes/js/jquery-ui.js"></script>

Footer Code:
Code: Select all
<if test="IPSMember::isInGroup($this->memberData, array('3', '12'))">
<script type="text/javascript" src="/arrowchat/external.php?type=djs" charset="utf-8"></script>
<script type="text/javascript" src="/arrowchat/external.php?type=js" charset="utf-8"></script>

Please note that you must change the paths to ArrowChat if it is not correct.
You may also leave out the jquery.js and jquery-ui.js calls if you already have them on your site.

It really is THAT easy :)

PostPosted: 11 Jul 2012, 14:05
by Jason
Thank you very much for posting!

PostPosted: 11 Jul 2012, 14:07
by bulletprooftemplates
You're welcome Jason :)

Topic Closed

PostPosted: 16 Dec 2014, 00:26
by Staff Bot
[b]This thread has been locked because the last post is greater than six months old. There is a good chance that the information in this thread is outdated. Please open a new topic if you wish to discuss this further.[/b]