Shoutbox was greatly enhanced in Dolphin 7.2 as the result chat can be added almost anywhere.
As an example let’s create chat with 2 rooms “Public” - where anyone can post, and “Private” - where only users with specific membership can chat.
Before proceed, make sure that “Shoutbox” and “Page Access Control” modules are installed.
1) Add “Public Chat” page in Dolphin Admin Panel > Builders > Pages Builder > Add Page. Let’s name it “Public Chat” with “public-chat” page URI.
2) Add two columns to the newly created page, make left one wide, then place HTML block to the right narrow column.
3) Similar to step 1 - add “Private Chat” page in Dolphin Admin Panel > Builders > Pages Builder > Add Page. Let’s name it “Private Chat” with “private-chat” page URI.
4) Make the same page layout, repeating Step 2 for this page.
5) Add PHP blocks to the wide column by running the following query:
INSERT INTO `sys_page_compose` (`Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`, `Cache`) VALUES ('public-chat', '1140px', 'Public Chat', '_Chat', 2, 1, 'PHP', 'return BxDolService::call(''shoutbox'', ''get_shoutbox'', array(''bx_shoutbox'', $iBlockID));', 11, 75, 'non,memb', 0, 0), ('private-chat', '1140px', 'Private Chat', '_Chat', 2, 1, 'PHP', 'return BxDolService::call(''shoutbox'', ''get_shoutbox'', array(''bx_shoutbox'', $iBlockID));', 11, 75, 'non,memb', 0, 0);
6) Now we need to add links to chat rooms. On both pages - edit HTML block in the right narrow column and insert the following code there (you need to switch editor to source code):
<a href="page/public-chat">Public Chat</a> <br /> <a href="page/private-chat">Private Chat</a>
Also change blocks title to “Rooms”.
7) Now we need to set restriction for “Private Chat” page.
First - make block with chat invisible for visitors in Admin Panel > Builders > Pages Builder > select “Private Chat” page > click on “Chat” block > untick “Guest” checkbox and click “Save”
Second - go to Dolphin Admin Panel > Modules > Page Access Control > Page Block Access, select “Private Chat” page, click on “Private Chat” block, select levels which have access to this chat and click “Save Changes”
Enjoy the result!