Elgg Bottom Bar v0.8 alpha

Release Notes

Note: This plugin is still in alpha stage, and most likely has quite a few bugs in it .. you have been warned! ;)

** Updated chat version - very alpha release for those interested in helping bug test **

** First release using MySQL via ELGG objects - should solve the SQLite issue **

Welcome to my first attempt at a plugin!

The bottom_bar plugin adds a fixed bar at the bottom of the browser with an auto updating notification and friends list.

The notification button will show red when there are new notices to be seen. When the button is clicked, the notice is cleared ready for the next update. The friends list auto updates with a list of online friends.

As of v0.2, basic chat has been added to the system, including persistant windows between page loads, chat history, sound notifications and smiley and url translation. There are now some settings for both admin and user to enable/disable chat and a few other bits.

I have tested this with Internet Explorer 7, Google Chrome 2.0 and Firefox 3.0 & 3.5, and as far as I can tell it works ok. If anyone can test against other browsers/OS I would appreciated it. Also, please let me know if you come across another plugin that this conflicts with.

Known Bugs:

  • Chrome doesn't cache the sound files for some reason, so can block for a second or two when a notification sound is triggered.
  • Message delivery speed is not always consistant, but that might be due to my sandbox server ;)

 

Some screenshots ...

image

image

image

image

image

(yes I know the notification area is showing the same as the main page .. it was kind of the point to show the notifications were in sync ;) )

All constructive comments welcomed.

 

Like this code? Consider a donation ;)

image

 

  • Sorry guys - found a bug in the previous version that prevented the script automatically creating the table necessary for the chat if using MySQL direct. Hopefully this release will fix that.

    The other bugs listed under 0.7 alpha still stand at the moment - I just wanted to get this release out so people can test the chat using MySQL direct.

  • just a question what are you hoping to have this plugin do. i have been using it with my live site and my users love it. especially seeing how the riverdash board no longer has a wire posting section.

  • @TMP

    Hi, I have just tried this version, and it creates the MySQL table just fine.

    I did however encounter a few very strange problems:

    First I tried creating a table in my Elgg database using the same prefix as Elgg (elgg_), that kept creating elgg_system_log_xxxxxxxxxx tables faster tha I could delete them.

    Then I tried creating it with a prefix of chat_ in the same database. Creation of system_log backup tables stopped, but now every message delivered says like this:

    HeyGARBAGE COLLECTOR<br />Cleaning up unlinked metastrings: OK<br />Optimizing elgg_access_collection_membership (the "Hey" is the actual message)

    That's not all. When I send a message I can't see it in my own chat window, only the reciever can see it. When the receiver answers the message he can't see his sent message, but I recieve it okay.

    image

  • @Thomas - I'm not sure I understand the question - the functionallity is pretty much there, albeit a bit broken at the moment. I don't think I'll be adding any other features just yet.

     

    @slyhne - I don't know why it should invoke the garbage collector, as it bypasses the ELGG methods for chat. If you can't see the message you sent, then it means the sending part of the script has failed for some reason (or hung) - no point making someone believe a message has been sent if it hasn't. Do the problems still occur if you put the table in a database other than the ELGG one (if you are able to try that).

  • @TMP

    I just tried that, and the result is the same.

    Then I deactivated the garbage collector, and the messages come through without messages from the garbage collector.

    As to the messages, they allways get through to the recieving end, but only 1 out of 3 shows up in the senders own chat window. Meaning I only see about 1 out of 3 of my own sent messages, the rest disappears.

  • @slyhne - Strange - I will look into the garbage collector issue. As for the messages, any better with the garbage collector turned off?

  • @TMP

    Yes, with the garbage collector turned on I couldn't see any of my own messages, now I get some of them (but not all)

  • @TMP

    Not to push you, but how about my old suggestion to add a function to post to the wire in the left side of the bottom bar?

    Keep up the good work... :-)

  • @TMP

    Just noticed that somehow there had been created 1231 elgg_system_log_xxxxxxxx tables in my database. So there are other issues.

    The table creations stopped when I deactivated your plugin!

  • Do we have a spammer here on Elgg?

  • @Yakiv - I have reported the profile...

  • @The Mad Professor

    I´m follow your plugins with interessting. Your plugin provide also chatrooms or only friends chatting?

    At the moment i think about a chatroom solution who let´s create easy Chatrooms in ELGG Admin area, the front area with typical ELGG optic (user icons) with a userlist (shows chatting people) and standard adminfeatures for a chat (kick,bann,etc,...).But I must first find the approach...

  • Cube, this has been implemented as early as Elgg 1.x, I think, through PhpFreeChat. I am wondering if it will be re-released for Elgg 1.7.

  • Hello Mad Professor,

    I tested this version 0.8, and although the Mysql table is created, the table is never updated with any data. Although the chat still works, i would think its still using the SQLite. Any suggestions ?

    Regards,
    Uddhava dasa

  • Hey man, glad to see your working hard. I'm not going to bother with this update as I don't use Mysql direct but I look forward to the bug-fixes in the next. Somebody posted about making chat rooms and I think that that would be really cool. The chat room should have the same appearance as a user-chat and be connect to the bottom bar. That's more of a 2.0 project I suppose though. For now just keep working on those bug-fixes and work towards the big 1.0!

  • @Slyhne - "The Wire" function has been in for a while ... configurable on a per user basis ;). Still not sure why the garbage collector is causing issues .. will look into it.

    @Cube - As RPicard says - possibly for a v2 release, but group chat certainly won't be in v1.

    @Uddhava - If the MySQL table appears, it is using it - however it will delete messages out of the database when they have been delivered, which will give the appearance of an empty table.

  • Hi Mad Professor,

    Oh i see, IMHO it would be much better if the tables remain populated with the chats. That way delete queries are not necesarry, and thus less server load. Also better for monitoring usage. What do you think ?

    Also, it currently creates two tables in the mysql database, is this correct  ? One is named bbchat and the other prefix_bbchat.

    Regards,
    Uddhava dasa

  • @Uddhava - While I could simply mark the chat as "read", this would still need a query to perform so there would be no saving there and obviously this could become a large table very quickly, and without indexing it would quickly bog down the system. Also, from a privacy point of view it is better to remove the message than to keep it so they can be read by nefarious administrators (not that I am suggesting that you or anyone on here is - but better for users if they know their messages can't be read).

  • Hi Mad Professor,

    Ok, i understand your point, better for privacy. Although i'm sure someone is going to want that feature as a must have. Anyways, i tried the Mysql Direct option, and it still bogs down my site really badly, start getting 500 error's if more than 10 users come simultaneously to the site.

    It seems the chat is simply taking too much resources. No big difference with SQL lite, Mysldirect of SQLite. I've been thinking of setting up something like Mibbit : http://www.mibbit.com/ as a bottom bar chat, but the problem is how to make the connections persistent, any suggestions for doing that ?

    With Love,
    Uddhava dāsa

  • hi Mad

    my problem using your chat is a limit of my host.

    Error on site I have:

    User 'mydatabasename' has exceeded the 'max_questions' resource (current value: 120000)

    QUERY: SELECT * from endp_entities where guid=1 and ( (access_id in (2) or (owner_guid = -1) or (access_id = 0 and owner_guid = -1)) and enabled='yes')

    I'm using sqlite... trying to not abuse my database Mysql. But I continue to have my site blocked.

    but If I use another database with mysql I don't think that something changes.

    Can I do something to reduce query?

    For example is it possible to disable notification in the right corner?

    but most important...how can I reduce queries to db with your plugin?

    some advices?

  • on this problem I found this:

    http://x7chat.com/support_forum/index.php?PHPSESSID=361714adf0c2a1efa061bf9616f23c73&topic=943.msg3796#msg3796

    A fix for the max_questions limit error is currently in developement for release with Version 2.  The modification, which will probably be included with X7 Chat 2, will allow you to specify multiple MySql user accounts.  These accounts would each need to have the same access permissions to the same database.  The X7 Chat MySql Multiuser LIbrary (MUSE) handles everything behind the scenes.  It will use the first user account that you specify until it detects that the user account has exceeded the max_questions limit, then it will automatically switch to using the second user account.  This switch is invisible and will happen correctly even if the script is halfway through its execution when the limit is reached.  It will continue to use the second user account until the error is reached again, then it will switch to the third user account, and so on.

    The configuration will be simple, you simply need to enter the account names and passwords into the configuration file and adjust one other setting in the config.php file.

    In our tests we packed 6 users into a single server with a max_questions limit of only 5,000 (10 times less then the lowest value we have encountered on shared web hosts, so think 60 users on a crowded shared webhost).  We set up two user accounts with access to the X7 Chat database.  Then we proceded to chat.  We were able to continue chatting successfully without going over the limit!  The MUSE library successfully switched user accounts when account 1 hit its limit, and it worked on all 6 clients seemlessly.  Additionally, since the load was taken off account 1 when the limit was hit, account 1 quickly went back under its max_questions limit and was able to be used again!

    Expect MUSE support with the next release of V2.

    Please note: It may be against some webhost's TOS to use a multi-user system like this.  Please consult the TOS of your webhost before implementing the MUSE library.

  • Umm ... this isn't MUSE or X7chat, so this problem is nothing to do with this plugin i'm afraid. If you are using SQLite, then the bottom_bar plugin does not access MySQL at all, only ELGG objects, which are part of the normal site access so should not cause any issues.

    You can further reduce the updates by setting the max refresh to a higher value in the admin settings for the bottom bar, but I honestly think that you might have something else on the site causing issues.

  • I have problem to change the logo on left area.It just not show up.Any solution?

  • Chat isn't working for me at all, it appears that the database never got installed/updated with the plugins tables.

    - Ubuntu server JeOS 9.10 -

    Is this a known issue? Is there a workaround other than installing sqllite?

    Also, the plugin shows great promise, I really like it. I'm hoping to introduce this to our corporate network if we can get it to work.

  • @Ken - make sure the graphic is stored in the correct folder (instructions are on the admin settings page), and that your file permissions are set correctly

    @anonymous(?) - Not a known issue - providing the MySQL user details provided in the admin section have CREATE privs then it should install the table if it's not there. The work around would be to use ELGG objects instead, which should always work if your ELGG installation works.

The Mad Professor

Nutter .. Brit .. that's about it! ;)

Stats

  • Category: Uncategorized
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 15666
  • Recommendations: 17