News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

PM Receipt Confirmation

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

Previous topic - Next topic

Kalina

Quote from: SpectroPro on October 30, 2008, 09:18:59 AM
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
Hi, I just did this for the 1.1.6 version, unfortunately, I have no experience with 2b4, but for anyone who wants it as a column instead, here's how to do it.

Do the same edits above to the other files I listed, but do this instead with this file:

Themes/default/PersonalMessage.template.php

Find
<td align="center" width="24"><input type="checkbox" onclick="invertAll(this, this.form);" class="check" /></td>

Add Above
';
if($context['folder'] == 'outbox')
{
    echo '<td align="center"><b>Status</b></td>';
}
echo '


Find
            <td>', ($context['from_or_to'] == 'from' ? $message['member']['link'] : (empty($message['recipients']['to']) ? '' : implode(', ', $message['recipients']['to']))), '</td>

Add Below
';
if($context['folder'] == 'outbox')
{
    echo '<td class="windowbg2 smalltext" align="center">'. ($message['recipients']['is_read'] == '1' ? 'read' : 'unread') .'</td>';
}
echo '


SpectroPro

#41
Working on this for 2b4...  The files are almost exactly the same, save for some case issues...  So I made all the changes you describe..  I get this error:

Parse error: syntax error, unexpected T_STRING in /home/sssss/public_html/ssss/ssss/Sources/PersonalMessage.php on line 723

That line is this:

         SELECT pmr.id_pm, mem_to.id_member AS id_member_to, mem_to.real_name AS to_name, pmr.bcc, pmr.labels, pmr.is_read" . ($context['folder'] == 'outbox' ? ", pmr.is_read" : '') . "


what would cause that?
Stats:  SMF v. 2b4  -  Mambo v4.65  -  Bridge v2.0b1

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

palofdru

Quote from: SpectroPro on October 30, 2008, 09:18:59 AM
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...

i agree
My best suggestion to you is that you do whatever you feel like doing, for whatever reason you choose to make, without any required explanation nor justification. You probably will, so hop to it!

boo hoo!

Sabre™

Very nice.
Have been looking for such a thing for awhile.

Good job also Kalina :)

Would anyone be able to make the "unread" text display as red, and the "read" display as green?

Colours help the elder members identify with the result more comfortably etc

ThankYou for any assistance
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


palofdru

Quote from: Sabre™ on November 03, 2008, 05:32:58 AM
Very nice.
Have been looking for such a thing for awhile.

Good job also Kalina :)

Would anyone be able to make the "unread" text display as red, and the "read" display as green?

Colours help the elder members identify with the result more comfortably etc

ThankYou for any assistance

^ If that is the case, you may want to have an unread icon as well as a 'read' icon, since
a. People may have difficulty differentiating between red/green.
b. Those colors may have conflicts with the current themes color scheme
My best suggestion to you is that you do whatever you feel like doing, for whatever reason you choose to make, without any required explanation nor justification. You probably will, so hop to it!

boo hoo!

SpectroPro

#45
BUMP

Quote from: SpectroPro on October 31, 2008, 12:56:44 AM
Working on this for 2b4...  The files are almost exactly the same, save for some case issues...  So I made all the changes you describe..  I get this error:

Parse error: syntax error, unexpected T_STRING in /home/sssss/public_html/ssss/ssss/Sources/PersonalMessage.php on line 723

That line is this:

         SELECT pmr.id_pm, mem_to.id_member AS id_member_to, mem_to.real_name AS to_name, pmr.bcc, pmr.labels, pmr.is_read" . ($context['folder'] == 'outbox' ? ", pmr.is_read" : '') . "


what would cause that?


Anyone can help me with this....greatly appreciated..  You can PM me, yahoo, msn, aim...  Would LOVE to get this working on 2b4....
Stats:  SMF v. 2b4  -  Mambo v4.65  -  Bridge v2.0b1

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

palofdru

parse errors are almost always caused by a unterminated string or some structural error. This error occurs BEFORE the PHP interpreter has even been able to look at code.

The line of code you have here is incomplete, repost with the 4 lines before and the 4 lines after that line you have.
My best suggestion to you is that you do whatever you feel like doing, for whatever reason you choose to make, without any required explanation nor justification. You probably will, so hop to it!

boo hoo!

SpectroPro

Here is that entire section of code:  (and yeah, I was reading about that error on a php site, and checked everything they suggested, but damned if I see the error....)

// Get recipients (don't include bcc-recipients for your inbox, you're not supposed to know :P).
$request = $smcFunc['db_query']('', '
SELECT pmr.id_pm, mem_to.id_member AS id_member_to, mem_to.real_name AS to_name, pmr.bcc, pmr.labels, pmr.is_read" . ($context['folder'] == 'outbox' ? ", pmr.is_read" : '') . "
FROM {db_prefix}pm_recipients AS pmr
LEFT JOIN {db_prefix}members AS mem_to ON (mem_to.id_member = pmr.id_member)
WHERE pmr.id_pm IN ({array_int:pm_list})',
array(
'pm_list' => $all_pms,
)
);
Stats:  SMF v. 2b4  -  Mambo v4.65  -  Bridge v2.0b1

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

Sabre™

Quote from: palofdru on November 03, 2008, 12:40:40 PM
If that is the case, you may want to have an unread icon as well as a 'read' icon

Thats not a bad idea.
Are you gonna offer a solution, or just the idea?

Quote from: palofdru on November 03, 2008, 12:40:40 PM
b. Those colors may have conflicts with the current themes color scheme

My theme is dark.
Red n green stand out so well that I use them for various site messages.
So no problem for my theme, but your icon idea seems the better way to go about it
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


SpectroPro

Quote from: Sabre™ on November 04, 2008, 01:54:11 AM

My theme is dark.
Red n green stand out so well that I use them for various site messages.
So no problem for my theme, but your icon idea seems the better way to go about it

No matter the background, red and green are actually the 2 colors that most color blind people can NOT distinguish..  They see something, just can't tell you the color.

Greg
Stats:  SMF v. 2b4  -  Mambo v4.65  -  Bridge v2.0b1

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

Sabre™

You assume people do not know that?
Thats why they then notice what the words are, assuming they can still read also ;)
Anyway, I wasnt asking about people that are colour blind, so I dont know why it is being spoken of.
I have since added buttons/images, so thank you come again.
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


SpectroPro

Quote from: Sabre™ on November 03, 2008, 05:32:58 AM
Very nice.
Have been looking for such a thing for awhile.

Good job also Kalina :)

Would anyone be able to make the "unread" text display as red, and the "read" display as green?

Colours help the elder members identify with the result more comfortably etc

ThankYou for any assistance


THAT is why I posted it..  RED and GREEN are the two worst colors to use, especially for older and or color blind people.  So yes, I presumed you did NOT know that.
Stats:  SMF v. 2b4  -  Mambo v4.65  -  Bridge v2.0b1

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

Sabre™

Presumption was wrong.
We cannot cater to everybody, but merely limit the gaps :)
Otherwise we may aswell cater to the blind also, as they cannot tell red or green too!
Did you know that? :D
I thought of it once, but it is just too much work, especially embedding code so when they mouse over an image, it will describe what that image is...
Not too difficult, just time consuming.

Now see how my asking for colours, has moved from colour blind people, to the blind!??
Funny how people like to change a question to suit them isnt it? :)

pmsl
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


SpectroPro

Ok.. I fixed the error that was coming up on 723.  the " needed to be '

That done, the page loaded, but didn't see anything at all.

I then made the mod to show a column.  No error, but still see nothing at all different.  So I am apparently missing something in the code.  Maybe the window being called is not named properly...or something.. 

Here is what I did to get it to NOT give an error in 2b4 (but again, no change in appearance at all)

QuoteSources/PersonalMessage.php

Find:
Code:

      SELECT pmr.id_pm, mem_to.id_member AS id_member_to, mem_to.real_name AS to_name, pmr.bcc, pmr.labels, pmr.is_read


Replace:
Code:
           SELECT pmr.id_pm, mem_to.id_member AS id_member_to, mem_to.real_name AS to_name, pmr.bcc, pmr.labels, pmr.is_read' . ($context['folder'] == 'outbox' ? ', pmr.is_read' : '') . '




Find Twice:
Code:
      $recipients[$row['id_pm']][empty($row['bcc']) ? 'to' : 'bcc'][] = empty($row['id_member_to']) ? $txt['guest_title'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member_to'] . '">' . $row['to_name'] . '</a>';


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


Themes/default/PersonalMessage.template.php

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

Add After:
Code:
';
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 '

Find
Code:
<td align="center" width="24"><input type="checkbox" onclick="invertAll(this, this.form);" class="check" /></td>

Add Above
Code:
';
if($context['folder'] == 'outbox')
{
    echo '<td align="center"><b>Status</b></td>';
}
echo '


Find
Code:
            <td>', ($context['from_or_to'] == 'from' ? $message['member']['link'] : (empty($message['recipients']['to']) ? '' : implode(', ', $message['recipients']['to']))), '</td>

Add Below
Code:
';
if($context['folder'] == 'outbox')
{
    echo '<td class="windowbg2 smalltext" align="center">'. ($message['recipients']['is_read'] == '1' ? 'read' : 'unread') .'</td>';
}
echo '

The find's work perfectly for 2b4 now..  there were case issues from the 1.6 version... 

If anyone can shed some light on this, I know many would be grateful.  I know I will....  If I find the answer, I'll post it as well.

Greg

----------------
Greg is currently listening to: Flo Rida - Low
via FoxyTunes
Stats:  SMF v. 2b4  -  Mambo v4.65  -  Bridge v2.0b1

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

Sabre™

#54
For anybody that wonders through this thread, I package all tips etc so I can easily uninstall the edits if needed.

Thought I'd share it for those that are uneasy with manual edits, or who just wanna make life easier for themselves lol
[HERE] are Kalinas edits for this tip packaged.

Sorry for the link, cannot attach in this Category

EDIT:
This is for 1.1.x   not SMF 2
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


katib

Thanks SpectroPro
Quote from: SpectroPro on November 05, 2008, 02:22:30 AM
The find's work perfectly for 2b4 now..  there were case issues from the 1.6 version...
If anyone can shed some light on this,
I also will be waiting for anyone willing to shed some light on this in order to use this great mod on SMF2beta4 
منتدى الحجاج ... منتدى للقراءة والكتاب
http://www.hijaj.net

Advertisement: