We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4195
    • 398 Posts
    PHx (Placeholders Xtended) will add the capability of output modifiers when using placeholders, template variables and settings tags. It also supports nested tags.

    * Latest Version: http://modxcms.com/PHx-1006.html
    * PHx Demo: http://projects.zerobarrier.nl/modx/
    * Documentation: http://wiki.modxcms.com/index.php/PHx (wiki)
    * Technical Doc: http://wiki.modxcms.com/index.php/PHx#Technical_Documentation (explaining how PHx works )

    To Do:

    - Bringing you more documentation.
    - Implementation of more common used filters/modifiers.

    Feature Requests:

    Use this forum to post any comments about this addition or any questions you have regarding its use.
      Armand Pondman
      MODx Coding Team
      :: Jot :: PHx
      • 26435
      • 1,193 Posts
      this is a quote from the download page:
      4) Create a new snippet in the manager called "PHx" and copy/paste the contents

      Is it supposed to read 4) Create a new plugin.... ?

      great software you have been putting out bS (Jot... and now PHx!). you have been a buSy coder lately.

      -sD-
        Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
        All of the above... in no specific order.


        I send pointless little messages
        • 4195
        • 398 Posts
        don’t ya hate those copy/paste bugs wink
          Armand Pondman
          MODx Coding Team
          :: Jot :: PHx
          • 6726
          • 7,075 Posts
          Waow, now this is really a great addition !

          The ifempty and date modifiers will make my life easier grin
          I love the easy syntax to use them too smiley
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l'outil id
            • 33337
            • 3,975 Posts
            Wow! Thats great smiley

            Thanks for the nice Plugin bS!

            best regards.

            zi
              Zaigham R - MODX Professional | Skype | Email | Twitter

              Digging the interwebs for #MODX gems and bringing it to you. modx.link
              • 31037
              • 358 Posts
              Could I use this for formating placeholders in Ditto? I want to remove
              from articles when using [+summary+] in my template for Ditto. I tried to do it by [+summary:strip+] but it doesn’t work.

              Maybe I’m totally misunderstanding what to use PHx for, I’m kind of a newbie smiley

              I first pasted the Plugin code starting/ending with <?php ?> when creating the PlugIn, that removed my text completely. After looking into the existing plugins I saw that <?php ?> probably shouldn’t be there, so I removed it. But now I instead only get an empty page saying "Array".

              Btw, install instructions included in file still says create a snippet smiley
                • 18397
                • 3,250 Posts
                No, you can’t use PHx with Ditto as it parses its placeholders before sending them to MODx. However, I do plan on incorperating PHx functionality into Ditto in the future.
                  • 31037
                  • 358 Posts
                  Okej, sounds perfect! PHx is great, and Ditto will be even better when it supports PHx.

                  I’ll find another way to get rid of line feeds in the Ditto summary, I’ll try to find anything in the Ditto thread... or maybe that can’t be made with Ditto, if so I wait until Ditto works with PHx .

                  Thanks for the reply smiley
                    • 4195
                    • 398 Posts
                    @Mark, you can include the chunkie.class.inc.php (available in Jot) in Ditto.
                    Chunkie is an API I created to simplify all the template logic and it uses the PHx parser.
                    I will release Chunkie with documentation somewhere these days.
                      Armand Pondman
                      MODx Coding Team
                      :: Jot :: PHx
                      • 4195
                      • 398 Posts
                      Quick bug fix for version 1.0.2

                      in phx.parser.class.inc.php, line 55:

                      replace:
                      $input = $modx->documentObject[$input];


                      with
                      $input = $modx->documentObject[str_replace("#","",$input)];
                        Armand Pondman
                        MODx Coding Team
                        :: Jot :: PHx

                      This discussion is closed to further replies. Keep calm and carry on.