We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 488
    • 3 Posts
    Hi All,

    I have got one php script that needs to be integrated with MODX CMS frontend and the admin. I figured that this might be possible using plugins , snippets and chunks but don’t know exactly how?

    Please help.
      • 3749
      • 24,544 Posts
      See the site in my sig for some information about how modx works and what snippets, chunks, plugins, and modules do.

      If you still have questions, you’ll need to say more about what your code actually does before we can give you much help.


        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
        • 488
        • 3 Posts
        Its a add delete update kind of application which we want to integrate to modx admin. And view part to the front end.
        Ex. Adding one more tab adjascent to current results tab.
          • 7231
          • 4,205 Posts
          Its a add delete update kind of application which we want to integrate to modx admin.
          You will need to run your script as a Module for this.

          And view part to the front end.
          And a snippet for this part.
            [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

            Something is happening here, but you don't know what it is.
            Do you, Mr. Jones? - [bob dylan]
            • 488
            • 3 Posts
            Could you please help me on how to add a snippet ...and get a visible link on the front end for that snippet.
              • 3749
              • 24,544 Posts
              A snippet is just a piece of PHP code. You create it by going to Resources | Manage Resources | Snippet tab | new snippet. Give it a name and paste in the PHP code.

              <?php
              $output = "Hello";
              $output .= " I'm a snippet.";
              return $output;
              ?>


              Put "Hello I’m a snippet" on a page by inserting a snippet call [[YourSnippetName]] where you want the output to appear.

              That info is all at the site in my sig. You really should visit. wink
                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
                • 28522
                • 29 Posts
                This is semi-related, I’m using a custom skype-status PHP script that changes my site’s header when we’re online/offline and I have it saved in a snippet called ’skypestatus’. I have it included in my header chunk as [[skypestatus]] but when I try to load my index page I get :

                Parse Error
                PHP error debug
                Error: fopen() [function.fopen]: URL file-access is disabled in the server configuration
                Error type/ Nr.: Warning - 2
                File: /usr/www/users/lacunza/dev/manager/includes/document.parser.class.inc.php(769) : eval()’d code
                Line: 14

                Any ideas? Thanks in advance
                  • 7231
                  • 4,205 Posts
                  That looks like a server limitation that does not allow fopen access files on remote locations only local to the server.
                    [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                    Something is happening here, but you don&#39;t know what it is.
                    Do you, Mr. Jones? - [bob dylan]