Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="ISO-8859-1"?>
- <product productid="reports_via_posts" active="1">
- <title>Reports via Posts</title>
- <description>Reports via Posts</description>
- <version>1.0</version>
- <url />
- <versioncheckurl />
- <dependencies>
- </dependencies>
- <codes>
- </codes>
- <templates>
- </templates>
- <stylevardfns>
- </stylevardfns>
- <stylevars>
- </stylevars>
- <plugins>
- <plugin active="1" executionorder="5">
- <title>reports via private message</title>
- <hookname>report_start</hookname>
- <phpcode><![CDATA[
- if ($_POST['do'] == 'sendemail') {
- if($report_type == 'article_comment' OR $report_type == 'post') {
- $titel_text = 'Post reported by ';
- $auto_report = 'Automated post via report system.';
- $url_text = 'reported post';
- $reason_text = 'reason: ';
- $content_text = 'post content:';
- $url = '';
- if($report_type == 'article_comment') {
- $url = vBCms_Route_Content::getURL(array('node' => $vbulletin->GPC['return_node'] . '-' . $content->getUrl()));
- } elseif($report_type == 'post') {
- $url = $vbulletin->options['bburl'] . '/' . fetch_seo_url('thread', $threadinfo, array('p' => $postid)) . "#post$postid";
- }
- if($url != '') {
- $vbulletin->input->clean_array_gpc('r', array(
- 'reason' => TYPE_STR,
- ));
- $pnTitel = $titel_text . $vbulletin->userinfo['username'];
- $pnText = '[list][*]' . $auto_report . '
- [*][url=' . $url .']' . $url_text . '[/url]
- [*]' . $reason_text . '[quote=' . $vbulletin->userinfo['username'] . ']' .$vbulletin->GPC['reason'] .'[/quote]
- [*]' . $content_text . '[quote]' . $postinfo['pagetext'] . '[/quote][/list]';
- $dataman =& datamanager_init('Post', $vbulletin, ERRTYPE_SILENT, 'threadpost');
- $dataman->set_info('thread', 6);
- $dataman->set_info('forum', 2);
- $dataman->set_info('is_automated', 1);
- $dataman->set_info('skip_floodcheck', 1);
- $dataman->set_info('skip_charcount', 1);
- $dataman->set_info('parseurl', 1);
- $dataman->set('threadid', $threadinfo['threadid']);
- $dataman->set('userid', 1);
- $dataman->set('allowsmilie', 1);
- $dataman->set('visible', 1);
- $dataman->set('title', $pnTitel);
- $dataman->set('pagetext', $pnText);
- if (count($dataman->errors) > 0) {
- // Errors occurred. Do not proceed with the save.
- print_r($dataman->errors);
- exit;
- } else {
- $dataman->save();
- unset($dataman);
- //eval(print_standard_redirect('redirect_postthanks_moderate', true, true));
- }
- }
- }
- }]]></phpcode>
- </plugin>
- </plugins>
- <phrases>
- </phrases>
- <options>
- </options>
- <helptopics>
- </helptopics>
- <cronentries>
- </cronentries>
- <faqentries>
- </faqentries>
- </product>
Advertisement
Add Comment
Please, Sign In to add comment