On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • In Newspublisher 3, has anything changed with the `&hoverhelp`-option? I don't get any TV descriptions, `[[+npx.help]]` is always empty since I updated to version 3.
    • I'm not aware of any changes to that, but I'll try to find time to take a look.

      Do you have this in your NewsPublisher tag?

      &hoverhelp=`1`
      
        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
      • Quote from: BobRay at Nov 22, 2017, 08:41 PM
        I'm not aware of any changes to that, but I'll try to find time to take a look.

        Do you have this in your NewsPublisher tag?

        &hoverhelp=`1`
        

        Yes, as before when I used Version 2.

        Apart from that, everything seems to work as before (or better). The name of the placeholder has not changed, has it?
        • The placeholder should be +npx.help. It gets replaced with this language tag (in the NewsPublisher class file around line 1156):

          [[%resource_' . $field . '_help:notags]]


          It could be a problem with the :notags filter itself, or a more general problem with a filter used on a language tag.

          Is there anything relevant in the MODX Error log?
            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
          • Quote from: BobRay at Nov 27, 2017, 07:39 AM

            It could be a problem with the :notags filter itself, or a more general problem with a filter used on a language tag.

            Is there anything relevant in the MODX Error log?

            No, I created a minimal example with minimal template and I still got no help tags (descriptions) for TVs. They only work for regular MODX-fields like [[*pagetitle]] and the like. The page created no errors.

            I checked ":notags". It works in principle.
            • This line should be around line 1453 of the newspublisher.class.php file (under core/components/newspublisher/model/newspublisher/).

              $replace['[[+npx.help]]'] = $this->modx->getOption('hoverhelp', $description, '', true);


              I believe it should be:

              $replace['[[+npx.help]]'] = $this->modx->getOption('hoverhelp')? $description : '';


              It should use the description of the TV as the hover 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
              • Quote from: BobRay at Nov 27, 2017, 10:41 PM
                This line should be around line 1453 of the newspublisher.class.php file (under core/components/newspublisher/model/newspublisher/).

                $replace['[[+npx.help]]'] = $this->modx->getOption('hoverhelp', $description, '', true);


                I believe it should be:

                $replace['[[+npx.help]]'] = $this->modx->getOption('hoverhelp')? $description : '';

                This was the right place to look, but the suggested solution did not work. But I think this could be correct:

                $replace['[[+npx.help]]'] = $this->modx->getOption('hoverhelp', $this->props, false)? $description : '';


                (It works for me)

                Thanks for the help!
                • Good catch. I think this would be slightly better:

                  $replace['[[+npx.help]]'] = $this->modx->getOption('hoverhelp', $this->props, false, true)? $description : '';
                  
                    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
                  • Great! And thanks for your help!

                    Will this be included in the next release of NewsPublisher?
                    • Absolutely, though it may be a while.

                      Thanks for discovering the problem and testing the solution.

                        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