News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

PM Receipt Confirmation

Started by Pause, December 09, 2004, 07:18:21 AM

Previous topic - Next topic

pongsak

1.1.2 it's work for me
only correct 1 site near the original select query, others's same mod. as above.
smf 1.1.2 with dilbermc themes.
> 50 mods installed.

pongsak

After 1 wk used of this trick, i found that if i send for same member many pms , it shown only read one , the others unread.
But if one by one , it's ok.
smf 1.1.2 with dilbermc themes.
> 50 mods installed.

jaceman

Can anyone help me to implement this?  The thread started years ago and SMF has changed a lot.  I'd like a ready to go mod for this (anything else is probably going to result in me destroying my forum), but am willing to give it an attempt if someone can walk me through it.

I don't know enough about SMF to know what to apply from those who posted in 2005 with those who have posted this year.  I would be EXTREMELY grateful if someone could list all of the files in SMF 1.1.2 that need to be changed to get this working and exactly what those changes are.

Also, if possible, confirm my suspicion.  I am assuming that if I manually update the code to add this NEEDED feature, if we upgrade our forum later I will have to manually make the changes again.  Correct?

Thanks in advance.

razorblitz07

Resurrecting the topic....

Any way of making the pm read receipt code work for v1.1.5 and higher?

icon

could somebody post the final codes needed for this modification?

razorblitz07

Yes, is there a final script for this...one that works with 1.1.5?

N3RVE

#27
Ralph "[n3rve]" Otowo
Former Marketing Co-ordinator, Simple Machines.
ralph [at] simplemachines [dot] org                       
Quote"Somewhere, something incredible is waiting to be known." - Carl Sagan

Kalina

#28
I just installed this in 1.1.6 and it's working. I will share what I did.

Sources/PersonalMessage.php

Find:
            SELECT pmr.ID_PM, mem_to.ID_MEMBER AS ID_MEMBER_TO, mem_to.realName AS toName, pmr.bcc, pmr.labels, pmr.is_read

Replace:
            SELECT pmr.ID_PM, mem_to.ID_MEMBER AS ID_MEMBER_TO, mem_to.realName AS toName, pmr.bcc, pmr.labels, pmr.is_read" . ($context['folder'] == 'outbox' ? ", pmr.is_read" : '') . "

Find Twice:
                $recipients[$row['ID_PM']][empty($row['bcc']) ? 'to' : 'bcc'][] = empty($row['ID_MEMBER_TO']) ? $txt[28] : '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER_TO'] . '">' . $row['toName'] . '</a>';

Add After Each Instance:
         if($context['folder'] == 'outbox')
         {
            $recipients[$row['ID_PM']]['is_read'] = $row['is_read'];
         }


Themes/default/PersonalMessage.template.php

Find:
                        <div class="personalmessage">', $message['body'], '</div>

Add After:
';
if($context['folder'] == 'outbox')

{

   echo '<br /><div class="windowbg2" style="padding:3px">';

   foreach($message['recipients']['to'] as $person)

   {

      echo $person . ($message['recipients']['is_read'] == '1' ? ' has' : ' hasn\'t') . ' read this message.</div>';

   }

}
echo '


Now go view a message in your outbox to see how it looks. ;)

genieuk

Very nice,

can you tell me something before i go ahead, when you send a PM to someone do they get asked to send a read recipent PM back or does it just send one back anyway?

Also can this be disabled in admin or can a member disable via there account?

Thank you,
Mathew

Kalina

They don't get asked, it automatically detects if it was read or not, and there's no admin/member options.

genieuk

ok thanks, would be good for member to turn on or off thou as some might get fed up with having a PM back to say they read it specially if they choose to receive an email when they get PM.

Thank you
Mathew

Kalina

I agree but I'm not really a programmer so I wouldn't know how to make it, hopefully someone else does and will! :)

You don't get a pm back btw, it's just placed in your sent pm's content, under what you typed to the other person it will say if they read it or not, no one even knows it's there unless they view their own sent pm's. ;)

genieuk

Quote from: Kalina on October 27, 2008, 05:21:25 PM
I agree but I'm not really a programmer so I wouldn't know how to make it, hopefully someone else does and will! :)

You don't get a pm back btw, it's just placed in your sent pm's content, under what you typed to the other person it will say if they read it or not, no one even knows it's there unless they view their own sent pm's. ;)

ah rite, i understand now,

thanks
Mathew

fredda88

I get:

Template Parse Error!
There was a problem loading the /Themes/default/PersonalMessage.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.
--------------------------------------------------------------------------------

parse error, unexpected T_STRING


I double checked what i edited and as far as i can see i followed your example.

Kalina

Quote from: fredda88 on October 28, 2008, 05:48:05 PM

I double checked what i edited and as far as i can see i followed your example.

Can you post your PersonalMessage.template.php?

fredda88

#36
Ok, here it is without the mod!

edit: hmm... can't post that long textfiles, anyway i compared (with ultraedit) the one on the server with a fresh one and there are no differences.

This is how i inserted your mod:

<div class="personalmessage">', $message['body'], '</div>
';
if($context['folder'] == 'outbox')

{

   echo '<br /><div class="windowbg2" style="padding:3px">';

   foreach($message['recipients']['to'] as $person)

   {

      echo $person . ($message['recipients']['is_read'] == '1' ? ' has' : ' hasn't') . ' read this message.</div>';

   }

}
echo '

</td>
</tr>
<tr class="', $windowcss, '">
<td valign="bottom" class="smalltext" width="85%">
', (!empty($modSettings['enableReportPM']) && $context['folder'] != 'outbox' ? '<div align="right"><a href="' . $scripturl . '?action=pm;sa=report;l=' . $context['current_label_id'] . ';pmsg=' . $message['id'] . '" class="smalltext">' . $txt['pm_report_to_admin'] . '</a></div>' : '');

SpectroPro

Anyone do this for 2b4?  I think it would be a great feature if it added a colum to your sent messages page..  That column would say:  read  or  unread  depending on the status..  This way, you can see at a glance.

Date       Subject            To         Read/Unread


That would be a perfect add-on!!!!

And from an early post..  I agree, the way messages are displayed needs to change..  Just show the subjects and NOT the actual messages under them...  ONLY show messages if the subject is clicked in the list...
Stats:  SMF v. 2b4  -  Mambo v4.65  -  Bridge v2.0b1

http://www.therealityrocks.com    http://forum.therealityrocks.com/trr
- Greg

Kalina

fredda, you're missing the slash in "hasn't", please use this:

';
if($context['folder'] == 'outbox')

{

    echo '<br /><div class="windowbg2" style="padding:3px">';

    foreach($message['recipients']['to'] as $person)

    {

        echo $person . ($message['recipients']['is_read'] == '1' ? ' has' : ' hasn\'t') . ' read this message.</div>';

    }

}
echo '


I will see if I can edit my post above to fix it.

fredda88


Advertisement: