We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6316
    • 92 Posts
    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.
      • 16292
      • 6 Posts
      an installation guide would be awesome.

      I am hoping to do something like:
      http://www.cookingforengineers.com/article.php?id=109&title=Comment+Engine+and+Forums+Upgraded

      where the forum topic is generated when an article is posted and displayed at the bottom of the page. looks like thats what you have been weorking on smiley thanks !