Administrators · Legacy archive

Shoutbox / Chat system

Started by Ancient Gamer Nov 7, 2005 38 posts Locked

  1. Shoutbox / Chat system

    #1
    I have been coding away on the shoutbox for a couple of days now. I am soon done but there are some things I want to say to those who wish to listen:

    1. I have contemplated a userlist in a right or left menu. I have concluded NOT to do one! Why? Because ALL users are logged into the shoutbox at all times. Problem then is this: WHO is available for chat at a given time? I think we might want a user list for the NON-SHOUTED chat room, which I will make. Or else a simple *manfred has logged into the private chatroom* message might appear when users log into that part... What say you?

    2. The chat is proceeding smoothly. I had some problem adjusting to PHP in the beginning as I am not really a PHP guy. The small shoutbox is finished and updates rarely (each 20th second), while the large one is under construction and updates frequently (each 10th second). The small shoutbox-chat is 99% finished (all done 'cept the help function)

    3. Private messaging is nearly done and in the first incarnation it is managed by the /TO command, as in phpmychat. I might easily create a pop-up window for this purpose. What do you wish?

    4. /me messaging has been added

    5. This has yet to be done: userlist system (see above), font colour choosing, history system, emoticon change.
  2. Re: Shoutbox / Chat system

    #2
    1) List of names.
    a) I think maybe it would be better, since we already have a list of names who is logged on, perhaps we can just put a * by their name or something to signify that they are in the chat.

    b) adding the login message to the shoutbox might work.

    The two are going to be interconnected right? So those that aren't in chat will still see who is posting and everything so a message about who logged in might be superfluous ( :) ) when they will probably say hi when they enter.
  3. Re: Shoutbox / Chat system

    #3
    Well, I thought about creating an additional area, outside the shoutbox, in which people could discuss matters they do not wish shouted to the main site. And NO: People cannot see what is posted in that section unless they launch the full size chat and check it out. A demo is coming up
  4. Re: Shoutbox / Chat system

    #4
    I don't like that idea.

    I would rather them be combined so I can chat and still not join the major chat if I don't want. It was my thought that the major chat was just a full versioned mini chat. So if you want the full chat feel you can still do it, but you can also use the shoutbox type chat as well.

    Me, personally, I hate the full size chat. It totally limits what I can do while online and usually severly limits what I get done during my computer time. I enjoy chatting but it takes up a lot of time bringing back up the window, reading, commenting, waiting, browsing, come back...etc. If you allow the shoutbox to have the same as the full chat then I can continue to browse vote/comment (and code for me) and not be trapped in the full chat circle of time wasting. That was one of the main points of doing the shoutbox in the first place. Having the full chat, to me, was just because enough people wanted it. I was fine with only the shoutbox with the added ability to view and limit the history in another window which was all I really wanted to do in the first place.
  5. Re: Shoutbox / Chat system

    #5
    Ah, okay then. Well, in that case the current chat should be finished very soon. I am still including private messaging, although MoonHunter is voicing concern along the lines you draw here: "If it has to be said in private, perhaps it should not be said in a chat at all".

    But I will add private messaging. People should be able to say things in private if they really need to.

    In the end you are the master of the Citadel and I will abide your command. I'd like the private message system to be available though.

    I am dropping the non-shouted chat room.
  6. Re: Shoutbox / Chat system

    #6
    I have no problem with privacy, I am an advocate. There are many times you just want to "whisper" to somebody. Maybe you could make a "this chat only" type thing if that is something you still want.

    Sent to mini chat by default. If you just type it goes to both.
    /main (or whatever command) only sends the chat to the full chat and mini doesn't get it
    /name just goes to the person or whatever

    I just want them to be two frontends to the same chat for the purposes I mentioned. If there is need for more privacy or whatever, so be it.
  7. Re: Shoutbox / Chat system

    #7
    Heh, well that certainly is a possibility. As it is now /TO manfred blablahblah would make manfred only get the message "blablahblah" (right now even the sender can't see it, though the recipient and an impersonating administrator could... possible security exploit there, but we got discrete admins. I think.) I will make the sender see his own stuff though.

    What concerns the other room (I had 2 rooms planned remember: The Shouted one and a non-shouted one) it is definitely dead, though the /main option might be added. All the parsing stuff is there so it is a matter of minutes to create it. It won't come in the demo version though. So: I am debugging the private messaging at the moment. Now only font colour and history needs to be done. Hooray!
  8. Re: Shoutbox / Chat system

    #8
    Nothing really changes in the other room except a query, no? Separate or the same, they should do basically the same thing I would guess, escept where or what criteria they get their data.
  9. Re: Shoutbox / Chat system

    #9
    Well, the formatting is a bit different. The font is 12pt instead of 10 and the day and time is shown in 10pt italics. You can watch it later, it is nothing much. You worry too much. First I code then you correct.
  10. Re: Shoutbox / Chat system

    #10
    The 8th of november was a bad day. Was at my part time job and used my evening browsing the web and the main site. No debugging done, no chat programming.
    Bad Ancient Gamer.
    No cookie.
  11. Re: Shoutbox / Chat system

    #11
    10th of november:
    -Exploit: I have discovered a security bug in the /TO command. I have concluded that it is an inherent trait of not combining user names with an underscore (Ancient_Gamer instead of Ancient Gamer). I have two solutions: A) Popup private message area, like in flash chat or B) Combining usernames with an underscore via explode() and implode() (or other similar functions). The chance of people discovering the bug is miniscule, but that is not a chance I am willing to take. I do not deliver second rate stuff.

    Other than that the chat is pretty much done. There are some cosmetic issues but they are quickly solved.
  12. Re: Shoutbox / Chat system

    #12
    Could just create a chat database that adds the underscore when they login to the chat.

    Click on full chat, checks chat database if they are in it. If not, grabs their name from the forum database, adds underscores, inputs it, uses the name from the chat database for the chat. Just a little two column database with userid and underscored name?

    Not sure which would be more efficient. That or running the underscore check every username/post.

  13. Re: Shoutbox / Chat system

    #13
    If you wanna change the DB that is okay. I use the underscore adding through code and it works out fine.
    As a result the code has become A LOT leaner and such. I guess that is part of the development process... Trimming the code of dead weight I mean.

    You can have the chat real soon, but I am doing good things with it here and if I can have it a few more days I am sure I would feel a lot better about it.
  14. Re: Shoutbox / Chat system

    #14
    All yours AG. You just say go when you are ready!
  15. Re: Shoutbox / Chat system

    #15
    Some ideas. Say aye or nay:
    -Admin /mute command: for quieting Dark-Lord and such. This shoutbox is shouted on the main page and if people become vulgar, obscene, spams, insults or curse... Well, you catch my drift. (Perhaps an IP ban is just as effective and do the same thing?)

    -the marquee is kinda annoying. Delete? (Test it yourself in the shoutbox message )

    -Use /show /back and /backtime for going X steps back in history?

    -Use /history to launch a separate window with the entire chat history since the dawn of time?
  16. Re: Shoutbox / Chat system

    #16
    I am afraid I have some bad news. I have to be a good father tomorrow as the mother of the house has signed up for weekend work. That means I won't get any more coding done for some days. I know it is not exactly opportune, but I will finish it very soon. It is almost a wrap, I need only a couple of hours coding on it and it is done.

    I am sorry about the inconvenience.
  17. Re: Shoutbox / Chat system

    #17
    The Chat is finished. There are precious little bugs or anything left (in the non-compacted version), though I will give you admins 1 day to test it properly.
    As of right now I am compacting the code and removing data from the code and putting it into a config file for ease of use. Strolen will appreciate that.

    So: Could you have had your chat now? Yes, several days ago. But I want as few files and as clean code as possible.

    Thus it came to be that I sit here and debug the compacted code. New logic creates new bugs.
  18. Re: Shoutbox / Chat system

    #18
    And the people rejoice.
  19. Re: Shoutbox / Chat system

    #19
    The chat is all done now in both bloated and compacted mode. It rests on the HD of my other computer in the summer room of our house (which I call "the freezing room" in winter). When Strolen is ready I will retrieve it, but him and I need a little talk about some quirks when I do that...

    Awaiting your command and availability sire. (Yes, I am forcing you to grant me an audience :p)
  20. Re: Shoutbox / Chat system

    #20
    Will be available in about 5 hours from this post time.
  21. Re: Shoutbox / Chat system

    #21
    I will not. I will try to send it to you but I am swamped with menial tasks and got to be an early riser tomorrow. I will see what I can do.
  22. Re: Shoutbox / Chat system

    #22
    If you just want to upload it to ancient.strolen that would be fine too.

    No rush. This weekend will be bad for me, more family coming in, and chances are I will be working late the next couple days. Crappy holidays. Rush rush rush so we can enjoy Christmas.

    We have time, not too worried about it. Will be nice when we get it, but we will survive without a problem in the meantime. I haven't been able to do much to the site in a couple weeks except minor tweeks and it will continue through next week.
  23. Re: Shoutbox / Chat system

    #23
    To use the chat:
    1. Include this code where you want to position the chat (there are some style elements and such you might want to remove):



    2.Remember to provide the URL To the location in which the chat program resides (then put the chat therein too! ;)

    3. Remove all text fields where "name" is to be entered.

    4. Search and replace all $_COOKIE['ssbname'] with $smf_user_info['username'] (or what have you)

    5. tweak the provided config.php file. You need to supply database info and all that. Additionally you may want to change the default text that appears during whispering, on buttons, etc.

    6. I haven't even touched the admin code

    Check it out at http://ancient.strolen.com/Citadel_Chat/
    Cheers.
  24. Re: Shoutbox / Chat system

    #24
    Oh: The index.php file is just bollocks. Kill it.
  25. Re: Shoutbox / Chat system

    #25
    Remember to nitpick (or plant plastic charges) on the result. This is the first draft of our future chat. As a devout Strolenite I would only be happy if you are happy. I will be available for code work even though I take a leave as a GM.

    ~Ancient Gamer
  26. Re: Shoutbox / Chat system

    #26
    I got a job so now I cannot help as much as before. On the other hand: I tend to get more done when I am in a job, so who knows?

    (The job is as network programmer for a network of high schools. It is not the dream job, but it is relevant and it is something to do)

    How goes the chat integration by the way?
  27. Re: Shoutbox / Chat system

    #27
    Does it seem only to me, or there is a new chat? Let's see if I can find issues...  :twisted:

    The auto-focus is off, so a big sigh of relief from me.

    The small chat window really doesn't need an extra line-break after the username. Axe it.

    The big chat window has a fixed size, and is unresizable. Pity it's contents is too large for my small resolution, or IE. Can't see the bottom or scroll enough down to see the most current part.


    But overall a nice improvement, AG!
  28. Re: Shoutbox / Chat system

    #28
    The fixed size has turned into a slight issue.

    I resized it for the bigchat, hopefully that will fit now. Needs more work but don't have a lot of time lately.
  29. Re: Shoutbox / Chat system

    #29
    Might have to tweak some on that fixed size.
    I guess we could use pass the iframe width and height given in the config file as parameters in the URL...
  30. Re: Shoutbox / Chat system

    #30
    Would be nicer if it was more dynamic. iframes make a bit difficult though. Big Chat might have to turn into just normal frames so it can be a full paged (whatever browser size) chat instead of a forced size. Will figure it out eventually. :)

    Works good AG!
  31. Re: Shoutbox / Chat system

    #31
    Another idea: Using Javascript to detect the screen resolution when the big chat is opened and then passing those values through the URL.
  32. Re: Shoutbox / Chat system

    #32
    If you need any help with the chatbox gimme a holler.
    And: I think you are using the wrong CSS value, that is all. To colour the entire page you need to call the appropriate CSS class from the html body tag. DIV and such simply will not do.

    Other problems: the /show functionality seems to be broken. The return button no longer submits in IE.
  33. Re: Shoutbox / Chat system

    #33
    I can't use the css because it would force me to create a new css file for each theme. Instead of making a half dozen css files, I instead slimmed the css (deleted all the background color values) to formatting and use three color variables for the body, chat window, and textbox which are assigned in an if/elseif statement which gets passed the theme info from the main page iframe call. The theme info (which is simply $color that passes "parchment" "day" etc and the variable is sitting there fine in the form and in the iframe link, it just disappears when you submit it and I haven't been able to find why that is.

    Not sure why the return button doesn't submit and /show doesn't work, didn't touch anything there but will look at it of course. All I messed with were the css file and links. Oh, I guess I did do some stuff with the username and making the input stuff viewable only for logged in users. Shucks. Will email you the files I have to your gmail account.

  34. Re: Shoutbox / Chat system

    #34
    if you delete the old stuff on ancient (Except the folders: /edhansen and /agcoldforged) and place a mirror there I can work in an authentic environment.
  35. Re: Shoutbox / Chat system

    #35
    The only thing you have to do is add "color=day" in your initial iframe call. Just pick whichever theme from the config file that you want to experiment with.
  36. Re: Shoutbox / Chat system

    #36
    http://mods.simplemachines.org/index.php?mod=22

    All built for us already?
  37. Re: Shoutbox / Chat system

    #37
    If it is all we need, then I say go for it. I have a rather full schedule here, so I would cherish the opportunity to strike one problem from my list (fixing the small chat).
  38. Re: Shoutbox / Chat system

    #38
    Small chat re-evaluated:
    Pros:
    -Possible to get the attention of other users
    -Usable by those without access to flash
    -Updates regularly

    Cons:
    -Users that for some reason are deprived of javascript get a terribly impaired version
    -Updates too quickly for some and too slowly for others
    -Bandwidth hog
    -iframe
    -other bugs that keep popping up

    Solutions:
    -Debug the chat and slow down the update frequency (but let users manually speed up the refresh by typing a "/refresh [second interval]" command. Drawback: Need to find other solutions than cookies, iframes and javascript. That could take some time.
    -Kill the chat and create a popup messaging system. This would be initiated by a link in the same location as the chat. By clicking the link, the user would open a window. In that window he could select which active user, or all, that he wanted to message, type the message and then send it. The targetted users would be  stored serverside, and when they next refresh, a popup window would open on their end. Drawback: Most certainly requires javascript and would be blocked by popup killers.
    -Fully server side shoutbox. A shoutbox made exclusively using PHP.

Administrators · All categories · Guildhall