Help
Discuss anything regarding coding in here (PHP, mySQL, HTML, CSS, etc)
User avatar
bulletprooftemplates
Customer
 
Posts: 2
Joined: 11 Jul 2012, 00:21

 

by bulletprooftemplates 11 Jul 2012, 14:04

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.

Requirements:

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>
</if>


Footer Code:
Code: Select all
<if test="IPSMember::isInGroup($this->memberData, array('3', '12'))">
<!--ARROWCHAT-->
<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>
</if>


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 :)
Last edited by bulletprooftemplates on 11 Jul 2012, 14:05, edited 1 time in total.
User avatar
Jason
ArrowChat Team
 
Posts: 2160
Joined: 12 Dec 2009, 16:06

 

by Jason 11 Jul 2012, 14:05

Thank you very much for posting!
User avatar
bulletprooftemplates
Customer
 
Posts: 2
Joined: 11 Jul 2012, 00:21

 

by bulletprooftemplates 11 Jul 2012, 14:07

You're welcome Jason :)
User avatar
Staff Bot
ArrowChat Team
 
Posts: 8996
Joined: 07 Nov 2012, 13:41

 

by Staff Bot 16 Dec 2014, 00:26

[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]