We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25663 MODX Staff
    • 12,272 Posts
    http://vertexworks.com/forums/index.php?topic=582.msg3513#msg3513

    Raymond, wouldn’t this be a perfect example of a great use for a plugin. Trap the relevant events and make them behave as such without having to modify the core?

    That way we could ship it by default, but have it be easily removable just by turning off the plugin.
      Ryan Thrash, MODX Co-Founder
      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
      • 4673
      • 577 Posts
      Good idea!

      I haven’t looked at the core yet but I ask -- wouldn’t this be a nice to allow contribs and such to access this ability.

      Would tweeking to the core to do this be so bad?
        Tangent-Warrior smiley
        • 32963
        • 1,732 Posts
        Quote from: Carsten at Jul 28, 2005, 11:38 AM

        Would tweeking to the core to do this be so bad?

        No, it would not add much any over head to core at all (even though I’ve not yet looked at the source) smiley

        The one thing I’m concerned about is the use of [##]. This would require another sweep of the content to get all the TVs that are editable. IMO I think we could merge both the existing design [**] with Adam’s design and still perform only one sweep on the content to find all available TVs. I think that we can still use [**] but use a special charater before the name of the TV to indicate that it’s editable. For example [*longtitle*] can be made editable if it was written as [*#longtitle*] where the number sign (#) will be used before the name of the TV to indicate that it’s an editable TV.

        <html><head><title>[*pagetitle*]</title></head>
        <body>
        <div>[*header*]</div>
        <div>[*#pagetitle*]</div>
        <div>[*#content*]</div>
        <div>[*footer*]</div>
        </body>
        </html>

        What do you think?





          xWisdom
          www.xwisdomhtml.com
          The fear of the Lord is the beginning of wisdom:
          MODx Co-Founder - Create and do more with less.
          • 25663 MODX Staff
          • 12,272 Posts
          Sounds very reasonable to me Raymond. I think doing it as a plugin makes sense on multiple levels. One big one that comes to mind is the fact that it would make for a really cool example of how to create killer plugins/modules.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 1764
            • 680 Posts
            There have been a lot of ideas thrown around about how to do this already.

            After thinking about it for a while I like the idea of having a checkbox in the TV editor where you can mark a TV as frontend editable. Otherwise I could see a lot of people never even realizing that the option exists to edit from the frontend simply because they don’t know much about templating.

            So this way eveything would use [**] but when grabbing the info for the TV you just grab another flag to see whether or not you should include the edit link.

            However, there are a couple of things I don’t like about this method. One is that you’ve probably eliminated the possibility of making this a plugin since it requires an addition to the core TV options, the other is the fact that I can’t really see any good way in my mind to specify whether titles, content and descriptions should be editable, prefereably on a Template by template basis. You may want the title editable on one template but not on the other.
              • 25663 MODX Staff
              • 12,272 Posts
              Ahhh... but you don’t eliminate the plugin potential!

              The FCK plugin for instance adds to the appropriate page in the manager. Or it could. Right, Raymond?

              P.S. I like your idea for implementing better as well.
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 25663 MODX Staff
                • 12,272 Posts
                One other option for implementation would just be creating a new TV Type that is editable.

                So you have RTE and RTE-editable.

                But that leaves out the content, so it would need a flag/tickmark. Hmmm... could be a global override I assume.
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                  • 32963
                  • 1,732 Posts
                  Quote from: rthrash at Jul 28, 2005, 01:04 PM

                  Sounds very reasonable to me Raymond. I think doing it as a plugin makes sense on multiple levels. One big one that comes to mind is the fact that it would make for a really cool example of how to create killer plugins/modules.

                  I dont think this feature will add any overheads to the core. If it’s integrated then we can add more cool features for it to support future systems such as TV2 and widgets.

                  The other think is that u wont event know it’s there unless you read the manual.

                  Adam,

                  Using the checkbox approach sounds very good but I think we will run into problem with that method:

                  Forx example:

                  <img src="[*longtitle*]" />

                  Now if longtitle is flagged as editable you know what’s going to happen to the above right?

                  IMO the flag can be used to make it possible for users to use [*#*] table tags. this means that if the TV is not flagged as editable then using [*#*] will have no effect on the TV

                  PS. could also add Roles for Front-end editing
                    xWisdom
                    www.xwisdomhtml.com
                    The fear of the Lord is the beginning of wisdom:
                    MODx Co-Founder - Create and do more with less.
                    • 1764
                    • 680 Posts
                    One possible solution would be to have two methods frontend editing links: inline and list. Inline would work the same way the edit links work now. List would just create an Edit Longtitle link floated at the top of the screen or somewhere. That way you would have the ability to edit things like description, pagetitle and other "TVs" that aren’t typcially viewable on a page.

                    I think this is a good idea one way or another. If we don’t have it built into the core as an option then it would be a really simple snippet.

                    I have no problem with using a flag in the template one way or another. I think this is probably the most flexible option but if we do go that route I think that we should have it very well documented and probably even use [*#content*] in the default template.

                    Also, I think it would be just as easy to use [*#*] or [##] or anything else you’d just have to change what it is that’s returned by your RegExp. It’s really just a matter of preference. It might actually be best to go with something like [*content:editable*] just to be clear about it.
                      • 25663 MODX Staff
                      • 12,272 Posts
                      I really like the thought of having things in the header editable... didn’t even consider that... SEO meta tags, keywords and description heaven!!! Could even make it so that they float above the page visible like you said... a nice transparent box... hmmmm... yummy!

                      I still think this would be a great plugin, implementation wise. But if it will be easier to incorporate as a core modification, then so be it. I’ll defer to your collective judgments there.

                      A plugin would be, from a marketing standpoint, a powerful testament to the flexibility and robustness of the core. That’s my primary reason for wanting it that way. Even if the core had to be tweaked a bit to allow it to happen... wink

                      Whatever the implmentation, it has to be dead easy for users.
                        Ryan Thrash, MODX Co-Founder
                        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me