Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
sweethoney Posted December 15, 2016 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
Joy Rex Posted December 15, 2016 Posted December 15, 2016 Amazing the IPS integration with Cometchat doesn't support limiting access to Member Groups by default...
MDPP Posted December 16, 2016 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.