News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

View Single PM

Started by SleePy, November 11, 2006, 11:56:55 AM

Previous topic - Next topic

Smasher

Sleepy,

Just wanted to thank you for this code... When I first got SMF I was real unhappy to see the way the PMs were displayed.... this is exactly what I was looking for...

I found this thread looking for a solution to the "Marked Read" problem... and now I understand that it is the core software that causes that.

Thank you for your time on a very useful mod.
Site in Development

Powered by SMF 2.0.4
     - EzPortal 1.0
     - SA Facebook Integration

Robi052

Quote from: SleePy on August 13, 2007, 04:08:05 PM
Try another browser to download the file and upload the mod or even try from the package server to get the mod.

try and with opera and download and install from admin panel/packages but same error message

SleePy

Are you using 1.3? or 1.2?

I repacked 1.3 and replaced it with what is on the mods page. So give that new one a try.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Robi052

SMF 1.1.3. Now try again but same error. Other mods working fine.

SleePy

I was talking about Mod version.
I released View Single PM 1.3 the other day but left 1.2 incase of problems with 1.3
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Robi052

1.3 .... download again mod

SleePy

Lets try this. Download the mod. Decompress it then recompress it (either with zip or tar.gz)
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Robi052

Download mod, unpack and then compress to zip file. That get error. Then compress uncompressed folder to tar.gz and that working. Thanks

Smasher

#68
I wanted to look at this a little closer because I see some people out there have the same concern as I do about the messages getting automatically marked as read...

I noticed that in PersonalMessage.php around line 372 there is the following code.

// Mark all messages as read if in the inbox.
if ($context['folder'] != 'outbox' && !empty($context['labels'][(int) $context['current_label_id']]['unread_messages']))
markMessages(null, $context['current_label_id']);
}


If you comment that code out then it no longer automatically marks the PMs as read when you are on the page that lists the PMs....  Now we have the problem of how to mark an individual PM as read.

I see that the following code is the end of the code to post a single message...

$counter++;

// View Single PM to work correctly we have to add it after the counter had its addition to it..
$output['p'] = $scripturl . '?action=pm;f=' . $context['folder'] . ';l=' . $context['current_label_id'] . ';p=' . $counter;

return $output;
}


Is there a way that we can do something here to mark only that individual message as read?

I just cant understand why we can mark all messages as read but cant seem to mark only one as read. Maybe I am trying to go into something I should not?

This would then only leave the problem of the icon on the main listing... but that is a minor compared to this...
Site in Development

Powered by SMF 2.0.4
     - EzPortal 1.0
     - SA Facebook Integration

asdas2

Thank YOU.... works gooood :) m happy :)
www.chillparadise.com

for all desi people .... get everything u ever wanted.... log in to view hidden stuff.

Mick.

I get these 2 errors:

8: Undefined index: current_topic
File: /home/midwesta/public_html/Themes/default/PersonalMessage.template.php (folder sub template - eval?)
Line: 306


8: Undefined index: current_topic
File: /home/midwesta/public_html/Themes/default/PersonalMessage.template.php (folder sub template - eval?)
Line: 307


I looked in personalmessage.template.php and all strings are there.

What gives?

SleePy

My mod doesn't add any current_topic strings to the PersonalMessage.template.php

You do have eval on, so lets shut it off incase it is lieing to us ;)
Run This query In phpMyAdmin (What is phpMyAdmin?)
REPLACE INTO smf_settings VALUES ('disableTemplateEval', 1);
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Mick.

Quote from: SleePy on November 25, 2007, 01:36:45 PM
My mod doesn't add any current_topic strings to the PersonalMessage.template.php

You do have eval on, so lets shut it off incase it is lieing to us ;)
Run This query In phpMyAdmin (What is phpMyAdmin?)
REPLACE INTO smf_settings VALUES ('disableTemplateEval', 1);


Hmm.   Still same errors coming up.

SleePy

Are you sure its the exact same error? It might be slightly different with a different file perhaps.

Can you attach the file? While my mod didn't add this, we can figure out which one did.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Mick.


SleePy

Do you have a karma mod installed?
Such as Karma Description?

I see that the line around it has this

// Is this user allowed to modify this member's karma?
if ($message['member']['karma']['allow'])
echo '
<div align="', $karmaButtonAlign, '">
<a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '"><img src="' . $settings['images_url'] . '/', $modSettings['karmaApplaudImage'], '" alt="', $modSettings['karmaApplaudLabel'], '" title="', $modSettings['karmaApplaudLabel'], '" border="0" /></a>
<a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '"><img src="' . $settings['images_url'] . '/', $modSettings['karmaSmiteImage'], '" alt="', $modSettings['karmaSmiteLabel'], '" title="', $modSettings['karmaSmiteLabel'], '" border="0" /></a><br />
</div>';


Which is from another mod.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Mick.

Quote from: SleePy on November 26, 2007, 01:51:36 AM
Do you have a karma mod installed?
Such as Karma Description?

I see that the line around it has this

// Is this user allowed to modify this member's karma?
if ($message['member']['karma']['allow'])
echo '
<div align="', $karmaButtonAlign, '">
<a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '"><img src="' . $settings['images_url'] . '/', $modSettings['karmaApplaudImage'], '" alt="', $modSettings['karmaApplaudLabel'], '" title="', $modSettings['karmaApplaudLabel'], '" border="0" /></a>
<a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '"><img src="' . $settings['images_url'] . '/', $modSettings['karmaSmiteImage'], '" alt="', $modSettings['karmaSmiteLabel'], '" title="', $modSettings['karmaSmiteLabel'], '" border="0" /></a><br />
</div>';


Which is from another mod.

Yeah,is it because the last line is twice?

SleePy

There not the same. They are familiar though.

You should go ask the mod author for the Karma Description Mod. Since this mod appears to be the cause of it at the moment.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

endiZ

This mod seems incompatible with Theme Blue LT.

Is the mod suppose to be Theme Specific?

SleePy

This modification makes a few edits to the PersonalMessage.template.php.
These changes couldn't be avoided sadly :)

You can use Daniels Package Parser mod and only look at theme edits. Then apply these changes manually. I run a copy of his parser at my own site for convince :P http://sleepycode.com/PackageParser/index.php

If you still need help I can help you make these changes.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Advertisement: