Jump to content

Include content in warning message


CoffeeCake
 Share

Go to solution Solved by bfarber,

Recommended Posts

Is there a built in variable/placeholder that can be used to insert the body of content issued a warning by a moderator? This was a feature in vBulletin and we'd like to bring it back for IPS.

I see that default messages can be included to the member, yet am looking for something like {content_body} or similar. I.e. you posted: {content_body}, even if this change is made at the template level and is universally used for all issued warnings.

Link to comment
Share on other sites

I'm not clear what you are trying to edit to include the body. Is this a notification (which one?), are you wanting to show it in the report or in the post, or something else?

The answer is almost certainly "yes there's a variable that has that" but I need more information on where/context to tell you which one to use.

Link to comment
Share on other sites

As an example, suppose a member creates a post laced with profanity. A moderator wants to issue a warning via the warning system to the member reminding them of the rules. We'd like to include the post the member made in the "message to member" that they view and acknowledge, as often these posts are deleted and no longer visible to the member. For example:

Quote

 

Hi bfarber,

Please remember that it's not nice to use foul language.

Signed,

Moderator X

Your naughty post appears below for reference:

7 minutes ago, bfarber said:

Your mama is a bleepity bleep bleep.


 

We'd like to insert the problematic content within the body of the moderator message (or within the template) simply to add the context of "this was the bit you posted that was a problem."

Link to comment
Share on other sites

  • Solution

If the post on the site is not actually deleted but hidden, then you can use a variable within the template to show the content. Something like $warning->content()->mapped('body')

If the post is in fact deleted, then you would need to retrieve the value at the time the warning is issued and store the body with the note for the member. That would require a plugin.

Link to comment
Share on other sites

14 hours ago, bfarber said:

If the post on the site is not actually deleted but hidden, then you can use a variable within the template to show the content. Something like $warning->content()->mapped('body')

If the post is in fact deleted, then you would need to retrieve the value at the time the warning is issued and store the body with the note for the member. That would require a plugin.

Hey, I've actually also been looking into that. It's kinda weird a member doesn't get to see the post they were warned about (if it's been hidden). I tried what you suggested, or at least I think I did, I just pasted "$warning->content()->mapped('body')" into the "Default note for member" part in the relevant warning. I was not surprised when I was it just added that exact text ($warning->content()->mapped('body')) into the note that the member received 😂 

Can you please give more specific instructions on what do to for stupid idiots who know exactly 0 things about programing like yours truly? Thanks in advance 🙂  

Link to comment
Share on other sites

In the vast majority of cases, we'd be issuing a warning for a post hidden just before due to whatever the warning is about.

I think the instructions @bfarber shared are to put them in a template hook (or modify the templates) that display the warning to the user, rather than include it in the "message to member" box. Alternatively, the template that generate the box for the moderator to enter the warning could be prepopulated via a template hook to be preloaded with quoted content.

I have not had a chance to test this yet. Once we figure it out, I'll share here. 🙂

Link to comment
Share on other sites

3 minutes ago, bfarber said:

I didn't provide exact instructions but rather general guidance.

Well, I bet that's why it didn't work 😅

Let's say the post is not deleted (it can't be, our mods can only hide posts), how would one go about having the post appear in the warning? And please, talk to me like I'm a 2 year old monkey, and a pretty dumb one at that 🙂 

 

Edited by Pavel Chernitsky
Link to comment
Share on other sites

  • 1 month later...
On 8/26/2020 at 10:51 AM, Pavel Chernitsky said:

Well, I bet that's why it didn't work 😅

Let's say the post is not deleted (it can't be, our mods can only hide posts), how would one go about having the post appear in the warning? And please, talk to me like I'm a 2 year old monkey, and a pretty dumb one at that 🙂 

 

Did you ever get this figured out?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...