We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1764
    • 680 Posts
    I have something I’ve been working on for a client that might be an even better solution for you. It provides full frontend editing for individual template variables and contnet, title, etc.

    I was planning on posting it back here to see if anyone was interested in using it or event adding it to the source but it’s not 100% finished yet. However, it should work reliably I just need to fix a few bugs with layout, permissions and some other small things.

    To use it just unzip the files into your site. Be careful because the index.php and document.parser.class.inc.php files will overwrite your existing files. So if you have any hacks to your existing files you’ll just want to add in the code for the hacks instead of the whole file, they are clearly marked in each file, just search for HACK.

    Be warned that it may not work if you are not using Tech Preview 3.1.

    To identify a frontend editable template variable just modify your template to use [##] instead of [**], ie [#content#] instead of [*content*].

    Let me know what you guys think. If anyone’s interested I’ll post my updates to the files as I make them. I hope this helps you.

    Update:
    Please see the newer version here.
    http://modxcms.com/forums/index.php/topic,765.msg4457.html#msg4457
    • Does it work for TVs too?
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
      • (And welcome back stranger!)
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 8634
          • 56 Posts
          any screenshots?
            • 18397
            • 3,250 Posts
            Quote from: eko40 at Jul 28, 2005, 07:05 AM

            any screenshots?

            Ditto.
              • 1764
              • 680 Posts
              Sorry for the delayed reply. I went to bed early last night.

              Yes it does work with TVs and pagetitle, longtitle, description and content. I will probably make some changes so that it can work with published, alias and others too. There is no way to edit those fields that don’t acutally appear visually on the page such as pagetitle and description (usually) but that would be a very simple snippet that I will throw together sometime.

              So the screenshots are from an Etomite+MODx installation so you’ll see HTMLArea but the files I attached work with TP3.1 so they’ll use FCKeditor.

              edit_links is the page with the edit links after you’re logged in. They will only show if you are logged in.


              edit_links_hover is the same page showing the hover highlighting of the editable area.


              text_editor shows the edit window for a text input like pagetitle or longtitle.


              richtext_editor shows the richtext editor window.


              All of the TV inputs should be supported but I haven’t had time to test them all just yet. After clicking Save to an editor window the window will close and refresh it’s parent automatically.

              If you want to give ita try on your own installation it should be fairly simple. Just rename your /manager/index.php to index.old.php and rename /manager/includes/document.parser.inc.php to document.parser.inc.old.php and upload the files. Then when you’re done you can just delete the uploaded files and unrename index.php and document.parser.inc.php.
                • 7455
                • 2,204 Posts
                This looks great Nice work wil test this one
                  follow me on twitter: @dimmy01
                  • 7455
                  • 2,204 Posts
                  mm looks like it does not work for me i replaced the [*longtitle*] for [#logtitle#] but now it just prints [#logtitle#] on that spot instead of the longtitle and no edit options
                    follow me on twitter: @dimmy01
                    • 1764
                    • 680 Posts
                    In your post you said that you replaced [*loNgtitle*] with [#logtitle#] (no N). Is that just a typo in the post? You may want to check that.

                    However, even if that is the problem you should still see the link as opposed to seeing [#longtitle#]. It would just tell you that it doesn’t exist when you go to edit it. You should make sure that your document.parser.inc.php actually did get overwritten. Or if you manually added the hack make sure you have both in there. There are two separate places where hacked code need to be added. Search for HACK and look for my name (Adam Crownoble).
                      • 4018
                      • 1,131 Posts
                      This is something that I think would make for a nice addition to MODx. The reason I do is due to the fact that there are some CMS’s out there that use a similar approach to editing content on the fly...Mambo and Typo3 come to mind. However, I do think it should be a feature that can be enabled and disabled at will. Perhaps if this gets in the code we can have an option in the site settings for this. I’m sure there will likely be some tweaking to do in order to get it just right. Personally, I think that the styling of the edit buttons and such could likely use a little touchup...but that’s just me. smiley
                        Jeff Whitfield

                        "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."