Menu

#5 Function improvements and removal patch

open
nobody
None
5
2012-11-15
2011-11-25
No

Hello,

thank you for your great pice of of software :-)

For my demands I did some adjustements and maybe you find some of these useful for your project.

Mostly I removed functionality, that may confuse my users (selection of style, changing of nick name, ...), added privacy by disabling the logging of the IPs, included auto-login by setting user name and password by URL, added message sending by a script when a user logs in, changed translations and added a logo to chat.

Have fun,
Hauke

Discussion

  • Hauke Goos-Habermann

    Function improvements and removal patch

     
  • Mansoor Khan

    Mansoor Khan - 2011-12-07

    How does one use this patch? I would like to use the part where people can auto-login but I have no idea how to implement this.

    Any response appreciated.

     
  • Mansoor Khan

    Mansoor Khan - 2011-12-10

    Thanks Hauke,

    Will certainly try to get that going on our site.

    While I have your attention can I ask you if you can help me with 2 other things that I need to resolve for our chat.

    1. So be able to login without the Online Users panel opening. Because I am using the chat in a narrow column it would help if that did not open then the full width is available for the chat and in a narrow format the panel confuses newcomers to our site.

    2. The above I am trying to do because I cannot seem to get the shoutbox version of same chat to work. That would be lighter and easier to fit on different pages of my site. NOTE: I am wanting to put this directly on my webpage and not on phhBB or any forum site.

    I have floated this question on this forum and you could find it by looking at my other posts.

    Sorry for taking the liberty but just did not know who to ask.

    Thanks

    Mansoor
    (Logged in here as vu2mhk)

     
  • Hauke Goos-Habermann

    Hello Mansoor,

    I'm not sure if I can really help you.

    I'm using the Ajax Chat in an iframe with a fixed height and a variable width:

    <iframe src="https://httpuser:httppassword@myserver/chat/?user=chatuser&pass=chatPass" width="90%" height="450"></iframe>

    The iframe scales (in x direction) up and down (to a minimum) well.

    I don't use the shoutbox mode in my setup and don't know how to activate it, sorry.

     
  • Mansoor Khan

    Mansoor Khan - 2011-12-13

    Thanks Hauke,

    I am able to directly login with the addition of link as you suggested. Great help!

    BUT for message sending script when user logs in, I am not sure where you have made the changes. If you can guide that please.

    For you information I was able to solve the code for starting the chat without the ONLINE USERS panel. Just in case you need it here is what you do....
    Open \lib\template\loggedIn.html

    FIND:
    <div id="onlineListContainer">
    <h3>[LANG]onlineUsers[/LANG]</h3>
    <div id="onlineList"></div>

        &lt;/div&gt;
    

    ADD THIS CODE AFTER IT:

    <script type="text/javascript">
    toggleContainer('onlineListContainer', new Array('settingsContainer','helpContainer'));
    </script>

    Thanks immensely for your help.

    Mansoor

     
  • Mansoor Khan

    Mansoor Khan - 2011-12-13

    Ok I managed the Email part when someone logs online too.

    It looks like this:

    This is how I have done a simple version where it at least sends me an email that a user by the name $user has logged onto our chat room Open AjaxChat.php in /lib/class FIND: function addToOnlineList() { $sql = 'INSERT INTO '.$this->getDataBaseTable('online').'( userID, userName, userRole, channel, dateTime, ip ) VALUES ( '.$this->db->makeSafe($this->getUserID()).', '.$this->db->makeSafe($this->getUserName()).', '.$this->db->makeSafe($this->getUserRole()).', '.$this->db->makeSafe($this->getChannel()).', NOW(), '.$this->db->makeSafe($this->ipToStorageFormat($_SERVER['REMOTE_ADDR'])).' );'; // Create a new SQL query: $result = $this->db->sqlQuery($sql); AND AFTER THAT ADD THE CODE: // Send Email to Your NAME that a guest has logged into Chat Room: {$user = $this->getUserName();} $to = "youremailid"; $subject = "$user has just logged into our Chat Room. Yipee!"; $body = "$user has just logged into our Chat Room. Yipee!";

     
  • Hauke Goos-Habermann

    The message sending script is called in lib/class/CustomAJAXChat.php with the line:

    exec('sudo -u ras /home/ras/sendMsg "Benutzer '.$userName.' hat sich angemeldet!"',$lines,$ret);

    This calls a BASH script, that sends me a message via Jabber, so I get informed when an user log in and I don't have to check the Ajax Chat all the time. O course you can call any other script to keep you informed or remove the line.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.