ElkArte Community

Project Support => Support => Topic started by: Jorin on March 24, 2015, 03:07:21 am

Title: warning templates - where to find?
Post by: Jorin on March 24, 2015, 03:07:21 am
I must warn a member yesterday. Therefor I made a new template for the message which was send to this member. Today I can't find the place in the admin center where I can edit and make new templates. Can aynone help please?
Title: Re: warning templates - where to find?
Post by: emanuele on March 24, 2015, 04:03:37 am
?action=moderate;area=warnings;sa=templates

moderation panel > logs > warnings > custom templates
So not in the admin panel, but in the moderation one.
Since I guess you are admin, the moderation panel is accessible from the dropdown of the admin menu, then last entry. ;D
Title: Re: warning templates - where to find?
Post by: Jorin on March 24, 2015, 04:17:41 am
Quote from: emanuele – Since I guess you are admin, the moderation panel is accessible from the dropdown of the admin menu, then last entry. ;D

Ah, now I found it. This is kind of hidden. Can you think about changing this? I had to click 4-5 times to reach this section.
Title: Re: warning templates - where to find?
Post by: emanuele on March 24, 2015, 05:18:56 am
Where would you put it?

4-5 clicks? Do you have the menus open on click?
Title: Re: warning templates - where to find?
Post by: Jorin on March 24, 2015, 05:22:37 am
Nope. Okay, two clicks: First on "admin" button, which changes to "moderate". Then move mouse to "protocols", "warnings", "templates".

I didn't think about looking for templates in the protocol section. I searched in the admin panel for them ("safety" or "members")...  O:-)
Title: Re: warning templates - where to find?
Post by: NetFlag on March 24, 2015, 06:17:29 am
As far as I can see its on the right position. Warnings are moderation activities. For me it is consequential.
Title: Re: warning templates - where to find?
Post by: Jorin on March 24, 2015, 06:22:35 am
Quote from: NetFlag – Warnings are moderation activities.

Yes, you can use the template in your moderation activities. I agree with you there. But you can create templates there too, and only there. That's not what every moderator should be capable of (in my opinion).
Title: Re: warning templates - where to find?
Post by: NetFlag on March 24, 2015, 06:31:53 am
Quote from: Jorin – That's not what every moderator should be capable of (in my opinion).

Hmm. Staff member schould be qualified persons. If not, you have to train so. ;)
Title: Re: warning templates - where to find?
Post by: emanuele on March 24, 2015, 06:40:15 am
Quote from: Jorin – But you can create templates there too, and only there.
Actually, even though this is technically true, the menu is not the only way to reach it: when you are issuing a warning, next to the dropdown to select a template, there is a "new template" button that takes you automatically to the correct page. And this looks like the easiest way to reach that page.
Title: Re: warning templates - where to find?
Post by: Jorin on March 24, 2015, 06:40:55 am
Good point, NetFlag!  :D

I can live with it as it is. Now I know where to search.
Title: Re: warning templates - where to find?
Post by: Jorin on March 25, 2015, 02:22:17 am
Ca you tell me please where the templates are saved in the database? I want to hide the standard templates and hopefully can do this in the database.
Title: Re: warning templates - where to find?
Post by: emanuele on March 27, 2015, 01:48:56 pm
Sorry, I marked that as unread, but I lost it.
At the moment I can't have access to a database, so I can't say for sure, but I feel that three may be in the language files... or not. xD
Title: Re: warning templates - where to find?
Post by: Jorin on March 28, 2015, 02:14:45 am
Hm. I want to erase the possibility to choose them from the list. This has to be made in the database or is it not?
Title: Re: warning templates - where to find?
Post by: emanuele on March 28, 2015, 03:05:00 am
Good question.
I'll not be able to check until at least this afternoon.
Title: Re: warning templates - where to find?
Post by: emanuele on April 09, 2015, 05:03:52 am
I'm so sorry I left this open for so long!! :-[

As I said they are text strings (that is not a very good design TBH... something to track), and are loaded in ProfileAccount.controller..php at about line 369 there is this block of code:
Code: [Select]
		// Setup the "default" templates.
foreach (array('spamming', 'offence', 'insulting') as $type)
{
$context['notification_templates'][] = array(
'title' => $txt['profile_warning_notify_title_' . $type],
'body' => sprintf($txt['profile_warning_notify_template_outline' . (!empty($warning_for_message) ? '_post' : '')], $txt['profile_warning_notify_for_' . $type]),
);
}
just remove it and the default templates will disappear.
In the future there is to handle that part a little better, thanks for bringing it to the attention! :D

ETA: tracked https://github.com/elkarte/Elkarte/issues/2029