doze
It was ’id’, not ’docid’. Also, I had to split the line into two:
$getdoc = $modx->getDocument($modx->event->params[’id’]);
$pagetitle = $getdoc[’pagetitle’];
Only after that it worked.
Now it’s done.
Instead of including files and messing with integrating phpBB with MODx, I did the other way: the plugin in MODx calls a script, like this:
$topicid = get_file_contents("
http://www.mysite.com/forum/phpbbcomments.php?topictitle=...&forumid=...&pagealias=...");
phpbbcomments.php gets variables via _GET, posts a topic with $topictitle as topic title and with the link to the original article in MODx, and returns topic’s ID. Topic ID gets written to a TV variable of a document. When the document in MODX is loaded, phX displays a link to the comments topic.
The only bug though - now anyone may run phpbbcomments.php with &topictitle and &forumid and it will post an article.
If anyone understood what I said and is still interested in my small plugin of cross-posting to phpBB, you may reply in this topic and I’ll post an installation guide.