Customizing SMF > SMF Coding Discussion

check if a user is ignored

(1/4) > >>

ibtkm:
Is there any function to check if somebody is ignored by somebody else?

Arantor:
Programmatically or just because you're curious?

Version of SMF?

ibtkm:
Of course programmatically! because I need this function.

my version is 2.0.2

Arantor:
Hey, don't bite my head off. Not everyone wants code, some people just want to check if people are being ignored.

In what way do you want to check if someone is being ignored? Posts, PMs (the two are actually sort of independent)? If the current user is the one doing the ignoring, or if the current user is being ignored by someone else?

There isn't going to be a magic function for it, it'll be a case of examining the pm_ignore_list column of smf_members which contains a comma-separated list of user ids who are being ignored by the person in question. If it's the current user whose ignore list you're interested in, you'll be able to find it in $user_settings['pm_ignore_list'], otherwise you'll have to query the DB for it with FIND_IN_SET() to find the rows where it appears check against id_member being the member you're interested in their ignore list.

ibtkm:
No bro; It seemed harsh but I didn't mean really ;) I'm sorry anyway :)

well, There is a mod called "profile statuses" and on my forum I decided to customize it a little, for example make this happen that if B is ignored by A then he isn't able to post any comment on A statuses.
In the codes we have the owner ( A ) and also commenter ( B ) and now we want to check if B is ignored by A

and another question, what is the result of $user_settings['pm_ignore_list'] ? Is it an array of IDs?

Navigation

[0] Message Index

[#] Next page

Go to full version