We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4018
    • 1,131 Posts
    Quote from: Dr. at Dec 19, 2006, 11:50 PM

    I need to have file/media/image upload from the front end editor.

    Honestly...this is not recommended right now. The primary reason is that in doing so you would enable front-end users to see and possibly modify and/or delete any and all images, files, and directories in the resource browser for the site. Imagine that you’ve created a page in the manager where you’ve uploaded an image to the assets/images directory and inserted it into the content. Later on, after you’ve published the image, you go back to look at the page...and the image is gone! If you had the resource browser enabled for front-end use then that would likely be the cause. Access and permissions to the directories in the resource browser are global and thus front-end users would be able to do everything a manager user would do if they had access to it. One of the recent problems with the resource browser dealt with a security issue that allowed for injection of code. The solution? Tighten up how paths are dealt with and only allow manager users access to the resource browser...which means that the resource browser is a no-go for front-end use for now. The only way we can get it to work for front-end use is to completely redo and revamp the resource browser. That way we can create a system of permissions and the ability to grant access to specific users and groups. I’m still working over the details and will keep everyone abreast of any updates. smiley
      Jeff Whitfield

      "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
      • 4018
      • 1,131 Posts
      Quote from: gfroyle at Dec 19, 2006, 09:21 PM

      By default, if I apply a style (from the styles list) in TinyMCE, then it creates a <span class="blah">....</span>.

      How can I create a <div class="blah"> .. </div> ? (ie without going to the HTML source..)

      Cheers

      Gordon

      The easiest way around this is to simply select the element you want to apply the style to prior to selecting the style from the Styles list. TinyMCE should apply the given class to the selected element.

      As far as DIV’s are concerned...you can create layers (DIV’s) with the Layers plugin (http://tinymce.moxiecode.com/tinymce/docs/plugin_layer.html). Make sure that it’s available as a plugin and button in your configuration.

      As an added bit of advice, I personally don’t like the idea of allowing users to insert layers and other block level elements through an RTE. I would set those via a template.
        Jeff Whitfield

        "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
        • 4018
        • 1,131 Posts
        Quote from: Leftblank at Dec 18, 2006, 10:15 AM

        I’ve got one I didn’t notice in this topic yet; TinyMCE is generating HTML 4 code, while my page is XHTML 1.0, both on the front and backend, it’s using the settings of my xconfig (XHTML elements), but it doesn’t automatically close tags like
        ’s but also generates things like ’<font color="red">bla</font>’, which is incorrect.

        I’ll look into this. Chances are that the tinymce_valid_elements variable in the xconfig.js file needs to be modified to not allow for font tags.
          Jeff Whitfield

          "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
          • 26435
          • 1,193 Posts
          Quote from: Bravado at Dec 20, 2006, 10:12 AM

          Honestly...this is not recommended right now.
          LOL... I sort of expected that answer grin, but I did not ask (nor do I care) if it is recommended. I just wanted to know if it could be done. If it can, I am probably going to do it.
          Quote from: Bravado at Dec 20, 2006, 10:12 AM

          The primary reason is that in doing so you would enable front-end users to see and possibly modify and/or delete any and all images, files, and directories in the resource browser for the site[...]
          I understand the permissions that I would be granting these so-called front end users would be equivical to or greater than the permissions of most managerial roles, but There is only one front end user, who is also a manager (the only other manager account would be me, who set up the site). I showed him how to use NewsPublisher, and he loved it, except he can’t upload images and almost every one of his blogs has at least one image. So this is a deal breaker.

          I looked into manager/media/browser/mcpuk/connectors/php/ and tried to edit the config and the files in the /Auth/ folder. That lead me to manager/includes/user_settings.php where I tried commenting out the if in manager check. I am getting lost here, and like I said earlier, I am not that concerned about tight web security, I don’t really care at this point. I just want to know where to start looking so that when any user with front end publishing access edits with TinyMCE the resource browser button is not hidden. I hope I am not opening a can of worms where you would hold back info because you don’t personally like the idea.

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


            I send pointless little messages
            • 32982
            • 674 Posts
            i have a problem when saving a tv from manager the value i imput dont save im using 9.5 and i reupload and renistall all modx and still happens.
            Any sugestions?
              Jabiertxof (formerly XYZVISUAL)
              My bussines: http://marker.es
              https://www.youtube.com/user/jabiertxof/videos
              • 23491 ☆ A M B ☆
              • 1,056 Posts
              Quote from: xyzvisual at Dec 20, 2006, 12:58 PM

              i have a problem when saving a tv from manager the value i imput dont save im using 9.5 and i reupload and renistall all modx and still happens.
              Any sugestions?

              This is a bug that has been bothering me as well. It’s almost picky the way it sometimes saves and sometimes does not?

              My temporary solution is to view the page and edit the section directly via QuickEdit. QuickEdit edits save for me every time. wink
                Mike Reid - www.pixelchutes.com
                MODx Ambassador / Contributor
                [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                ________________________________
                Where every pixel matters.
                • 10746
                • 126 Posts
                Quote from: Bravado at Dec 20, 2006, 10:19 AM

                As far as DIV’s are concerned...you can create layers (DIV’s) with the Layers plugin (http://tinymce.moxiecode.com/tinymce/docs/plugin_layer.html). Make sure that it’s available as a plugin and button in your configuration.

                As an added bit of advice, I personally don’t like the idea of allowing users to insert layers and other block level elements through an RTE. I would set those via a template.

                You’ve gone a bit over my head here... I don’t really know what "layers" are (except for z-index things that I don’t want to do..).

                Here is what I am *trying* to do... I want to incorporate some code-type segments that will contain SQL queries and the resulting output... here is an example, although most of them are much smaller ...

                http://people.csse.uwa.edu.au/gordon/numbers-of-bases-data.html

                I have "borrowed" the CSS for the .code class from these forums, so that I can do things like the automatic scroll bars, the monospace font and so on...

                But the forums enclose any code segments inside

                <div class="code">

                // code here

                </div>


                Now, I cut-n-paste the SQL query and output into the document, then I select it all.... now I want to (easily) enclose the whole thing in a <div class="code">. If I use the "Styles" drop-down menu (I have previously added a "code" style in the manager) then it puts it into a <span class="code"> and then it doesn’t work... what happens is that each line gets enclosed in a border, each line of differing length gets a grey background and so on... presumably because <span> is an INLINE and not a BLOCK element.

                So I just want a similar thing to make <div>s - I don’t think this is anything to do with layers (is it?)


                One more question: how can I make the <div> variable width so that if the content is narrow, then the bounding box will shrink in width .. sometimes I just have a single column of data and want it to be nicely centred.. but the <div> seems to expand to fit the space available (yes, this is just a CSS query, not TinyMCE...)


                Cheers

                Gordon
                  • 32982
                  • 674 Posts
                  thaks for the tip of quick edit...
                  could be a good way hi
                    Jabiertxof (formerly XYZVISUAL)
                    My bussines: http://marker.es
                    https://www.youtube.com/user/jabiertxof/videos
                    • 4018
                    • 1,131 Posts
                    Quote from: gfroyle at Dec 20, 2006, 11:18 PM

                    Here is what I am *trying* to do... I want to incorporate some code-type segments that will contain SQL queries and the resulting output... here is an example, although most of them are much smaller ...

                    http://people.csse.uwa.edu.au/gordon/numbers-of-bases-data.html

                    I have "borrowed" the CSS for the .code class from these forums, so that I can do things like the automatic scroll bars, the monospace font and so on...

                    But the forums enclose any code segments inside

                    <div class="code">

                    // code here

                    </div>


                    Now, I cut-n-paste the SQL query and output into the document, then I select it all.... now I want to (easily) enclose the whole thing in a <div class="code">. If I use the "Styles" drop-down menu (I have previously added a "code" style in the manager) then it puts it into a <span class="code"> and then it doesn’t work... what happens is that each line gets enclosed in a border, each line of differing length gets a grey background and so on... presumably because <span> is an INLINE and not a BLOCK element.

                    So I just want a similar thing to make <div>s - I don’t think this is anything to do with layers (is it?)


                    One more question: how can I make the <div> variable width so that if the content is narrow, then the bounding box will shrink in width .. sometimes I just have a single column of data and want it to be nicely centred.. but the <div> seems to expand to fit the space available (yes, this is just a CSS query, not TinyMCE...)


                    Cheers

                    Gordon


                    Not sure about the width thing...though I would think that you could set the width to a percentage. That should cause the box to shrink as needed. Now...as far as the DIV is concerned...

                    One way you could address this is to not use a DIV at all. Instead, wrap your code with a CODE tag. Here’s a brief example:

                    <code>
                    mysql> SELECT size, rank, numBases, COUNT(*) FROM matroids9 GROUP BY size, rank, numBases;
                    </code>
                    


                    The result would look similar to what you see on the forums where others have used the Insert Code button. The CODE element is part of the web standards so you shouldn’t have any problems using it. I haven’t found a button for this in TinyMCE yet...but you can just as easily insert the code first and simply add the opening and closing CODE tags by viewing the HTML code in TinyMCE. After that, you can alter the looks, width, and such of the CODE elements via CSS. Hope this helps! smiley
                      Jeff Whitfield

                      "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
                      • 10746
                      • 126 Posts
                      The <code> tag wouldn’t give me the automatic scroll bars for long/wide content would it?

                      But the main problem is that, for some unknown reason, I get a ridiculously tiny font if I use it... (Firefox 2 on Mac OS X)... (see attached image)

                      Cheers

                      gordon

                      [Edit: STILL haven’t worked out how to insert images properly, sorry]