Skip navigation.
Home

PHP Tasks

PHP Tasks required * Add Login form to the chat page. * Integrate between the chat and user database. * Add a list for online users to the chat page. * Create a Site Log Module. Currently I have an account on [statcounter|http://www.statcounter.com/] which is wonderfull but limitted. This is optional but we can make use of any OpenSource project. * Create a new Page to display New Articles, New forum topics, new blog posts, new Jobs and add this block to the main page body, may be added as a stick page or modify the drupal theme, See sample here: http://www.egjug.org/egjug.JPG *Modify the "Who's new" block to display the total number of users. *Install the [phlogger|http://www.phpee.com/11.html]. __Done By Ahmed Hashim__

Okay, lets take 1-by-1

Okay, lets take 1-by-1. I'll introduce here my initial methodology to implement those features and if the methodology change during implementation, I'll update here too. Your suggestions is welcome too. * __Add Login form to the chat page__ ;: This need to add a session handling to the Chat system. I will need: ** The Chat source code ** A database table for chat users * __Integrate between the chat and user database__ ;: This need to: ** Integrate drupal session handling and the session handling introduced in the above step. ** Syncronize between the chat users table introduced above and the drupal users table, or replace the the chat users table with drupal users table (recommended) ;: I'll need: ** The Chat source code ** Knowing what drupal version are currently used * __Add a list for online users to the chat page__ ;: That will be easy after making the above integration. Just add a small block to the Chat page. However, we have 2 choices: ## Show Who's Online either on EGJUG and on the Chat System. This can be done by adding the code of 'Who's online' block found in drupal. ## Show 'Who's Online' only on the Chat System and this may need to introducte a new column in Drupal USERS table to differentiate between EGJUG's online users and the chat system's online users. I'm not sure that this could be easy task. I would like to add 2 more features to the chat system: * Timestamp in front of each message: ;: Just add a PHP time() function in front on each message * Keeping logs of chat: ;: This will need: ** Adding a new table to drupal (if integration successed) to keep chat username, message timestamp, message text. ** Change in the Chat System 'submit' button code to insert this information to the table. ** Introduce a new page in the Chat System to view logs. Please note, if these tasks are done successfully, we have to contribute the new Chat System as a module to Drupal (and to the Chat System developers if exist and licensed under GPL). ---- \\Rami Sedhom \\http://ikhnaton2.manalaa.net

A littel comment on

A littel comment on this "Show 'Who's Online' only on the Chat System and this may need to introducte a new column in Drupal USERS table to differentiate between EGJUG's online users and the chat system's online users. I'm not sure that this could be easy task" Isn't there any event on PHP for page load an page unload, if there is u can add user to the online list on page load, and when that user close the wind remove him from the online llist. U will have to put a listenr on the user name text box so that u cahnge his diplay name whenever he change it. Why we should have a login form in chat page, it should take its authentication from drupal, and chat should not be allowed except for registerd members. ------------- Amr Kourany Software Engineer IBM WTC, Egypt Branchb

Good Points

|>
Isn't there any event on PHP for page load an page unload, if there is u can add user to the online list on page load
Nice idea but this could be done better using JavaScript or AJAX. |>
U will have to put a listenr on the user name text box so that u cahnge his diplay name whenever he change it
Do u think we should allow users to change his display name (nickname)? I think it's better to make the display name as his EGJUG username as if he login. |>
Why we should have a login form in chat page, it should take its authentication from drupal
You are right. If we combine the 1rst two features, we'll not need a separate login form coz we'll use the drupal login. |>
and chat should not be allowed except for registerd members.
Good point. This should be clear too: aren't we going to allow guests out of registered users? ---- Rami Sedhom \\http://ikhnaton2.manalaa.net

Thank you Rami for your

Thank you Rami for your help. I'll provide you with all details you need. On this moment I'll tell you some comments on quick: * [The AJAX chat src|http://www.plasticshore.com/projects/chat/ajaxchat.zip]. * The AJAX chat already has a table for log and it is working well. * We will need to add this table to drupal database. * We will use the EGJUG login for and if the user is not login we will forward him/her to the login page. * I'll provide you with drupal version, schema. * It will be fine if you add the time. I am Sorry because i am very busy those days. We can have much time on the weekend Regards, -------------%%% __Ahmed Hashim__%%%

Take your time, it's not

Take your time, it's not expected to finish it soon coz I'm busy this week too. However, I'll check the AJAX chat code and see what can be. done. ---- Rami Sedhom \\http://ikhnaton2.manalaa.net

Me too :)

Me too :) TYT, The AJAX chat code is so simple. The database is only one table. -------------%%% __Ahmed Hashim__%%%

Rami,

Rami, *I sent you the chat source code *I am using Drupal version 4.6.1 *The chat already contain log table. *You can modify the user table and I'll update it. I hope that we can got a new features soon. -------------%%% __Ahmed Hashim__%%%

I know I'm little late

I know I'm little late in doing the above tasks. I'll do it as soon as I finish the project in my hand. ---- \\Rami Sedhom \\http://ikhnaton2.manalaa.net

well..

i just came across this via google... http://www.brandedthoughts.co.uk/story/drupal-ajax-live-chat .. give it a look

Is it tested?

Is it tested? I tried ajax_spellcheck before and it didn't work. It worth trial. -------------%%% __Ahmed Hashim__%%%