We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26027
    • 145 Posts
    Quote from: enigmatic_user at Oct 02, 2016, 08:41 PM

    What are your settings for the media source? I attached mine (see below). basePath and baseUrl point to my images folder, and basePathRelative and baseUrlRelative are set to "Yes". That way the path shown in the TV doesn't have a leading slash and starts with a file or folder placed in /assets/images. The preview in the TV works fine, and the image is displayed in the frontend.

    In older MODX versions, the system settings in the file system area were used - I guess they are still the way to go when you don't use media sources (which you should). There, although meanwhile not used by me anymore, filemanager_path and filemanager_url point to my images folder, and filemanager_path_relative and filemanager_url_relative are set to "Yes", the same applies to strip_image_paths.

    So I guess you'll have to play around with these settings a bit.

    Jan, I have an additional question which may be important. Our implementation of ModX uses a staging system and a production system requiring me to push changes and additions using PHPADMIN.

    Do the changes that I made to the Media Sources configuration and the TinyMCE Plug-In Properties automatically transfer to the Production system on a push or do I have to make these changes again to the ModX copy on the Production system? I only push the MySQL Tables that start with "modx_site".

    Thanks Jan ... Sam
      • 8898
      • 181 Posts
      Quote from: samg at Oct 03, 2016, 02:42 PM
      I found the Media Sources update sections but I couldn't use your settings, which were assets/images/. When I used those my image link became News Headlines Pics/bldg_phillipsburg_hs.jpg instead of assets/images/News Headlines Pics/bldg_phillipsburg_hs.jpg.

      "assets/images/" was just an example - the setting I use -, although I guess it's the folder where your imags are located, too, so for images this should be fine. From what you wrote above, I guess your old setting was "assets/" (or "/assets/"?), which is okay, too, if it's what you need. If you'd like to use one media source for images, PDFs, etc., just stick with "assets/" (without leading slash). It's also possible to use different media sources and link the most appropriate source to the particular TV.

      Make sure that basePath and baseUrl have the same value; basePathRelative and baseUrlRelative should both be set to "Yes". Also, check the system setting strip_image_paths, which should also be set to "Yes". To make sure, clear the cache.

      Reload the page you're editing (in the Manager) if it's still opened. Now reassign the image in the TV. Is the path still wrong in the frontend? I remember having some problems with paths, too, but that's years ago - probably before media sources were introduced...

      I tried this in a "naked" MODX Cloud where no external components can interact with MODX - TinymceWrapper is the only package I installed. Maybe something causes problems in your installation. But I also have been using similar settings in productive sites for years. BTW: You're using the current version of MODX, aren't you? wink

      Quote from: samg at Oct 03, 2016, 02:42 PM
      I tried different things but the one that worked was leaving the settings for path and path url both completely blank. That syntax added back in assets/images/ giving me assets/images/News Headlines Pics/bldg_phillipsburg_hs.jpg

      1. Does this make sense to you?

      Well, yes, somehow. The URL isn't completed on your system; it obviously uses the path without the folders given in the media source settings (I'm not sure if this can happen when basePathRelative or baseUrlRelative is set to "No" - I'm still short on time, so I can't test everything). Unfortunately I don't know why your installation reacts different regarding this...

      Quote from: samg at Oct 03, 2016, 02:42 PM
      2. The only thing that's off right now Jan is that when I invoke the ModX Browser I'm positioned at the root of the site and have to click "assets" then "images" to reposition myself. Can anything be done about that so that I'm already in the "assets" folder?

      Well, that's what the media source settings (and the media sources themselves for that matter) are for. wink If you set the paths to the root (by leaving them blank), that's the way they work.

      As I said above, if everything else fails, you can always change the paths in the HTML code. If you don't have too many TVs, that shouldn't cause much work.

      Quote from: samg at Oct 03, 2016, 02:42 PM
      3. One more thing Jan. Can I assume that these changes I made only apply to TV image variables and that everything else will be business as usual? For example, if I link to a PDF file will that continue to work as before, even if I link to it in a TV?

      What works for images, should also work for other files...

      Cheers,
      Jan
        This message has been ROT-13 encrypted twice for higher security.
        • 8898
        • 181 Posts
        Quote from: samg at Oct 03, 2016, 05:18 PM
        Jan, I have an additional question which may be important. Our implementation of ModX uses a staging system and a production system requiring me to push changes and additions using PHPADMIN.

        Do the changes that I made to the Media Sources configuration and the TinyMCE Plug-In Properties automatically transfer to the Production system on a push or do I have to make these changes again to the ModX copy on the Production system? I only push the MySQL Tables that start with "modx_site".

        The media sources have their own tables, their names start with "modx_media_sources" (if "modx_" is the table prefix).

        Cheers,
        Jan
          This message has been ROT-13 encrypted twice for higher security.
          • 26027
          • 145 Posts
          Quote from: enigmatic_user at Oct 04, 2016, 02:32 AM
          Quote from: samg at Oct 03, 2016, 05:18 PM
          Jan, I have an additional question which may be important. Our implementation of ModX uses a staging system and a production system requiring me to push changes and additions using PHPADMIN.

          Do the changes that I made to the Media Sources configuration and the TinyMCE Plug-In Properties automatically transfer to the Production system on a push or do I have to make these changes again to the ModX copy on the Production system? I only push the MySQL Tables that start with "modx_site".

          The media sources have their own tables, their names start with "modx_media_sources" (if "modx_" is the table prefix).

          Cheers,
          Jan

          That's useful information. Thanks, Jan.
            • 42562
            • 1,145 Posts
            ANNOUNCEMENT- tinymceBubbleBar.js V2
            https://github.com/donShakespeare/tinymceBubbleBar

            The beloved tinymceBubbleBar.js now comes in xTreme version (v2)
            -Float menubar /+ single/multiple toolbars.
            -Specify bar(s) for New Lines (bars for other tags - coming soon)
            -Insert Paragraph/other tags in difficult and tight areas (Ctrl Click)

            In Short
            toolbar1: "bold italic underline bubbleBarOptionsButton", 
            toolbar2: "image media codesample bubbleBarOptionsButton",
            toolbar3: "code media codesample",
            barsForNewLine: 'toolbar2,toolbar3', 


            Usage
             :
              tinymce.init({
                selector: "#myEditor",
                //inline: true, //or false
                //fixed_toolbar_container: "#myOwnBarWrapperDiv", // for inline mode only
                external_plugins: {
                  bubbleBar: "[[++assets_url]]components/tinymcewrapper/tinymceplugins/tinymceBubbleBar.js", // plugin location
                },
                menubar: true, //or false - menubar and toolbar1 float together with any other unassigned toolbar#. In iframe mode, menubar is fixed.
                toolbar1: "bold italic underline bubbleBarOptionsButton", //add optional button for sticky bar and other functionality
                toolbar2: "image media codesample bubbleBarOptionsButton",
                toolbar3: "code media codesample bubbleBarOptionsButton",
                toolbar4: "...",
                bubbleBarSettings: {
                  customCSSfile: "", // example.css use this to override pre-loaded CSS
                  customCSSinline: "", // .example{display:none} add styles to pre-loaded CSS
                  activateMultiBars: 1, //default is 1 (activate magical switching of bars)
                  barsForNewLine: 'toolbar2,toolbar3', // comma-separated list of toolbars - default is toolbar2 ... toolbar1 is reserved
                  //barsForIMG/Pre/etc: "", //coming soon
                  magicInsert: { //bonus feature (CTRL + CLICK) to insert P tag in difficult/tight areas - after tagTriggers
                    activate: 1,
                    tagTriggers: "", // default 'h1, h2, h3, pre, p, p img, ol, ul, table, div, hr'
                    newLineHTML: "" // default is <p></p>
                  }
                },
            });


            Enjoy!!

            Please test and report them issues.
              TinymceWrapper: Complete back/frontend content solution.
              Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
              5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
              • 42562
              • 1,145 Posts
              TIP OF THE HOUR
              How to target non-richtext TV textareas with Ace ... while leaving the richtext TVs for another RTE to deal with

              Some of you power users are already doing some powerful sweet stuff with TinymceWrapper, more awesome!!! This then might not be news to you...

              We saw how to target specific TVs:
              http://modxcookbook.com/add-ons/editors/tinymcewrapper-in-tvs.html
              http://forums.modx.com/thread/97694/support-comments-for-tinymcewrapper?page=10#dis-post-532291

              RE: mindeffects (about another Ace Extra)
              ... but I want *RichText* TVs to use Tiny (or CK) and *Textarea* TVs to use ACE. And I think, that is just not possible.

              In your TinymceWrapperAce chunk, just change ya selector...
              {
                "name": "richtext",
                "selector": "textarea[id^=tv][name^=tv]:not(.modx-richtext)", //used to be  "selector": ".modx-richtext",
                "mode": "html",
                "wrap": "free",
                "maxHeightLines": 8,
              },


              Too bad MODX has no proper classname for textareas that are not richtext, but we don't care do we? Hence our very precise selector pattern.

              And if you run into issues because of ExtJS' one billion elements on board, add this parent #modx-tv-tabs
              #modx-tv-tabs textarea[id^=tv][name^=tv]:not(.modx-richtext)
              DONE!!! [ed. note: donshakespeare last edited this post 7 years, 6 months ago.]
                TinymceWrapper: Complete back/frontend content solution.
                Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
                5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
                • 48795
                • 7 Posts
                Hi donshakespeare,

                I use Rich Text in introtext more than description. (I use introtext as optional text for the resource and description usually for SEO)

                I think you get my meaning. I'd still like to be able to include the checkboxes on an individual basis but have any of them unchecked by default.

                Really, its a matter of too many toolbars. Just hiding the toolbar would work for me too.

                -John

                Quote from: donshakespeare at Aug 08, 2016, 06:12 PM
                RE: Johnny1000 at first I tried my best not to understand you, then I realized that your feature was a fantastic one, one that I had considered a long time ago but something erased it from my medulla.

                First, do you ever use Rich Text in Introtext and Description?
                To check my understanding: you want an enable/disable checkbox visible always?
                And in your setup for example, the functional checkboxes for the above fields would be unchecked at page load? And checking them would voila the Editor?
                  • 8898
                  • 181 Posts
                  Quote from: [email protected] at Oct 19, 2016, 01:53 PM
                  Really, its a matter of too many toolbars. Just hiding the toolbar would work for me too.

                  Well, if you don't need all the toolbars / buttons for the description field and maybe the introtext field that you need for the main content, you could define the toolbars separately for the different fields instead of defining them globally in (your custom version of) TinymceWrapperCommonCode. Would reducing the toolbars / buttons be a workaround for the time being?

                  Nevertheless your feature request is a good idea!

                  Cheers,
                  Jan
                    This message has been ROT-13 encrypted twice for higher security.
                    • 42562
                    • 1,145 Posts
                    RE: Johnny1000
                    In your Chunks: TinymceWrapperIntrotext-yourSuffix, TinymceWrapperDescription-yourSuffix

                    Here are, for the time being, a plethora of options
                    tinymce.init({
                      ...
                      plugins: "..., bubbleBar", // OR add bubbleBar to show toolbar on demand (like medium.com)
                      toolbar: "bold italic link unlink", // OR reduce the number of buttons
                      contextmenu: "bold italic link unlink", // OR move more or all toolbar buttons to right-click and set toolbar: false,
                      //or remove contextmenu from plugins: "" and set toolbar: false,
                      //and your editor will be clean
                      ...
                    });
                      TinymceWrapper: Complete back/frontend content solution.
                      Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
                      5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
                      • 26027
                      • 145 Posts
                      Donshakespeare, I'm so desperate to learn just two tricks of your trade which are probably obvious to the entire ModX world, except me.

                      I have two ModX sites in my care which were setup recently by a ModX developer. The one site is set up to use the "charcoal" skin which improves the appearance of the toolbar and the link list very dramatically. I knew just enough to try to modify the TinyMCEWrapper plugin. I changed 'fileManagerTopNavModalSkin' from 'modxPericles' to 'charcoal' and that did nothing for me. Clearly there must be a different place where this is specified. (BTW I do have the charcoal skin in the appropriate 'components' subdirectory.) Please sir, can you give me the key to your kingdom and show me how to configure the charcoal skin? (BTW, where are your other skins stored should I want to try a different one in the future?)

                      Also while I have your attention where is linklist enabled and configured? For now I would like to change the specification of the font size and interline spacing of the lengthy list.

                      I'll be your BFF if you can help me out here Don-S.

                      Thanks .... Sam Gerber (samg)

                      By the way, I'm using Revolution 2.51 and a current TinyMCE.