SimpleDesk

SimpleDesk! => SimpleDesk Support => Topic started by: mlsred on August 14, 2012, 03:32:53 PM

Title: Report to Moderator
Post by: mlsred on August 14, 2012, 03:32:53 PM
Hi,

Is it possible to have the "report to moderator" plug-in provide the link, within the helpdesk ticket, to the post that is beng reported?

At the moment it only gives the text e.g:

QuoteThe following post, "Re: Hello" by ***********, was reported by ******
---------------------------------------
I have no idea why ****** is not banned from the forum yet...  ???
---------------------------------------

The reason given was:
Claiming I should be banned? why?

Thanks
M
Title: Re: Report to Moderator
Post by: venguard223 on August 15, 2012, 02:05:32 PM
A quick and dirty hack would be to find this in Source/sd_plugins/report_to_helpdesk/report_to_helpdesk/SDPluginReportToHelpdeskMain.php

$replacements = array(
'{subject}' => $subject,
'{author}' => $poster_name,
'{reporter}' => $reporterName,
'{comment}' => $poster_comment,
);


and replace with:
$replacements = array(
'{subject}' => '[url=' . $scripturl . '?topic=' . $topic . '.msg' . $_POST['msg'] . '#msg' . $_POST['msg'] . ']' . $subject . '[/url]',
'{author}' => $poster_name,
'{reporter}' => $reporterName,
'{comment}' => $poster_comment,
);


This will make the subject (e.g. Re: Hello in your example) be a link.
Title: Re: Report to Moderator
Post by: mlsred on August 17, 2012, 07:24:34 AM
Thanks very much, worked perfectly  ;)
Title: Re: Report to Moderator
Post by: venguard223 on August 17, 2012, 02:09:50 PM
Awesome.

That said, I seem to recall there was actually a reason I didn't do this originally when writing the plugin but I cannot remember what it was.
Title: Re: Report to Moderator
Post by: Spoogs on August 17, 2012, 02:12:57 PM
It was because it had to be done via BBC where as you believe the average helpdesk would not have had BBC enabled. I think I even convinced you to add support for linking to topic and user but we just never got around to it.
Title: Re: Report to Moderator
Post by: venguard223 on August 17, 2012, 05:22:29 PM
Ah, that jogs the ol' memory. It wasn't so much a case of 'average helpdesk not having it enabled' but that I had the feeling enough wouldn't that it would make this tricky.

It wouldn't be hard to extend it more properly but more effort than I wanted to spend for one night's work