News:

Wondering if this will always be free?  See why free is better.

Main Menu

Problems with Personal Messages......

Started by dougiefresh, April 05, 2011, 07:59:04 PM

Previous topic - Next topic

dougiefresh

When I convert my phpBB board to SMF, all of my PM conversations from the phpBB board are listed under a single conversation in the SMF board.  How can I fix this?  Assistance would be greatly apprecitated!  Thanks ahead of time!

EDIT: By the way, I'm converting from phpBB 3.0.8 to SMF 2.0 RC5.  Hope this info helps.....

boogi

Hi, today for tests I converted phpBB-3.0.8 to the brand new SMF-2.0 (Gold) and encountered the same problem.

PhpBB3 was not a new install, but it was some time ago updated from phpBB2, if this can mean something.

MrMike

#2
Quote from: dougiefresh on April 05, 2011, 07:59:04 PM
When I convert my phpBB board to SMF, all of my PM conversations from the phpBB board are listed under a single conversation in the SMF board. 

It's a setting. To fix it, do this:

Click the "My Messages" button.
Click the "Preferences" button.
Change the top dropdown labeled "Display personal messages". Set it to "As a conversation".

Hope this helps somebody, it had me baffled for a little while.

dougiefresh

#3
Quote from: MrMike on June 16, 2011, 04:27:31 PM
It's a setting. To fix it, do this:

Click the "My Messages" button.
Click the "Preferences" button.
Change the top dropdown labeled "Display personal messages". Set it to "As a conversation".

Hope this helps somebody, it had me baffled for a little while.
My PM setting is set to Conversation,

Okay, I figured out at least part of the problem.....  In order to seperate each PM, the id_pm_head field in smf_personal_messages must match the id_pm field, but this only works if each pm's id_pm_head field is set to 0.....

So I executed this query on my forum after converting from phpBB:
UPDATE `smf_personal_messages` SET id_pm_head = id_pm WHERE id_pm >0
This splits the entire "conversation" into their seperate PMs that they are, however they still aren't grouped together like the the actual conversations that they are in phpBB.

dougiefresh

#4
I did a little more digging into how phpBB works with it's personal messages with the help of a friend and figured out what to modify in the phpbb3_to_smf.sql file (found here).

Find this:/******************************************************************************/
--- Converting personal messages (step 1)...
/******************************************************************************/

TRUNCATE {$to_prefix}personal_messages;

---* {$to_prefix}personal_messages
SELECT
pm.msg_id AS id_pm, pm.author_id AS id_member_from, pm.message_time AS msgtime,
SUBSTRING(uf.username, 1, 255) AS from_name, SUBSTRING(pm.message_subject, 1, 255) AS subject,
SUBSTRING(REPLACE(IF(pm.bbcode_uid = '', pm.message_text, REPLACE(REPLACE(pm.message_text, CONCAT(':1:', pm.bbcode_uid), ''), CONCAT(':', pm.bbcode_uid), '')), '\n', '<br />'), 1, 65534) AS body
FROM {$from_prefix}privmsgs AS pm
LEFT JOIN {$from_prefix}users AS uf ON (uf.user_id = pm.author_id);
---*
and change this line :
SUBSTRING(REPLACE(IF(pm.bbcode_uid = '', pm.message_text, REPLACE(REPLACE(pm.message_text, CONCAT(':1:', pm.bbcode_uid), ''), CONCAT(':', pm.bbcode_uid), '')), '\n', '<br />'), 1, 65534) AS body
to this:
SUBSTRING(REPLACE(IF(pm.bbcode_uid = '', pm.message_text, REPLACE(REPLACE(pm.message_text, CONCAT(':1:', pm.bbcode_uid), ''), CONCAT(':', pm.bbcode_uid), '')), '\n', '<br />'), 1, 65534) AS body,
CASE pm.root_level WHEN 0 THEN pm.msg_id ELSE pm.root_level END AS id_pm_head

This should group all conversations together in SMF after conversion from phpBB.

Advertisement: