We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24732 ☆ A M B ☆
    • 300 Posts
    Hallo, first of all huge and effusive thanks for all the hard work of the MODx team. It has revolutionized my work and I mean that. I cannot possibly express how much this software has helped me. So please excuse me if I am posting where I should not or otherwise commit a faux pas, will try to document versions, code, etc and be specific as possible, tia for your patience.

    I have read as many of the tutorials, faqs, blogs, wiki and docs as I can yet still find myself somewhat timid and with many many questions but I do not want to pester the hardworking staff. I have several objectives to accomplish and I process things verbally and so I intend to work through these things here (hopefully with help if anyone cares to comment?) and perhaps it will enlighten others as well.

    I am on a g4 Mac running OS X Panther because my G5 just died last week. I have to use Firefox 2.0. I hope to replace my system asap but cannot do so right now.

    my server is Linux, Apache version 1.3.37 (Unix)
    MySQL version 4.1.22-standard
    PHP version 4.4.6

    what I hope to accomplish:

    1. I have a Flash slideshow that is fed by an xml file currently on my site’s home page. I need to create a form with fields where my admins can edit the jpg filenames that go in the xml file. I think template variables accomplish this? I have read the information on using ditto with Flash and it went over my head. I read the information on creating a Google sitemap and it helped a little. Honestly I am still very fuzzy on what ditto is exactly, it seems to me to be a way to execute/manage SQL queries? I read the information Shane Sponagle had put in his ambitious tutorial on getting started with MODx and it helped some, but now I’m not sure if I even need ditto. I have located the ditto for dummies document (attached to this post) and will commence to read it next. Many of the ditto links go to a blank screen for me. I also think I was confused by the different ditto versions.

    2.I also have a simple add/edit/delete system of forms that I built with help from a tutorial in php to manage the names and descriptions of various massages for the spa site I am building. There seems to be an add/edit/delete add-on in the downloads area and I am going to attempt to use it I think. It is intimidating. I am wondering if I should just try to use snippets to port over my php code and then...does ditto make tables? I think the issue is that I’m trying to relate what I know of php/sql to what is here and I’m a designer who can code but has trouble with the right names for things. I understand that snippets are executable and chunks are not. Okay, so chunks get static html and snippets get pieces of php code... how do I ...query? does that go anyplace special? how do I make new tables? can I? did I miss this in the docs?

    3. I need to simplify the manager for my end users admins, and I’ve installed managermanager and am also looking at quickmanager and trying to locate a thread to compare them, or else discover if they are just complementary. If I cannot find a comparison then I will do it here. I am confused about QuickEdit, if I need to disable it to run QuickManager. Which one is better. I’m particularly concerned about the appearance of the text within the textarea. I’ve installed styles to the dropdown list in the TinyMCE interface, however within the textarea box itself the formatting does not appear as it will when the stylesheet is actually applied. I do not know if it is possible to do this or not. I think I have done it before when I integrated tinyMCE with a textarea. I understand that this is a tinyMCE issue and I think that if I can attach the stylesheet for my pages to the actual TinyMCE script then possibly I can do this. But I’m not certain.

    4. I need to install a working form, this one task seems manageable and is the next one I am tackling. I have located several forms in the downloads area and am going to attempt to use BobRays I think.

    a little about me:

    I have eval’d Drupal, Wordpress and Joomla in the past and never have been able to embrace any of them, though I have used them, always end up just cobbling together my own solutions. I am so so excited about MODx, it is the answer I have been looking for. I will never use anything else and have 6 ,more projects to build after this one with it.

    what I have done so far:

    - installed Evolution (I think? I keep getting them confused...it is 0.9.6.3) after deciding the new version was simply too confusing as all of the tutorials/docs i found were using screenshots from the older one. working through einsteinboi’s excellent tutorial helped me immensely as did BobRays. Susan Otwell is who I want to be when I grow up but I am very confused by too much of what she is saying yet. I hope to grok it soon.

    -installed the ezFAQ system (thank you so much!!)

    - installed the flash slideshow on my home page, but am not using SWFfix so I will change that yet

    - have installed my templates and successfully created and used TVs and chunks.

    - have created the manager login for my client and am attempting to change the interface for them to make it as simple as possible.

    links to what I am working on:

    for the modx version:
    http://www.yourtranquility.com/build2/home/


    for the html/php/non modX version
    http://www.yourtranquility.com/build/

    current site built in 2001:
    http://www.yourtranquility.com


    ETA in DEC 2009: I finished this project and the current finished site is now at http://www.yourtranquility.com

    in conclusion, sorry for the blog but I know from experience that others benefit from watching someone solve issues so I felt it might be helpful and best for me given my learning style to try to sort through all of this publicly. Also working alone with no one to sort through things is difficult. And I need one place to sort through all of this. So this is more a record of a noob journey than anything else but all input gratefully accepted..

    cheers
      ________

      Anne
      Toad-in-Chief
      Red Toad Media - Web Design, Louisville KY
      Hear me tweet: http://www.twitter.com/redtoadmedia
      "Bring on the imperialistic condiments." - Rory Gilmore
      • 24732 ☆ A M B ☆
      • 300 Posts
      will post code snippets specifically as I tackle each task. sorry.
        ________

        Anne
        Toad-in-Chief
        Red Toad Media - Web Design, Louisville KY
        Hear me tweet: http://www.twitter.com/redtoadmedia
        "Bring on the imperialistic condiments." - Rory Gilmore
        • 24732 ☆ A M B ☆
        • 300 Posts
        Alrighty. so today I’m tackling the ditto docs and then working on the form. If I understand Ditto I might be able to make the flash piece that I need.

        "Ditto 2.0.1 is a MODx snippet that compiles a list of documents meeting criteria you specify, and outputs the list in your choice of the following formats: HTML (for displaying the list on a web page), RSS or ATOM (to provide news feeds), JSON (for use in AJAX programming?), or XML (for huh)."

        okay. sounds like Ditto runs a query, "documents" are table cells. That is helpful. Output is helpful.

        "Extenders" are PHP code files that add incremental functionality to Ditto. They can can define additional parameters that can be included in the Ditto snippet call, and additional placeholders that can be included in Ditto’s output

        okay so if I put in the Ditto call but I need extra control over the output then I can get that with an extender. Aha. Reflect is like Ditto but for archives. That’s what that is. Groovy. Jot=commenting for a blog. Ditto is designed to output a single-level list that can optionally be broken into multiple chunks via pagination....sounds like ditto was designed for blogs but is used for other things too, I have seen the "unblog" ...checking to see what version I have. ...2.1.0

        okay, ...so thinking through this... I go back and read this from here
        http://modxcms.com/learn/solutions/flash-cms.html:

        The Solution:

        Luckily for us, it’s a fairly trivial task for MODx to generate XML using Ditto. The main Flash site was configured to import _all_ its content from XML, so it was really just a matter of making sure Ditto output the XML as required by the Flash. The first thing to do was to create a quick template for the XML:

        <?xml version="1.0" encoding="UTF-8" ?>
        
        [*content*]


        That’s it. Very simple, and it could be done on the document level, but it’s obviously better to reduce duplication in your code, and using a template for the XML makes it easy to change things sitewide should you need to later.

        Once we had the XML template set up we could begin some Ditto:

        <rss>
        <channel>
        
        [!Ditto? &parents=`[*id*]` &tpl=`xml_rider_images` &sortBy=`createdon` &sortDir=`ASC` !]
        
        </channel>
        </rss>
        

        Which uses this for the xml_rider_images chunk:

        <item id="[+ditto_iteration:math=`?+1`+]">
          <title>[[GetField? &parentLevel=`0` &field=`pagetitle` &parent=`1` &topid=`103` ]]</title>
          <shortDes>[+pagetitle+]</shortDes>
          <image>[+image_1+]</image>
          <image2>[+image_2+]</image2>
          <image3>[+image_3+]</image3>
          <description>
            <![CDATA[ [+content+] ]]>
          </description>
        </item>
        


        You can see some [+ditto_iteration+] and a [[GetField]] call, which help create XML exactly as the Flash sections required.

        The MODx template for content elements was configured to have a number (up to 10) image TVs:

        Lightbulb moment.

        They created a document with the content they wanted. for Flash, then they added TVs for the images. To get it into Flash they ran a Ditto call and Ditto is able to output in html or xml or json or rss, so they had it output to xml which Flash thenm picked up. cool.

        If the client ever wants to enter additional boards or change images, they can do it quite easily from the MODx backend. (Similarly, if the client just wants us to do it, we have a _very_ easy way to make it happen without needing to do things manually, which might not be difficult but is more prone to errors.)


        or...I can just code the xml myself into a document like they did in the article fo r the main navigation. Heh.

        okay so my little tiny xml file, all I have to do then is make tvs for each image in the slideshow and then have it output in xml.....and how do we link them, tell the Flash where to find that????? currently it looks in my main directory for the filename, maybe I just name it the same thing. heh.

        they used

        Customize Manager Fields, which is like ManagerManager, to hide the things the muggles should not mess with...is it easier? downloading to see. will report back. am quite excited.

        http://modxcms.com/extras/package/?package=85



          ________

          Anne
          Toad-in-Chief
          Red Toad Media - Web Design, Louisville KY
          Hear me tweet: http://www.twitter.com/redtoadmedia
          "Bring on the imperialistic condiments." - Rory Gilmore
          • 24732 ☆ A M B ☆
          • 300 Posts
          okay, so I went and created a new template called xmltemplate because I am creative.

          <?xml version="1.0" encoding="UTF-8" ?>
          
          [*content*]


          then I went and made a new document with that template as the template.

          now... what to put in it...

          my xml looks like this:

          <images>
              <pic>
                  <image>frame1.jpg</image>
                  <right></right>
                  <left></left>
              </pic>
              <pic>
                  <image>frame2.jpg</image>
                  <right> </right>
                  <left></left>
              </pic>
              <pic>
                  <image>frame3.jpg</image>
                  <right>Natural Beauty... That's my Tranquility </right>
                  <left></left>
              </pic>
              <pic>
                  <image>frame4.jpg</image>
                  <right> </right>
                  <left></left>
              </pic>
              <pic>
                  <image>frame5.jpg</image>
                  <right> </right>
                  <left></left>
              </pic>
              <pic>
                  <image>frame6.jpg</image>
                  <right> </right>
                  <left></left>
              </pic>
              <pic>
                  <image>frame7.jpg</image>
                  <right> </right>
                  <left>Cozy Spaces... That's my Tranquility</left>
              </pic>
              <pic>
                  <image>frame8.jpg</image>
                 <right> </right>
                  <left></left>
              </pic>
              <pic>
                  <image>frame9.jpg</image>
                  <right> </right>
                  <left></left>
              </pic>
              <pic>
                  <image>frame10.jpg</image>
                  <right> </right>
                  <left></left>
              </pic>
              <pic>
                  <image>frame11.jpg</image>
                  <right>Flexible Scheduling... That's my Tranquility </right>
                  <left></left>
              </pic>
              <pic>
                  <image>frame12.jpg</image>
                 <right> </right>
                  <left>Healthy Choices... That's my Tranquility</left>
              </pic>
              <pic>
                  <image>frame13.jpg</image>
                  <right> </right>
                  <left></left>
              </pic>
                 <pic>
                  <image>frame14.jpg</image>
                  <right> </right>
                  <left>People who care...that's our Tranquility</left>
              </pic>
                 <pic>
                  <image>frame15.jpg</image>
                <right> </right>
                  <left></left>
              </pic>
          


          we have the image name, and then captions. not all slides have captions and if a caption goes on the right then it goes in between the "right" tags and if it goes on the left it goes in between the "left" tags.

          hrm.

          so I can make TVs for each one. Best make a chunk? and then repeat it I think. I’ll make an image name field, a caption field and then a dropdown, right or left for the position. will it output my right/left? we’ll see. I need to test and see if I have to have the empty xml tags in there. I think I do or my Flash file chokes.

            ________

            Anne
            Toad-in-Chief
            Red Toad Media - Web Design, Louisville KY
            Hear me tweet: http://www.twitter.com/redtoadmedia
            "Bring on the imperialistic condiments." - Rory Gilmore
            • 24732 ☆ A M B ☆
            • 300 Posts
            does not choke without the empty tags. yay.

            so now my xml looks like this:

            <images>
                <pic>
                    <image>frame1.jpg</image>
                
                </pic>
                <pic>
                    <image>frame2.jpg</image>
              
                </pic>
                <pic>
                    <image>frame3.jpg</image>
                    <right>Natural Beauty... That's my Tranquility </right>
                 
                </pic>


            much better... now on to make my chunk. I go and name my chunk xml_slide_images and for now I’m popping this in there:

             <pic>
                    <image>frame1.jpg</image>
                    <right></right>
                    <left></left>
                </pic>


            because looking at the article I see this example:

            <item id="[+ditto_iteration:math=`?+1`+]">
              <title>[[GetField? &parentLevel=`0` &field=`pagetitle` &parent=`1` &topid=`103` ]]</title>
              <shortDes>[+pagetitle+]</shortDes>
              <image>[+image_1+]</image>
              <image2>[+image_2+]</image2>
              <image3>[+image_3+]</image3>
              <description>
                <![CDATA[ [+content+] ]]>
              </description>
            </item>


            okay, CDATA tell the parser that this is xml? and I think all the {+foo+} is ditto code but I am not there yet. So I’ll keep my xml in the chunk for now and replace it as I figure this out.

            back in my "images" document I’m going to put this in the content because it is a container tag...and I’ll make TVs for the images in a sec.

            <images>
            
            </images>


            going back to the article I see this:

            <rss>
            <channel>
            
            [!Ditto? &parents=`[*id*]` &tpl=`xml_rider_images` &sortBy=`createdon` &sortDir=`ASC` !]
            
            </channel>
            </rss>
            

            and wonder if I should output as rss? they have an rss tag. Maybe not, we’ll do xml and see what happens.
            Alright now to decipher the ditto code. I might need to add ids? I do not have them right now.

            back to ditto for dummies.

              ________

              Anne
              Toad-in-Chief
              Red Toad Media - Web Design, Louisville KY
              Hear me tweet: http://www.twitter.com/redtoadmedia
              "Bring on the imperialistic condiments." - Rory Gilmore
              • 26931
              • 2,314 Posts
              Hi redtoad,

              there’s also this documentation for Ditto: http://www.pogwatch.com/ditto.html
                • 24732 ☆ A M B ☆
                • 300 Posts
                awesome. thank you shark.

                ditto’s default template is

                <div class="ditto_item" id="ditto_item_[+id+]">
                    <h3 class="ditto_pageTitle"><a href="[~[+id+]~]">[+pagetitle+]</a></h3>
                    <div class="ditto_documentInfo">by <strong>[+author+]</strong> on [+date+]</div>
                    <div class="ditto_introText">[+introtext+]</div>
                </div> 


                according to pogwatch’s docs. okay. and the call looks like this:

                [[Ditto? ]]


                ditto for dummies says I can override the template by putting this in there:

                &tpl -- The template you specify with this parameter will be used by default for all items in the list. This default may be overridden for certain items using the four other template parameters.

                okay.

                so sorting through this from the flash page:

                <rss>
                <channel>
                
                [!Ditto? &parents=`[*id*]` &tpl=`xml_rider_images` &sortBy=`createdon` &sortDir=`ASC` !]
                
                </channel>
                </rss>


                the &tpl= part means that they over-rode the default ditto template and replaced with their chunk. which I will also do. &parents...do I -need- &parents? this is a query. ..sortby and sort dir I can understand already....

                back to ditto for dummies.

                  ________

                  Anne
                  Toad-in-Chief
                  Red Toad Media - Web Design, Louisville KY
                  Hear me tweet: http://www.twitter.com/redtoadmedia
                  "Bring on the imperialistic condiments." - Rory Gilmore
                  • 24732 ☆ A M B ☆
                  • 300 Posts
                  <item id="[+ditto_iteration:math=`?+1`+]">
                    <title>[[GetField? &parentLevel=`0` &field=`pagetitle` &parent=`1` &topid=`103` ]]</title>
                    <shortDes>[+pagetitle+]</shortDes>
                    <image>[+image_1+]</image>
                    <image2>[+image_2+]</image2>
                    <image3>[+image_3+]</image3>
                    <description>
                      <![CDATA[ [+content+] ]]>
                    </description>
                  </item>


                  okay so this was their chunk.

                  right now my chunk looks like this:

                      <pic>
                          <image>frame1.jpg</image>
                          <right></right>
                          <left></left>
                      </pic>
                  

                  I think I’m going to have to change how my xml is read. make it like this:

                    <pic>
                          <image>frame1.jpg</image>
                  <description> hello, world </description>
                         <position>right</position>
                      </pic>


                  growl.
                    ________

                    Anne
                    Toad-in-Chief
                    Red Toad Media - Web Design, Louisville KY
                    Hear me tweet: http://www.twitter.com/redtoadmedia
                    "Bring on the imperialistic condiments." - Rory Gilmore
                    • 25663 MODX Staff
                    • 12,272 Posts
                    Also note, for long posts with lots of code blocks it greatly improves legibility of the posts if you wrap code in [ code] [/ code] (less the spaces) tags.
                      Ryan Thrash, MODX Co-Founder
                      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                      • 24732 ☆ A M B ☆
                      • 300 Posts
                      will go back and wrap, sorry.
                        ________

                        Anne
                        Toad-in-Chief
                        Red Toad Media - Web Design, Louisville KY
                        Hear me tweet: http://www.twitter.com/redtoadmedia
                        "Bring on the imperialistic condiments." - Rory Gilmore