Hello, I am currently working on a website that will be integrating with a Simple Machines Forum. I want to make a messaging system, but why not just use the smf pm system? It will be easier and it will be better so users don't get confused with forums pms and site pms. Here is what I would like to do:
Message Title:Message Content
From: Username, Date & Time[Delete] [Reply]
Can this be done in a way like this? I have looked in my database and see that there are two tables for private messages:
smf_personal_messages:
ID_PM ID_MEMBER labels bcc is_read deleted
And smf_pm_recipients:
ID_PM ID_MEMBER_FROM deletedBySender fromName msgtime subject body
The first one contains who wrote it, the time, and the message, the second one contains who the message was sent to.
I would need to get the users id that is logged in, which would be simple enough with SSI. But I would also need to then check if that member id has any messages from the recipients table. If there is a message with their id then go into the first table and gather the info from the message with that id.
I could do something like this for when I list them...
echo('<table width="241" height="80" border="0" cellpadding="0" cellspacing="0">');
echo('<tr><td><p><b>Title:<br></b>$message<br><b>From: </b><i>'.$userfrom.',</i><b> On:</b><i> '.$time.'</i></p></td></tr>');
echo('</table>');
It is kind of confusing and if anyone would be willing to help it would be great.
Thanks