We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23018
    • 353 Posts
    Version 0.0.1 of ppbHelpManager can now be downloaded at github: http://goo.gl/vMltLn

    It offers:

    * help tabs for resources based on the id of the used template
    * adds some changes to how tv descriptions are displayed
    * and adds the option to display detailed tv descriptions in a modal window.

    Usage:
    Download the plugin php file and copy it into a new plugin.
    Activate the plugin and fire it on OnDocFormPrerender.

    Plugin configuration happens at the moment on top of the plugin.

    Tomorrow I'll upload a new video. Until then have a look at the old prototypes: http://goo.gl/XL5NK2 and http://quick.as/vd10svrw

    NEW video uploaded: http://goo.gl/qBKfkU

    The old versions used links inside tv and template descriptions. The new plugin organizes help content in a configuration array instead. The final version will most likely use a cmp.

    Regards,

    pepebe [ed. note: pepebe last edited this post 12 years, 5 months ago.]
      Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
      • 23018
      • 353 Posts
      I just realized that I don't have a clue how I would handle multilingual TV labels and descriptions in MODX.

      If there is not already a good solution for this problem, I could add that to the plugin as well.

      Anyone with firsthand experience with this task?

      Regards,

      pepebe
        Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        I would presume that you would use the user cultureKey or manager_language setting, falling back to the System Setting if not defined for the user.

        What if you used lexicon files? The key would correspond to the resource ID, or the template ID, or the TV ID, or whatever you are using. It should be fairly easy to modify a lexicon editing CMP to deal with it.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 23018
          • 353 Posts
          Yeah, lexicon files and a custom manager page would be the way to do that.

          I was curious about the official way to handle translation in the backend. Both templates and tvs have fields for caption and description.

          Do they support language tags?

          Example: [[%tvs.colorpicker.caption]] or [[%tvs.colorpicker.description]]


          Have to test it this week if nobody can pull an answer out of the hat.

          I'll also have a look at the repo for lexicon/language extras. Its always surprising what you find there if you start digging.

          Regards,

          pepebe
            Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Doesn't appear to.
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 23018
              • 353 Posts
              Thats surprising.

              If this is the case, then I wonder if there is no demand for this feature or if all people confronted with this problem just used something like this...

              Caption: Color / Farbe
              Description: Pick a color / Wählen Sie eine Farbe


              to solve the problem.

              If I find people asking for multi-lingual TV captions/descriptions, I'll work a solution for this problem.

              Thanks for checking.

              Regards,

              pepebe
                Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Looks like tags just don't get processed for these; chunk tags don't work either. After all, they only get used for the tooltips in the Tree, and for the description in the TV editing labels. Probably just fed directly to the ExtJS.

                You could use lexicon tags anyway, even if they don't get processed normally, for your purpose; you'd have to process them in your code.

                Ugh. The TV description label is handled by Smarty. I can't say I'm thrilled at the thought of trying to figure out what that is doing. [ed. note: sottwell last edited this post 12 years, 5 months ago.]
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 23018
                  • 353 Posts
                  Nope, I think it is Ext.Template Syntax. It is actually well documented and has a lot of nifty features.

                  That said, I'm also not thrilled about it. Coding in extjs just feels awkward and unnatural to me. I've found my ways around it, but everything I do in extjs I could propably do in half the time in jquery.

                  No use complaining. It will stay with us for the rest of revo2.x sad

                  Using lexicon tags would be the right decision in the long run.

                  Thanks for your input. It so much easier to do something if you have somebody to talk to.

                  Regards,

                  pepebe
                    Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    Hm. I used to work with Smarty before I discovered MODX (Etomite), and that {$whatever} syntax was the Smarty equivalent of dynamic content. I just presumed those things in the Manager files was Smarty stuff.
                      Studying MODX in the desert - http://sottwell.com
                      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                      Join the Slack Community - http://modx.org
                      • 4172
                      • 5,888 Posts
                      Activating this plugin, I get

                      TypeError: tv.child(...) is null
                      	
                      
                      var descriptionHtml = tv.child('.modx-tv-label-description').dom.innerHTML;
                      
                      ?a=30&id=60 (Zeile 100)
                      TypeError: parent.MODx.helpWindow is undefined
                      	
                      
                      parent.MODx.helpWindow.getEl().unmask();


                      and the save,duplicate,view,close,help - buttons get not displayed
                        -------------------------------

                        you can buy me a beer, if you like MIGX

                        http://webcmsolutions.de/migx.html

                        Thanks!