[RC] Instant Messenger

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Scam Warning
User avatar
Dakin Quelia
Registered User
Posts: 300
Joined: Thu Feb 14, 2008 10:07 pm
Location: Belgium
Name: Daniel Chalsèche
Contact:

Re: [RC] Instant Messenger

Post by Dakin Quelia »

Hello pororo,
1) The mod name won't change.
2) It's different of Katib's suggestion.
3) It's done yet. :P
4) No. Confer ACP.
I hope reply to your questions. ;)

See you soon,

pororo
Registered User
Posts: 25
Joined: Tue Apr 20, 2010 3:04 pm

Re: [RC] Instant Messenger

Post by pororo »

OK, understood.

I like katib's suggestion. A lightbox effect to open up the instant messenger input box.

Peter77sx
Registered User
Posts: 3258
Joined: Wed Nov 09, 2005 2:51 pm

Re: [RC] Instant Messenger

Post by Peter77sx »

Very nice.

Maybe add it's own unique reply buttons later. :)

User avatar
Dakin Quelia
Registered User
Posts: 300
Joined: Thu Feb 14, 2008 10:07 pm
Location: Belgium
Name: Daniel Chalsèche
Contact:

Re: [RC] Instant Messenger

Post by Dakin Quelia »

Hello Peter77sx,

It's not possible. ;)

See you soon,

User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm
Contact:

Re: [RC] Instant Messenger

Post by keith10456 »

Nice work... :D

pororo
Registered User
Posts: 25
Joined: Tue Apr 20, 2010 3:04 pm

Re: [RC] Instant Messenger

Post by pororo »

Now I'm kinda confused.

What's the difference between this Instant Messenger vs PM System?

Don't they achieve the same thing :?:

User avatar
katib
Registered User
Posts: 562
Joined: Thu Jun 26, 2008 12:27 pm

Re: [RC] Instant Messenger

Post by katib »

pororo wrote:Now I'm kinda confused.

What's the difference between this Instant Messenger vs PM System?

Don't they achieve the same thing :?:
Well, I used a previous version of this Mod
From what I have read , every message sent to the user is deleted once it has been read, so there is no permanent "sent" or "inbox" messages
Another difference is that, once the user refresh or visit anpther page, a window is opened showing the message, and not only ibforming you of a new message, like PM
That's why; I asked Dakin Quelia to add a lightbox like window
It wouls be very convenient to make the incoming message pop up without the need to reload the page using Ajax
Last edited by katib on Fri Apr 30, 2010 10:34 pm, edited 1 time in total.

bubsy
Registered User
Posts: 6
Joined: Sun Dec 07, 2008 11:10 am

Re: [RC] Instant Messenger

Post by bubsy »

Hello
I have the mod Browser agent, and told me to find

Code: Select all

$ Online_userlist .= ($ online_userlist! ='')? ','. $ User_online_link: $ user_online_link;
and replace by

Code: Select all

                    // Browser  agent----------------------

                    if (preg_match('`'.$row['username'].'`', $online_userlist))
                    {
                        // l'utilisateur est déjà dans la liste(plusieurs sessions)
                    }
                    else
                    {
                        $online_userlist .= ($online_userlist != '') ? ', ' . $user_online_link : $user_online_link;
                        $online_userlist = $online_userlist.switch_agent($row['session_browser']);
                    }
                    // Browser  agent----------------------
I would put the addon on the index but I do not know how to

merci d'avance pour ta réponse Dakin Quelia
thank you in advance for your answer Dakin Quelia

User avatar
Dakin Quelia
Registered User
Posts: 300
Joined: Thu Feb 14, 2008 10:07 pm
Location: Belgium
Name: Daniel Chalsèche
Contact:

Re: [RC] Instant Messenger

Post by Dakin Quelia »

Test it:

Find:

Code: Select all

                        $online_userlist .= ($online_userlist != '') ? ', ' . $user_online_link : $user_online_link;  
Before

Code: Select all

                    // Begin Instant Messenger by Dakin Quelia
                    if ($row['user_type'] != USER_IGNORE)
                    {    
                        if ($user->data['user_id'] != ANONYMOUS)
                        {    
                            $user->add_lang('mods/instant_messenger');
                            $im_url = append_sid("{$phpbb_root_path}instant_messenger.$phpEx?mode=send&dest=" . $row['user_id']);
                            $user_online_link .= '<a href="'. $im_url .'"  onclick="popup(\'' . $im_url . '\', \'500\', \'300\', \'_phpbb_im\'); return false;"><img src="' . $phpbb_root_path . '/images/im/icon_minipost.png" alt="Instant Messenger" /></a>&nbsp;';        
                        }
                    }
                    // End Instant Messenger by Dakin Quelia  
;)

pororo
Registered User
Posts: 25
Joined: Tue Apr 20, 2010 3:04 pm

Re: [RC] Instant Messenger

Post by pororo »

katib wrote:
pororo wrote:Now I'm kinda confused.

What's the difference between this Instant Messenger vs PM System?

Don't they achieve the same thing :?:
Well, I used a previous version of this Mod
From what I have read , every message sent to the user is deleted once it has been read, so there is no permanent "sent" or "inbox" messages
Another difference is that, once the user refresh or visit anpther page, a window is opened showing the message, and not only ibforming you of a new message, like PM
That's why; I asked Darkonia to add a lightbox like window
It wouls be very convenient to make the incoming message pop up without the need to reload the page using Ajax
Oh, I see. It doesn't save like the PM system. Very interesting.

If this is true, it would be a good idea to have a quick reply box right underneath the received instant message. That way there would be no need to look up the sender's ID and press again the instant messenger icon. Just my 2 cents.

bubsy
Registered User
Posts: 6
Joined: Sun Dec 07, 2008 11:10 am

Re: [RC] Instant Messenger

Post by bubsy »

hello
it works really well thank you very much Dakin Quelia ;)

I have another question about the evolution of this little mod
very nice, is it possible to integrate smileys?

lovelysummer
Registered User
Posts: 437
Joined: Fri Mar 20, 2009 1:49 pm

Re: [RC] Instant Messenger

Post by lovelysummer »

Hi Dakin Quelia,

Firstly, without changing page , the receipient doesn't realize there is an IM . How long does the IM would be kept behind screen ?

Secondly, I request to have group permission to use IM.

Thanks :)

User avatar
Dakin Quelia
Registered User
Posts: 300
Joined: Thu Feb 14, 2008 10:07 pm
Location: Belgium
Name: Daniel Chalsèche
Contact:

Re: [RC] Instant Messenger

Post by Dakin Quelia »

Hello,

bubsy,
bubsy wrote:I have another question about the evolution of this little mod
very nice, is it possible to integrate smileys?
Maybe later. ;)

lovelysummer,
lovelysummer wrote:Firstly, without changing page , the receipient doesn't realize there is an IM. How long does the IM would be kept behind screen ?
Once readed the instant message is deleted. It need refresh page. ;)
lovelysummer wrote:Secondly, I request to have group permission to use IM.
It's done yet. ;)

User avatar
ErnadoO
Registered User
Posts: 337
Joined: Thu Jun 08, 2006 2:32 pm
Location: France
Name: Erwan Nader
Contact:

Re: [RC] Instant Messenger

Post by ErnadoO »

In instant_messenger.php, following is bad:

Code: Select all

        while($messenger = $db->sql_fetchrow($result))
        {
            $template->assign_vars(array(
                'SENDER'             => get_username_string('full', $messenger['sender_id'], $messenger['username'], $messenger['user_colour']),
                'DEST'                 => get_username_string('full', $messenger['dest_id'], $user->data['username'], $messenger['user_colour']),
                'DATE'                 => $user->format_date($messenger['date_msg']),
                'MESSAGE'             => $messenger['message'],

                'U_ACTION'             => append_sid("{$phpbb_root_path}instant_messenger.$phpEx", 'mode=reply&dest=' . $messenger['sender_id']),
                )
            );

            $sql = "DELETE FROM " . INSTANTMESSENGER_TABLE . " WHERE msg_id = " . $msg_id;
            $result = $db->sql_query($sql);
        }
        $db->sql_freeresult($result); 
Your sql query return one result and while loop is using for build html block with many résults out of sql result, it's not the case here.

Code: Select all

            // If message is empty
            if (empty($content))
            {
                $error = $user->lang['MESSAGE_EMPTY'];
            } 
must be replace by

Code: Select all

            // If message is empty
            if (empty($content))
            {
                $error[] = $user->lang['MESSAGE_EMPTY'];
            } 
Former Administrator && MOD team leader on phpbb-fr.com

User avatar
Dakin Quelia
Registered User
Posts: 300
Joined: Thu Feb 14, 2008 10:07 pm
Location: Belgium
Name: Daniel Chalsèche
Contact:

Re: [RC] Instant Messenger

Post by Dakin Quelia »

Thanks ErnadoO. I'll fix it. ;)

Locked

Return to “[3.0.x] MODs in Development”