News:

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

Main Menu

How-to Add Database column

Started by SoftAid, December 17, 2017, 08:06:49 AM

Previous topic - Next topic

SoftAid

Hi there,

SMF 2.0.13
In phpmyadmin:

The database "Personal_Messages" contains a From_Name column, not a To_Name column.
Sending a PM is always From a member To a member.
Is there a way to add such a To_Name column?

Thanks in advance.

SoftAid

[email protected]

SMF forum 2.0.17
Dutch free computer help forum
Always welcome on Oplossing.be :-)

Arantor

Why would you need to add a to_name? You need a from name so that if people delete their account, it doesn't delete the messages that were sent to people. But you don't need that for to people because you can always look up the names from the database.

And as for who gets a message, that's what the recipients table is for.

SoftAid

Hello Arantor,

Thank you for answering.
Quote from: Arantor on December 17, 2017, 08:53:24 AM
Why would you need to add a to_name?
My question was: "Is there a way to add such a To_Name column?". But to answer your question:
Some menbers abuse the PM to send false information to other members. Most of that false information consists on pointing to other websites.
As rsponsable and moderator, I would like to be able to see immediatly to who such member those messages are send.
Quote from: Arantor on December 17, 2017, 08:53:24 AM
And as for who gets a message, that's what the recipients table is for.
The PM-Recepients table does not give this information. It gives me an ID_memder, but even if this is the PM-receiver, the table is to short, and looking up names that fit with the ID (in an other table is a long work-arround.

So, Is there a way to add a To_Name column?

Thank you.

SoftAid
SMF forum 2.0.17
Dutch free computer help forum
Always welcome on Oplossing.be :-)

Arantor

How do you think SMF works out who gets a message? The id_menber column of the recipient's table is the same as the id_member in smf_members. You don't need a to_name column, because SMF already has that information!

The only issue is that you don't know how to get it out of SMF by doing a join from the recipient's table to the members table. And discussing that (or having a mod to spy on PMs) is generally not allowed because we don't like to encourage people doing exactly what you're trying to do. There is a reporting function hat people should use instead.

SoftAid

Hello Arantor, or shall I call you Arrogantor :(

It please me to have a reaction like yours instead of an helping hand. Accusing me of spying is so easy, helping one out takes much more from your brains than they can handle, I suppose. I feel so sorry for you. Maybe my expectations on you were to high.

And No, I don't SPY on people, I moderate and try to maintain the site clean.
You could have answered that what I asked was not possible, or that it was not allowed to do what I asked for.
You preferred to accuse me of spying. What a nice guy (or girl) are you.
Don't bather anymore. You make me sick, and I would not like to be infected by your disease.

To bad my English is not that good, otherwise I would love to go in discussion with your twisted mind.

Please don't you ever react anymore when I post a question. Thank you for that.

Softaid
SMF forum 2.0.17
Dutch free computer help forum
Always welcome on Oplossing.be :-)

Arantor

Im sorry, I didn't mean to rile you up, I was just frustrated that what you ask for, you don't need because the information is already present, and that by rules I didn't put in place, I can't really discuss it (as the rules are generally that people who want to do this do so for spying, which you kind of admitted to - most times, the report to moderator function is enough)

Steve

Arantor is being polite in his reply. I won't be.

Quote from: SoftAid on December 18, 2017, 05:43:54 AM
Hello Arantor, or shall I call you Arrogantor :(

It please me to have a reaction like yours instead of an helping hand. Accusing me of spying is so easy, helping one out takes much more from your brains than they can handle, I suppose. I feel so sorry for you. Maybe my expectations on you were to high.

And No, I don't SPY on people, I moderate and try to maintain the site clean.
You could have answered that what I asked was not possible, or that it was not allowed to do what I asked for.
You preferred to accuse me of spying. What a nice guy (or girl) are you.
Don't bather anymore. You make me sick, and I would not like to be infected by your disease.

To bad my English is not that good, otherwise I would love to go in discussion with your twisted mind.

Please don't you ever react anymore when I post a question. Thank you for that.

Softaid


He wasn't accusing you of spying. He was stating it as fact. PM means PRIVATE message. The reading of anyone's PRIVATE message is spying, no matter how you sugarcoat it. Reading private messages doesn't fall under the job description of moderator.

There will be no further outbursts disrespecting other members like this.
DO NOT pm me for support!

SoftAid

Hi Steve,

Arantor was defenitly accusing me of spying, and you do the same. And I am well aware what Private means, No need to write it in Bold.
Quote from: Steve on December 18, 2017, 06:43:59 AM
Reading private messages doesn't fall under the job description of moderator.
To protect my members from hackers, or from malicious (Personal) messages, I will check when necessary. My members trust me.
I understand that this is not a general for all websites. But in our case it is. 
Quote from: Steve on December 18, 2017, 06:43:59 AM
There will be no further outbursts disrespecting other members like this.
I didn't start "disrespecting".
Like I wrote before, Arantor could have informed me in a professional way, instead of calling me a spy.
OK, I will hold my horses, if you hold yours (and Arantor will hold his)
I suppose I will not get an answer on my technical question anymore.

Thank you anyway.

SoftAid

SMF forum 2.0.17
Dutch free computer help forum
Always welcome on Oplossing.be :-)

Arantor

You already had a technical answer from one of the people who has literally been a developer of the platform.

SMF records all the recipients of a message in the recipients table. You can do a join to the members table to find out who a message was sent to.

You can't do it at the message table level because one message can be sent to more than one person.

SoftAid

Hello Arantor,

Steve is right, my outburst to you was unacceptable. You calling my work spying made me pissed. I should have hold myself in hand and react professional to.
But I have that temper, hard to  suppress. I hope you can accept my apologies.

Quote from: Arantor on December 18, 2017, 08:22:38 AM
You already had a technical answer from one of the people who has literally been a developer of the platform.
I only talked to you.
Quote from: Arantor on December 18, 2017, 08:22:38 AM
SMF records all the recipients of a message in the recipients table. You can do a join to the members table to find out who a message was sent to.
I do not know what you mean by "doing a join". My (technical) English is limited, and I think you use a kind of "slang" here.
For me, a "join" would mean "putting records together".
As I wrote before "The PM-Recepients table does not give this information. It gives me the ID_memder, but this is the PM-sender.
The PM_messages does not have a receiver-ID.
Quote from: Arantor on December 18, 2017, 08:22:38 AM
You can't do it at the message table level because one message can be sent to more than one person.
I have to admit I did not thought on this.  You are right, the PM_Messages table cannot hold infinity number of receivers.

Can you explain in details how you would work around my problem to get the receiver(s) ID or Name? It means much for me to keep the forum clean.
If I would like to spy, than I would just go in the PM_Messages, edit it and read wat one wrote to another. I do not need this. That is private and I do not look for this.

Sometimes I see new members, and find them sending PM's to other members, and some of those recipients complain to me about advertising in those PM's.
Some PM-recipients are not aware they get links to malware distributing sites.  I would like to be able to send a warning to those recipients. That's were it's al about for me.

SoftAid

SMF forum 2.0.17
Dutch free computer help forum
Always welcome on Oplossing.be :-)

Arantor

Yes, I know you only talked to me. I have literally been part of the development team of this platform.

I cannot, as mentioned, explain it to you in detail. Because other people have in the past used information about the PM system to spy on members inappropriately, it is generally frowned upon to discuss it. It also doesn't help that I'm currently at work and can't exactly look up the database structure.

However, what I can say is that there is the pm recipients table, which has one row per PM recipient, and lists the id of a message and the id of one recipient of that message. The first id ties back to the pm message table, the second back to the members table.

So if you're looking up message 1 in the pm messages table, you can do

SELECT men.real_name FROM smf_members AS mem INNER JOIN smf_pm_recipients AS pmr ON (pmr.id_member = mem.id_member) WHERE pmr.id_pm = 1

Then just change the 1 to whichever PM you're looking at. At least, I think those are the column names, it's been a while.

SoftAid

Hello Arantor,

Thanks for your help. If you are at work, I do not want to disturb you. There is no hurry with my problem.

I also understand your concern on this item. Please feel free to remove this topic entirely if it's better for everyone's security.

I executed the SQL query in smf_personal_messages, but it returns an error: " #1054 - Unknown column 'men.real_name' in field list"
The "real_name" column exists in the smf_members.
Take your time, there's no hurry.

Thank you in advance.

SoftAid
SMF forum 2.0.17
Dutch free computer help forum
Always welcome on Oplossing.be :-)

Arantor

Damn auto correct. It should be mem not men, short for members.

SoftAid

Hello Arantor,

The query worked now, and returned the expected value (name).
It is a work-around, but it works. I am very thankful for the help 8).
I am even more thankful that I may use your software for many years now.

We (our forum) helps people with all computer-related problems, for free, without advertising, and in-depth help for almost 20 years.
All helpers are volunteers.

Thanks again.

SoftAid


SMF forum 2.0.17
Dutch free computer help forum
Always welcome on Oplossing.be :-)

SaltedWeb

Softaid, just an FYI other forums say like Xenforo and others have similar conversations on this form of activity.
And most users of said forums think PM means private.
Allot of people myself included use PM for making deals, sales, or meetups. I realize the rules on a site are that of the owner.
But if some one is going to ever consider having access to PM info they should clearly state it on their agreement.txt
I have runs sites for along time, and sure there are hackers, those that may do bad things but privacy does mena allot to many peole
self included. People in the United States despise for the most part the Patriot Act, for the same reason seeing others PM is not something people like.
We like our privacy even if we never use it for private stuff its just something most people don't like.  Not saying your doing that but being the topic
was something I have allot of personal discussions against accessing members private info. Good luck on your endeavors.
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

SoftAid

Hallo SaltedWeb,

I'm from Belgium, but that doesn't mean I'am not familiar with the mentality of the American people. I have relatives living in Denver, Colorado, in Los Angeles, en Florida. We used to travel much to the states, traveling with a van from the East to the West when I was young(er). Now, I'm going to become 70, the flight is to long, the ride is to heavy.

But I do understand your concern. It's my concern to.

I learned a lot today, about myself (going in defense-mode to easily), I learned that there are many ways to solve a problem, I learned that no-one is perfect, not even me :).

I also will keep you advice in mind, and change the rules of my site, pointing that for the safety of the members, PM's MAY been checked if necessary. So no-one can blame me.

Altogether it was a good day. Thanks to all of you.

From Belgium, with lots of respect,

SoftAid 
SMF forum 2.0.17
Dutch free computer help forum
Always welcome on Oplossing.be :-)

Advertisement: