dominickm / jupiter_broadcasting_mobile_community

The Jupiter Broadcasting community project.
Other
100 stars 17 forks source link

IRC/Chat Room Feature #20

Closed ghost closed 11 years ago

ghost commented 11 years ago

So I believe I have an UI solution to the IRC/Chat Room Problem. I did commnent on it in the requirements section but I think this feature deserves it's own issue.

@ZefQ Here is a suggested task you could work on if you are interested? Just a suggestion...

I think it would be better if we replaced the settings page with the chat room. We could have a button on the header of each page for the preferences/settings relating to that page. I feel this would condense the settings down into related it preference making it easy for the user to change something based on what they are focusing on.

This would also give scrollable page for the chat window. We would need to have a fixed bar for the text box and send button, which should is best placed at the bottom similar to Text or SMS messaging apps.

ShaneQful commented 11 years ago

Why not just add another page? Also what server backend should be used for the irc because it can't be implemented in javascript as far as I know.

ghost commented 11 years ago

If you mean adding an other tab at the bottom then my reasoning is to keep space between each tab. This is more important if you are a device in the vertical position. The settings page you of course be in a separate page or sub page.

As for the back end I don't know yet, but this may be an opportunity to use node.js or some library that allows IO level communications or can create network sockets. There might already be something that can do the IRC protocol.

What does the JB website use? it is clearly not a direct IRC connection. We may be able to use the same backend as the JB website. It think is mibbit. We may be able to reverse engineer/hack the widget for word press. Just to be clear - I don't mean illegally. But if theres a HTTP services to IRC that we could use as a back end all we need to do is create a working front end.

ghost commented 11 years ago

what is the irc channel name? does jb actually use IRC

http://www.qwebirc.org/ is gpl we may be able to customise it for the front end.

ShaneQful commented 11 years ago

Yes jb does use IRC ;P its on geekshed and the channel is #jupiterbroadcasting

They use mibbit on there site. We could try use a mibbit widget but I'm not sure we could theme it to look good with the app or be usable on anything but a tablet.

ograycode commented 11 years ago

So I've done some very basic research into the irc problem, and there doesn't seem to be a way to write it purely in Javascript. The problem is we have no easy to open a socket currently.

The solutions appear to be: write a plugin to handle connections and messages; stand up a server to act as a "bot" that would connect in behalf of the users and respond to Ajax commands.

In terms of cross platform, I like the server idea, but I don't believe it is practical for this project.

If I'm wrong about this, please someone correct me.

ShaneQful commented 11 years ago

Your not wrong @ograycode and I think we may have to at least wait until the rest of the app is working before we look at this again. Unless some knows a site offering a nice irc ajax api with a good privacy policy?

ograycode commented 11 years ago

Re-opened the issue just because there is progress to report. I started an IRC client plugin for Android (because I own an Android device, and own nothing Apple-related). https://github.com/ograycode/Cordova-IRC

While, at this point, I am absolutely ashamed of the code itself (primarily name conventions, etc.), the basic structure is there. The idea is a singleton irc client running on a background thread that the user will be able to interact with. The will plugin forever keeps its javascript callback, unless an error happens, and pass back JSON strings with a "type" field acting as a signal to what the result contains (message, connection status, etc.).

Currently, it can only connect and receive messages -- but given that I can do that for an extended period, I can't imagine I wont also be able to send messages given the current code base. This was tested on an Android 2.3.4 over a wifi connection.

Once it becomes a little more robust, I'll split the git repo into an "example" and "install" folders, with the example being and Android project and the install folder containing the source files and instructions on how to use.

EDIT: It now supports sending messages. The absolute basics are there.

ShaneQful commented 11 years ago

Cool I might try and give you a hand with it if I have the time. It's definitely the way to go for IRC and a great way to leverage phone gap but we will either have to find a similar plugin for iOS or not give IPhone users the feature.