We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12983
    • 108 Posts
    I’ve completely rebuild a site using MODx. So now I have a nice template in the templates of MODx, and all the pages using that template.
    But, the (phpbb) forum is still "skinned" like the old site, because at the moment I simply call a new window pointing to /forum, with all the gfx of the old site.

    I need to let MODx display the forum using the template, so I’ve created a "forum" page using the template, and I think the content of this page should be something like:

    [!execute_script?filepath=`forum/index.php`!] 


    where execute_script is a snippet like this:

    <?php
    if(!isset($filepath)) return;
    if(!file_exists($filepath)){
    return ("<strong>Error:</strong>script file ".$filepath." not found");
    }
    include($filepath);
    ?>
    


    Of course, this is not the right solution, otherwise I won’t be here asking for help.
    So, I’m hearing any solution you can provide to accomplish the task.
    Thanks
      • 12983
      • 108 Posts
      No, it’s not the case: the behaviour following your suggestion is exactly the same I already obtained.
      For completeness, maybe I should now describe exactly what I do obtain with my solution.
      The forum is installed in root, into folder "forum". That is, I do have in root:

      [assets]
      [manager]
      [forum]
      index.php
      index-ajax.php
      .htaccess
      (...etc.)
      


      At first, calling localhost/forum.html (friendly urls are activated), I had this MODx error:

      « MODx Parse Error »MODx encountered the following error while attempting to parse the requested resource:
      « PHP Parse Error »
       
      PHP error debug
        Error: 	include(./extension.inc) [function.include]: failed to open stream: No such file or directory	 
        Error type/ Nr.: 	Warning - 2	 
        File: 	C:\path\to\project\root\forum\index.php	 
        Line: 	25	 
        Line 25 source: 	include($phpbb_root_path . 'extension.inc'); 	 
       
      Parser timing
        MySQL: 	0.0134 s	(9 Requests)
        PHP: 	0.1489 s	 
        Total: 	0.1623 s	 
      


      "extension.inc" is a file located into the phpbb forum dir, at the same level of the forum index.php.
      So I have changed the value of $phpbb_root_path in forum/index.php, from this one:

      $phpbb_root_path = './';
      


      ...to this one:

      $phpbb_root_path = 'forum/';
      


      This way, the paths "work", but the result (calling localhost/forum.html) is a blank page; if I look the source code it’s nothing, empty, nothing at all.
        • 12983
        • 108 Posts
        Just a little update for clarity: I have changed the template used by phpbb to look more integrated with the gfx of the new site. But this is a temporary solution for me, as I’d like to use a template managed by MODx, i.e. with the chunks calls, and so on. In fact, there is a large amount of "dynamic" things I’ve created in the MODx template, that it would be a pain to re-code (and mantain) them in a separate implementation for phpbb, in order to have them working in the forum page.

        I write this so no one will spend time replying that I can "skin" phpbb the way I want: I already know that, and I have already done so.