Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted December 15, 20168 yr 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
December 15, 20168 yr Amazing the IPS integration with Cometchat doesn't support limiting access to Member Groups by default...
December 16, 20168 yr 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.
Archived
This topic is now archived and is closed to further replies.