We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16984
    • 13 Posts
    Evolution 1.0.4
    Mysql 5
    PhP 5

    Trying to get a 3rd party news publishing application "Network-13" to work under Modx Evo 1.0.4. The integration notes with the application state just to use a simple php include statement to include the main index.php from the application which I put in a snippet. The installation on N13 went Ok and the integration, I just created a snippet and called the snippet (uncached) in my modx web page.

    Well, it works I see the news items however the news application uses it’s own templates to configure how it displays it’s news articles and place holders such as {title}, {author} and {article} which are then substituted by the data when the page is rendered. All works well for some items such as {title} and {author} but others such as {article} remain un-rendered and display as {article}.

    If I call the include within a test.php file directly everything is rendered correctly so something in Modx is causing this issue.

    I though it might at first be the choice of place holder names and so tried renaming them but I get the same result.

    I’ve integrated other 3rd party apps before that also use includes but have never come across this problem.

    Anyone have any ideas? Sure would be appreciated.
    Thanks
    Les

    I
      • 26016
      • 561 Posts
      Gosh, it would be so great if everything could be pulled in by includes! Last time I tried that, no luck, even from the other script’s developer, who did quite a bit of looking. I’m not the greatest programmer, but bunches of things can prevent it from working, path issues, variable and function scope issues, the order in which snippets and other things execute, etc.

      And I’ll bet Revo would work differently from Evo.

      You might want to give some error messages you’re seeing if you want some ace programmers to chime in.
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 3749
        • 24,544 Posts
        If there is PHP code in any of the add-on’s files, it needs to be moved into snippets or MODx will strip it out.

        Also, MODx uses its own index.php as a dispatcher for all pages so, generally, all paths should be relative to the MODx root.
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 16984
          • 13 Posts
          Ok Samba, understand what you’re saying, maybe I was expecting just a bit too much.

          By the way, not getting any errors, working just fine apart from not replacing some of the "placeholder" tags in the template, if I’m using the right word for them. {article} for example which would normally be replaced by the main body of the news article.

          Thanks anyway
          Les