Files
Emi 07ec659385 Importing project into Git
This project lived only on the server without version control. This is now the starting point for the repository.
2023-05-23 20:03:24 +02:00

32 lines
713 B
PHP

<?php
/*
Question2Answer Markdown editor plugin
License: http://www.gnu.org/licenses/gpl.html
*/
require_once QA_INCLUDE_DIR.'qa-app-posts.php';
class qa_markdown_events
{
private $directory;
private $urltoroot;
private $convopt = 'markdown_comment';
public function load_module($directory, $urltoroot)
{
$this->directory = $directory;
$this->urltoroot = $urltoroot;
}
public function process_event($event, $userid, $handle, $cookieid, $params)
{
// check we have the correct event and the option is set
if ($event != 'a_to_c')
return;
if (!qa_opt($this->convopt))
return;
qa_post_set_content($params['postid'], null, null, '', null, null, null, qa_get_logged_in_userid());
}
}