Data at Your Fingertips: Explore Our New Reporting and Statistical Capabilities By Ryan Ashbrook Tuesday at 01:29 PM
sweethoney Posted December 15, 2016 Share Posted December 15, 2016 Restrict What Member Groups Can Use CometChat? Go Into Your Admin Panel And Themes --> Edit HTML/CSS --> globalTemplate Replace Your CometChat Script With {{if \IPS\Member::loggedIn()->inGroup (array(4,7,13))}} <link type="text/css" href="/forum/cometchat/cometchatcss.php" rel="stylesheet" charset="utf-8"> <script type="text/javascript" src="/forum/cometchat/cometchatjs.php" charset="utf-8"></script> {{endif}} Change The Numbers In The {{if \IPS\Member::loggedIn()->inGroup (array(4,7,13))}} With The Numbers Of The Usergroups You Want To Let Use Cometchat, You Will Find The Number In The URL When You Go To Admin --> Members --> Groups --> Edit Then The URL Will Look Like http://yoursite.com/admin/?adsess=LOADS_OF_RANDOM_CRAP&app=core&module=members&control he Number Of The Group Is 4 As You Can See At The End Of It groups&do=form&id=4 To Add More Groups Just Add Another , With The Number Of The Group Link to comment Share on other sites More sharing options...
Joy Rex Posted December 15, 2016 Share Posted December 15, 2016 Amazing the IPS integration with Cometchat doesn't support limiting access to Member Groups by default... Link to comment Share on other sites More sharing options...
sweethoney Posted December 15, 2016 Author Share Posted December 15, 2016 yea i know that would be awesome Link to comment Share on other sites More sharing options...
WOFman Posted December 15, 2016 Share Posted December 15, 2016 Thanks for the code Link to comment Share on other sites More sharing options...
sweethoney Posted December 16, 2016 Author Share Posted December 16, 2016 your welcome Link to comment Share on other sites More sharing options...
MDPP Posted December 16, 2016 Share Posted December 16, 2016 You can also limit it to members only with this: {{if \IPS\Member::loggedIn()->real_name != "")}} <link type="text/css" href="/forum/cometchat/cometchatcss.php" rel="stylesheet" charset="utf-8"> <script type="text/javascript" src="/forum/cometchat/cometchatjs.php" charset="utf-8"></script> {{endif}} Guests will not have access to CometChat with this code. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.