How to add AJAX Chat to Dolphin 7.2

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!

 

chat-1-create-page-public-chat.png · 21.9K · 1374 views
chat-2-add-columns.png · 25.5K · 1359 views
chat-6-rooms-editor.png · 21.1K · 1283 views
chat-6-rooms-source-code.png · 33.5K · 1379 views
chat-7-page-access-builder.png · 37.3K · 1382 views
chat-7-page-access-pac.png · 43.2K · 1273 views
chat-9-result.png · 508.2K · 1358 views
Rules → http://www.boonex.com/terms
Quote · 16 Oct 2015

Any plans to replace the current chatrooms with this by default in dolphin.pro?

other solution could be covert groups into chatrooms. Gud idea or not?

Umar Haroon
Quote · 16 Oct 2015

Looks great Alex, will definitely be giving this a go

It ain't easy being this stupid all of the time
Quote · 16 Oct 2015

One thing, where to increase size of emoji ?

Quote · 18 Oct 2015

 

Any plans to replace the current chatrooms with this by default in dolphin.pro?

Yes, we're considering it for Dolphin 7.3 

other solution could be covert groups into chatrooms. Gud idea or not?

Chat is already integrated into Groups, every group has own chat. 

Rules → http://www.boonex.com/terms
Quote · 19 Oct 2015

Emoji symbols are the same size as text. 

where to increase size of emoji ?

 

Rules → http://www.boonex.com/terms
Quote · 19 Oct 2015

just installed in godesi.com and so far so good

Quote · 29 Oct 2015

Hey Alex, I happen to notice that the Emoji smiley doesn't show when viewing on my mobile phone. Any idea why? Shows fine on a computer.

Nothing to see here
Quote · 31 Oct 2015

Good work! Have done so the default - site jOOy.club

Quote · 31 Oct 2015

 

Hey Alex, I happen to notice that the Emoji smiley doesn't show when viewing on my mobile phone. Any idea why? Shows fine on a computer.

 Yes Good work AlexT! Hope you have a fix for this? I notice that on my Iphone there is no Emoji smiley.

Quote · 2 Nov 2015

Yes, that's because phones usually have build-in emoji.

I notice that on my Iphone there is no Emoji smiley.

 

Rules → http://www.boonex.com/terms
Quote · 4 Nov 2015

Is it possible to give visitors a random id?

Umar Haroon
Quote · 9 Nov 2015

Addition of Block in private chat mentioning

Block name: Access Denied

Message : YOU DON'T HAVE PERMISSION TO ACCESS THIS PAGE

.

Place the block below shoutbox and make it only visible for non-member or the membership level who don't have access to this page.

This way you can show a message to non-members why they can't see the chat box.

Umar Haroon
Quote · 9 Nov 2015

 

Is it possible to give visitors a random id?

 Yes, that would be nice. Hope you can fix that?

Quote · 4 Dec 2015

 

Yes, that's because phones usually have build-in emoji.

I notice that on my Iphone there is no Emoji smiley.

 

 Can we add an own set of emojis  ?  The boonex should not match the build in emojis of the provider. The boonex emojis should override this  and always show the emojis of boonex. In my opinion.

Quote · 11 Apr 2016
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.