The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

[Project] Staff's Chatbox

Page 1 of 3 1, 2, 3  Next

View previous topic View next topic Go down

[Project] Staff's Chatbox

Post by JScript on December 7th 2014, 6:56 am

Hello folks!

Introduction:

I realized that many users would like to have a "chatbox for exclusive staff" and I also wanted!
It was then that so I had the idea of making one, I did inside a widget but I found it strange because it was very small, boring to implement, required many steps to create and parameter settings in the ACP ...

But now, based on another project I'm developing, this code has the ability of a true "installer", also having an uninstaller in which all the code and the pseudo database are removed completely !!!

Only by creating a new JavaScript so that we can have the installer code is required.

But how does it work?
It's simple:
The installer first create a category and within a forum with permissions only to administrators and moderators, but this can be changed later in the ACP.
Then it creates a topic within this forum that will serve as a pseudo database to our chat!

Features:
1- Each member will be able delete or edit your own message;
2- Messages are written in JSON format, thus we gain storage space and ease of maintenance in code;
3- The message storage capacity is the same as a topic.

How about we make tests?

First access the ACP and check "Unauthorize unoficial forms .." to "no", see example below:


In the ACP, create a new JavaScript as follows:
Title * : @install_chat_staff
Placement : In the home page
Javascript Code * : - Copy and paste the code below in this field:

Download link: https://www.dropbox.com/s/yeu4mif5bk62acg/Staff%27s_Chat_div.js?dl=1

Note: The title field should have exactly this name: @install_chat_staff
For uninstalling the code and structure of pseudo database depends exclusively on him!

When you finish this step, go to your forum, reload the page and wait for the following window:

Follow the steps waiting for the end of each.

After the installer finishes, the page will reload, then you can use the chatbox staff that will have the following appearance (varying according to the version of your forum):


Example: Editing a message!


To uninstall is easy, as well as install, only the founder can do this! Simply by typing in the chat: /uninstall
You will see the following window:

Just follow the steps and the chat will be uninstalled completely!

Some chat commands:

/cls - Clear all messages, resetting the list.
/stop - Pause the reception of messages, useful when you do not want to be disturbed.
/start - Restarts the reception of messages.

See an example of how messages are stored in the pseudo database:


JSON format:
Code:
{
    "user": [{
        "id": 1,
        "name": "JScript",
        "pname": "%3Cspan%20style%3D%22color%3A%23000099%22%3E%3Cstrong%3EJScript%3C%2Fstrong%3E%3C%2Fspan%3E",
        "avatar": "http://autoitbrasil.com/forum/uploads/av-89.png"
    }, {
        "id": 2,
        "name": "Member Test",
        "pname": "%3Cspan%20style%3D%22color%3A%20rgb(0%2C%200%2C%20153)%3B%22%3E%3Cstrong%3EMember%20Test%3C%2Fstrong%3E%3C%2Fspan%3E",
        "avatar": "http://illiweb.com/fa/invision/pp-blank-thumb.png"
    }],
    "msgs": [{
        "id": 1,
        "msg": "Messages%20cleared!",
        "date": "18:56 - 19/12/2014"
    }, {
        "id": 1,
        "msg": "Test%2001%20-%20FF",
        "date": "18:56 - 19/12/2014"
    }, {
        "id": 2,
        "msg": "Test%2002%20-%20IE",
        "date": "18:57 - 19/12/2014"
    }, {
        "id": 2,
        "msg": "Test%2003%20-%20CR",
        "date": "18:57 - 19/12/2014"
    }]
}


Who can contribute to the project, either with more ideas, codes and even translations into other languages, I thank you!

JS


Last edited by JScript on June 3rd 2015, 4:53 pm; edited 7 times in total

JScript
Forumember

Male Posts : 741
Reputation : 168
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Re: [Project] Staff's Chatbox

Post by Rhino.Freak on December 7th 2014, 8:29 am

Looks pretty good! But I have added the code like you said.. and I haven't seen the message on homepage yet.. (about 2-3 minutes have passed)
Do I need to be the OWNER for that message to appear?


Edit : went to the code to read it through and I can deduce that it works only for founders, can you change it so it works for all admins? coz my forums owner does other business, I am the one who modifies and manage the forum. He works on content.

Rhino.Freak
Helper
Helper

Male Posts : 1247
Reputation : 105
Language : English
Location : Mumbai, India

http://freetest.forumotion.net/

Back to top Go down

Re: [Project] Staff's Chatbox

Post by _Twisted_Mods_ on December 7th 2014, 9:07 am

everything went threw like it was sipose to untill i got to building chatbox database then it never refreshed the page after about 5mins of it doing nothing i refreshed it on my own and there was a new cat and forum but not chatbox after a min the install poped back up and i did everything again it been sitting there for 10 mins now doing nothing as far as i can tell

as far as suggestions add a progress bar or atleast make it tell up whats it doing so we know its working on the install

and also add a image in the cat and use a lil js to hide that cat from everyone except for the users you wish to see it 


also if u need acct for my forum sign up or let me know and ill make one when i get a min

_Twisted_Mods_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Re: [Project] Staff's Chatbox

Post by J0k3R^ on December 7th 2014, 10:40 am

seems nice, good work Very good

J0k3R^
Forumember

Male Posts : 742
Reputation : 28
Language : Greek > English > Russian > Spanish
Location : C:\>r00t

http://fmplanet.forumgreek.com

Back to top Go down

Re: [Project] Staff's Chatbox

Post by JScript on December 7th 2014, 1:03 pm

Hello everyone, thanks for the comments ...

The installer can now be used for any admin. Do the test again!

As you can see, I did not do any installation progress bar, but each request has a message inside an alert ().
Those who wish to make this graphical interface, I also thank ...

JS

JScript
Forumember

Male Posts : 741
Reputation : 168
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Re: [Project] Staff's Chatbox

Post by FrOsTyXi on December 7th 2014, 3:43 pm

works great made a few tweaks to accommodate my forum color scheme other than that i like it!

Waiting on other members of staff for ideas for the new system Thanks JScript your work is truly amazing!

FrOsTyXi
Forumember

Male Posts : 460
Reputation : 12
Language : english

http://team-psn.forum-board.net/

Back to top Go down

Re: [Project] Staff's Chatbox

Post by FrOsTyXi on December 7th 2014, 4:09 pm

Question @JScript is it possible to have the staff chatbox in the same location as the member chat? maybe a toggle tab or something? Just an idea.

FrOsTyXi
Forumember

Male Posts : 460
Reputation : 12
Language : english

http://team-psn.forum-board.net/

Back to top Go down

Re: [Project] Staff's Chatbox

Post by JScript on December 7th 2014, 4:32 pm

@FrOsTyXi wrote:Question @JScript is it possible to have the staff chatbox in the same location as the member chat? maybe a toggle tab or something? Just an idea.
Yes it can be done that way too, just a matter of a few lines of code to make this possible...

But for now it is not my current focus.

JS

JScript
Forumember

Male Posts : 741
Reputation : 168
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Re: [Project] Staff's Chatbox

Post by FrOsTyXi on December 7th 2014, 5:13 pm

@JScript wrote:
@FrOsTyXi wrote:Question @JScript is it possible to have the staff chatbox in the same location as the member chat? maybe a toggle tab or something? Just an idea.
Yes it can be done that way too, just a matter of a few lines of code to make this possible...

But for now it is not my current focus.

JS
got ya it's ok where it is for now my staff really likes this a great deal and thank you agin for these very helpful scripts! thanks for the speedy reply i will continue to follow your work!!

FrOsTyXi
Forumember

Male Posts : 460
Reputation : 12
Language : english

http://team-psn.forum-board.net/

Back to top Go down

Re: [Project] Staff's Chatbox

Post by JScript on December 7th 2014, 5:57 pm

@FrOsTyXi
Thank you!


The code now has a compression of messages on the LZW format, thus increases the storage capacity of messages!!!

See an example of how messages are stored in the pseudo database:


JS

JScript
Forumember

Male Posts : 741
Reputation : 168
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Re: [Project] Staff's Chatbox

Post by _Twisted_Mods_ on December 7th 2014, 6:00 pm

well i tried with the new script still no luck i even disabled all my scripts and disabled the normal chat still nothing ..if i had to guess whats happening i would say its trying to do stuff faster then my internet goes because im using my phones internet ..im not sure if there is a way around this or not if not ..if you wouldn't mind come installing it on my forum and i will post some designs for you for it.. i will create you a name for my forum here in few mins and pm u the info if you decide you want to

_Twisted_Mods_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Re: [Project] Staff's Chatbox

Post by JScript on December 7th 2014, 6:25 pm

@_Twisted_Mods_
Done!


I did an update on the topic information, please read again!

JS

JScript
Forumember

Male Posts : 741
Reputation : 168
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Re: [Project] Staff's Chatbox

Post by Van-Helsing on December 7th 2014, 6:52 pm

Hello,
It's a nice project if it works.

Van-Helsing
Hyperactive

Male Posts : 2222
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Re: [Project] Staff's Chatbox

Post by JScript on December 7th 2014, 6:58 pm

Black-Shadow wrote:Hello,
It's a nice project if it works.
By the way: It worked for you?

I added more information on the topic of how to proceed ...

JS

JScript
Forumember

Male Posts : 741
Reputation : 168
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Re: [Project] Staff's Chatbox

Post by Rapid_Punbb on December 7th 2014, 7:23 pm

It's not saving the messages, thus I'm getting " äȠAh" this at the chatbox.

Rapid_Punbb
New Member

Posts : 16
Reputation : 2
Language : English

http://punbb.biz

Back to top Go down

Re: [Project] Staff's Chatbox

Post by JScript on December 7th 2014, 7:55 pm

@Rapid_Punbb wrote:It's not saving the messages, thus I'm getting " äȠAh" this at the chatbox.
Okay, this is due to the fact that messages are now compressed to save storage space, but I'm still testing across multiple browsers and all versions to see if there are any problems.

Please tell me the version of your forum and what browser you are using right?

Thanks for the info,

JS

JScript
Forumember

Male Posts : 741
Reputation : 168
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Re: [Project] Staff's Chatbox

Post by FrOsTyXi on December 7th 2014, 7:57 pm

@JSrcript can i move this below the chatbox we moved the other day using a similar code like this?


Code:
document.getElementById(chatbox_id).innerHTML = '<iframe src="/chatbox/index.forum?archives=1" id="frame_chatbox" scrolling="no" width="100%" height="100%" marginwidth="0" marginheight="0" frameborder="0"></iframe>';
 $('#' + chatbox_id).parent().detach().prependTo('#wrapper');

FrOsTyXi
Forumember

Male Posts : 460
Reputation : 12
Language : english

http://team-psn.forum-board.net/

Back to top Go down

Re: [Project] Staff's Chatbox

Post by Rapid_Punbb on December 7th 2014, 8:03 pm

@JScript wrote:
@Rapid_Punbb wrote:It's not saving the messages, thus I'm getting " äȠAh" this at the chatbox.
Okay, this is due to the fact that messages are now compressed to save storage space, but I'm still testing across multiple browsers and all versions to see if there are any problems.

Please tell me the version of your forum and what browser you are using right?

Thanks for the info,

JS
Punbb - firefox, chrome, safari, comodo, etc.

Rapid_Punbb
New Member

Posts : 16
Reputation : 2
Language : English

http://punbb.biz

Back to top Go down

Re: [Project] Staff's Chatbox

Post by JScript on December 7th 2014, 8:11 pm

@FrOsTyXi
Yes of course, but we'll leave that for another topic ok?


@Rapid_Punbb
I just test the current code in all versions and including the browsers you posted there and the result was satisfactory!
See the Safari browser on a Mac OS X:


I need more information ... You could inform the address of your forum?

Thanks for the information,

JS

JScript
Forumember

Male Posts : 741
Reputation : 168
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Re: [Project] Staff's Chatbox

Post by FrOsTyXi on December 7th 2014, 8:14 pm

ok thank you JScript *)

FrOsTyXi
Forumember

Male Posts : 460
Reputation : 12
Language : english

http://team-psn.forum-board.net/

Back to top Go down

Re: [Project] Staff's Chatbox

Post by _Twisted_Mods_ on December 7th 2014, 8:25 pm

for my first design..basic  - neon blue 

if anyone has request or ideas for a design just pm me and ill see what i can do for you




Code:
.chatmsgs {
border-top-left-radius: 8px !important;
border-top-right-radius: 8px !important;
overflow: hidden !important;
box-shadow:0px 2px 5px 2px blue inset !important;
border:none !important;
  background-color: #000;
}
.chatinput{
box-shadow:0px -2px 5px 2px blue inset !important;
border-bottom-left-radius: 8px !important;
border-bottom-right-radius: 8px !important;
overflow: hidden !important;
background-color:black !important;
}
#chatstaff{padding:5px; !important}
#ul_chat_staff .content{background-color:black !important;color:skyblue !important; border:none !important; background-color: transparent !important;}
#js_chatstaff {background-color:transparent;}
.chatinput > .button2{ box-shadow:0px 0px 5px 2px blue inset !important;border:1px solid blue !important;font-weight:bold !important; background:black !important; color:white !important; margin-top:-0px !important;}

_Twisted_Mods_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Re: [Project] Staff's Chatbox

Post by FrOsTyXi on December 7th 2014, 9:02 pm

@_Twisted_Mods_ very nice i used that for my forum the color scheme is perfect!!

FrOsTyXi
Forumember

Male Posts : 460
Reputation : 12
Language : english

http://team-psn.forum-board.net/

Back to top Go down

Re: [Project] Staff's Chatbox

Post by _Twisted_Mods_ on December 8th 2014, 3:19 am



css

Code:

    #js_chatstaff .chatmsgs {
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
    overflow: hidden !important;
    box-shadow:0px 2px 5px 2px #6699CC inset !important;
    border:none !important;
    background-color:transparent !important;
    background-image: url(https://www.filepicker.io/api/file/B78v2FkMQC63jNjA0nLx+jsbg.png) !important;
    background-position:100px -50px �!important;
    background-size:100%
    background-repeat:no-repeat;
    }
    #cstaff_input{background-image: url(https://www.filepicker.io/api/file/8KBesybRWSG0xry7axyz+glassbar3.png)}
    #js_chatstaff .chatinput{
    box-shadow:0px -2px 5px 2px #6699CC inset !important;
    border-bottom-left-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
    overflow: hidden !important;
    background-color:transparent !important;
    background-image: url(https://www.filepicker.io/api/file/B78v2FkMQC63jNjA0nLx+jsbg.png) !important;
    }
    #js_chatstaff #chatstaff{padding:5px; !important;
    width: 99% !important;
    margin-top: 10px !important;
    }
    #js_chatstaff #ul_chat_staff .content{
background-color:black !important;
color:skyblue !important;
 border:none !important;
 background-color: transparent !important;
}
    #js_chatstaff {background-color:transparent;}
    #js_chatstaff .chatinput > .button2{
 box-shadow:0px 0px 2px 0px #6699CC inset !important;
border:none !important;
font-weight:bold !important;
 background: url(https://www.filepicker.io/api/file/8KBesybRWSG0xry7axyz+glassbar3.png) !important;
 color:white !important;
margin-top:-0px !important;
padding:2px 5px;
 border-radius:5px !important;
}


_Twisted_Mods_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Re: [Project] Staff's Chatbox

Post by Van-Helsing on December 8th 2014, 4:05 am

@JScript wrote:
Black-Shadow wrote:Hello,
It's a nice project if it works.
By the way: It worked for you?

I added more information on the topic of how to proceed ...

JS
Hello,
I have installed the staff chat it has created the staff chat category and staff chat database but it isn't displayed nowhere http://prntscr.com/5ef6g4 as you can see.

Van-Helsing
Hyperactive

Male Posts : 2222
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Re: [Project] Staff's Chatbox

Post by Rhino.Freak on December 8th 2014, 9:54 am

Really nice! Very Happy now its working smooth..

can't use all BB codes in it though.. (like table)
also can you make a collapsible button on upper right corner? Very Happy

Rhino.Freak
Helper
Helper

Male Posts : 1247
Reputation : 105
Language : English
Location : Mumbai, India

http://freetest.forumotion.net/

Back to top Go down

Re: [Project] Staff's Chatbox

Post by Rapid_Punbb on December 8th 2014, 2:14 pm

@JScript wrote:@FrOsTyXi
Yes of course, but we'll leave that for another topic ok?


@Rapid_Punbb
I just test the current code in all versions and including the browsers you posted there and the result was satisfactory!
See the Safari browser on a Mac OS X:


I need more information ... You could inform the address of your forum?

Thanks for the information,

JS
http://punbb-design.forumotion.com

Rapid_Punbb
New Member

Posts : 16
Reputation : 2
Language : English

http://punbb.biz

Back to top Go down

Re: [Project] Staff's Chatbox

Post by JScript on December 8th 2014, 2:51 pm

@Black-Shadow
I did a content substitution test and it worked! Create a temporary account and post the name and password so that I can login ok?

@Rhino.Freak
The bbcodes are being implemented gradually.
collapsible button: I can do, but I have to check compatibility with Invision version!

@Rapid_Punbb
You edited the permissions of the category of the chatbox? And I'm logged in there and seeing the category, but it was not for me to have visual access!!!

Edit:
I checked that there are two serious errors in your forum, see:
http://i.imgur.com/DEtF93D.png
http://i.imgur.com/JhoF7VF.png

So my code does not start!
But executing on console: http://i.imgur.com/pC0qTmC.png

JS


Last edited by JScript on December 8th 2014, 3:09 pm; edited 2 times in total (Reason for editing : More info...)

JScript
Forumember

Male Posts : 741
Reputation : 168
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Re: [Project] Staff's Chatbox

Post by Van-Helsing on December 8th 2014, 5:42 pm

Hello Jscript i will pm you a testing account details to check it.

Van-Helsing
Hyperactive

Male Posts : 2222
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Re: [Project] Staff's Chatbox

Post by JScript on December 8th 2014, 6:37 pm

@Black-Shadow
See: http://i.imgur.com/TbHPzzI.png - Related to the widget [Staff Online]!
Remove this widget and check if it works.

JS

JScript
Forumember

Male Posts : 741
Reputation : 168
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Re: [Project] Staff's Chatbox

Post by Van-Helsing on December 8th 2014, 6:39 pm

@JScript is there way to keep my widget too because I need it?

Van-Helsing
Hyperactive

Male Posts : 2222
Reputation : 82
Language : English, Greek

http://helpgr.forumgreek.com/

Back to top Go down

Page 1 of 3 1, 2, 3  Next

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum