[cBB Chat v1.1.1] Used Tab Mark


no_avatar
Booster1304
 
Posts: 21
Joined: Fri Aug 14, 2015 3:04 pm
 Wed Sep 02, 2015 3:35 pm • via Web
Hello Ivan,

another thing that makes me really happy in this chat would be some sort of mark that "stays" if a tab is used by any user.
In our case, where the chat is cleared every day to specific time it would be much more comfortable if users can see that tabs are used without clicking every single one to check.

I´ve made a quick photoshop to show you what i mean.

Image

Mate, haven´t you got any donation link?
User avatar
IvanPF
Administrator
 
Posts: 2010
Joined: Fri Jun 17, 2011 12:15 am
Location: España (Spain)
 Wed Sep 02, 2015 10:37 pm • via Web
By default, when the chat do the refresh, change the color of the tabs with new messages.
Is not that what you want?
no_avatar
Booster1304
 
Posts: 21
Joined: Fri Aug 14, 2015 3:04 pm
 Thu Sep 03, 2015 7:15 am • via Web
Nearly that what I want.
The Issue ist that the mark disappears when the browser get refreshed or users browse the board regardless they seen the entries or not.
So a mark that won´t disappear and shows that the tabs are in use would be more usefull than a new message color.
User avatar
IvanPF
Administrator
 
Posts: 2010
Joined: Fri Jun 17, 2011 12:15 am
Location: España (Spain)
 Thu Sep 03, 2015 5:16 pm • via Web
Ok, I understand, but is not easy to do.
I will check this as soon as possible.
no_avatar
Booster1304
 
Posts: 21
Joined: Fri Aug 14, 2015 3:04 pm
 Thu Sep 03, 2015 6:36 pm • via Web
Many thanks, would be great if you can implement this feature!
no_avatar
Booster1304
 
Posts: 21
Joined: Fri Aug 14, 2015 3:04 pm
 Mon Sep 14, 2015 1:59 pm • via Web
Hello Ivan,

can we accelerate this with an additional donation?
It´s an important feature for our use of the chat.
User avatar
IvanPF
Administrator
 
Posts: 2010
Joined: Fri Jun 17, 2011 12:15 am
Location: España (Spain)
 Fri Oct 09, 2015 2:52 pm • via Web
Hi,

To implement this feature, do this:
1. Open /ext/canidev/chat/chat_ajax.php
2. Find:
Code: Select all
'S_DATE'         => $this->user->format_date($row['topic_time']),

3. Add After:
Code: Select all
'S_TIMESTAMP'      => $row['topic_time'],

4. Find:
Code: Select all
'S_DATE'         => $this->user->format_date($row['message_time']),

5. Add After:
Code: Select all
'S_TIMESTAMP'      => $row['message_time'],

6. Open /ext/canidev/chat/styles/{your style}/template/chat_ajax.html
7. Find:
Code: Select all
<div id="chat-row-{message.S_ID}" class="chat-row">

8. Replace with:
Code: Select all
<div id="chat-row-{message.S_ID}" class="chat-row" data-time="{message.S_TIMESTAMP}">

9. Upload the file attached to this post "jchat.js" to /ext/canidev/chat/assets/js/ on your hosting.
jchat.js
(34.91 KB) Downloaded 297 times


10. Go to ACP and clear the cache.

PD: This feature will be available by default in the next version.
no_avatar
Booster1304
 
Posts: 21
Joined: Fri Aug 14, 2015 3:04 pm
 Fri Oct 09, 2015 8:49 pm • via Web
Ah! I´m happy to see that things go on

I got some little differences in the code:

To search for:
Code: Select all
'S_DATE'         => $this->chat->format_date($row['topic_time']),


How it is:
Code: Select all
'S_DATE'         => $this->user->format_date($row['topic_time']),



To search for:
Code: Select all
'S_DATE'         => $this->chat->format_date($row['message_time']),


How it is:
Code: Select all
'S_DATE'         => $this->user->format_date($row['message_time']),


If i replace the "user" with "chat" the chatrooms disappear.
Any Idea?
User avatar
IvanPF
Administrator
 
Posts: 2010
Joined: Fri Jun 17, 2011 12:15 am
Location: España (Spain)
 Fri Oct 09, 2015 11:27 pm • via Web
Sorry, my mistake.
I did not realize that I edited that file because of this issue: viewtopic.php?f=22&t=567

You do not have to edit this lines, leave it as is. Just add below that lines what I said in the previous message.

PD: I edited my message with the correct code.
no_avatar
Booster1304
 
Posts: 21
Joined: Fri Aug 14, 2015 3:04 pm
 Sat Oct 10, 2015 6:32 am • via Web
Ok, tried it out.

Same happening like before.
If a tab is used it turns the color for short. A soon as i click the tab the color disappears and there´s no mark or color which shows that the tab is in use.

-Added the lines chat.php
-Changed the line in ajax_chat.html
-Added the jchat.js
-refreshed in ACP

Did i forget anything?

Who is online

Users browsing this forum: No registered users and 0 guests