News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Arantor please help with how to do this

Started by tareko, March 30, 2019, 02:12:37 PM

Previous topic - Next topic

tareko

I want to remove this text that appears in a moderated post for one user only along with the red background color.

Note: This message is awaiting approval by a moderator.


Basically I do not want that member to know that his posts are being moderated.

Is it something like if user_info['id'] = 4? At what template? Please help me with this because it is very important to me.

And I do know that it is kind of pointless, but the user in question is not tech savvy and will not catch on. He is getting very irritating but I do not want to ban him outright as he is a long member of my forum.

vbgamer45

In themes display.template.php


if (!$message['approved'] && $message['member']['id'] != 0 && $message['member']['id'] == $context['user']['id'])
echo '
<div class="approve_post">
', $txt['post_awaiting_approval'], '
</div>';
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

tareko

Thanks mate. I do not see any condition for user_id 4 in that code. Checking the display.template.php file I see that that is the original code. How can I add the condition in there?

vbgamer45

CHANGE TO

if (!$message['approved'] && $message['member']['id'] != 0 && $message['member']['id'] == $context['user']['id']  && $message['member']['id'] != 4))
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

tareko


vbgamer45

change to

if (!$message['approved'] && $message['member']['id'] != 0 && $message['member']['id'] == $context['user']['id']  && $message['member']['id'] != 4)
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

tareko

It is not working for me. I have an user at my forum who knows little php and he created a script that adds a new column in the members table called is_ignored. How can I add that to the conditional? I tried this but it did not work

if (!$message['approved'] && $message['member']['id'] != 0 && $message['member']['id'] == $context['user']['id']  && $message['member']['id'] != $context['user']['is_ignored'])

Aleksi "Lex" Kilpinen

Just a quick note, pretty much never is it really a good idea to call out any specific member with a general support issue. It will work against you.
This includes but is not limited to mentioning a username in a title like in this case, and/or sending a pm/email/IM/smoke signals.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Doug Heffernan

Give this a try.


if (!$message['approved'] && $message['member']['id'] != 0 && $message['member']['id'] == $context['user']['id'] && !$message['member']['is_ignored'])


It is untested, but it should work.

tareko

Quote from: Aleksi "Lex" Kilpinen on March 31, 2019, 07:22:52 AM
Just a quick note, pretty much never is it really a good idea to call out any specific member with a general support issue. It will work against you.
This includes but is not limited to mentioning a username in a title like in this case, and/or sending a pm/email/IM/smoke signals.

Why was it a bad idea? I meant it well. But from now on I will not call out any specific member.

Doug_ips thans mate. I will try it and let you know if it will work.

Aleksi "Lex" Kilpinen

Because everyone here volunteers their time, including the team, and it can seem demanding, even if not meant that way.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

tareko

Quote from: Aleksi " Lex " Kilpinen on April 01, 2019, 09:43:30 AM
Because all the peoples here volunteers their time, including the team, and it can seem demanding, even if not meant that way.

I see. Well, I will not be doing it anymore in that case.

Doug_ips your code worked only partly. It removed the text that appears in a moderated post but it did not remove the pinkish background color. Please someone help.

Aleksi "Lex" Kilpinen

Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: