We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18397
    • 3,250 Posts
    The Ditto SVN @1281 (Provided by CVS Dude) is now being released as Ditto 1.1 Beta 2. A zipped SVN export is available at the end of this post. Please note that this is a beta release and parameter names and functionality are subject to change before the next release. Please test this out and report bugs or issues in this thread. DO NOT post them in the bugtracker as with Ditto 1.1 a new TRAC based Ditto site will be unveiled.

    New in Beta 2:

    • added PHx support
    • add filters 7 and 8
    • fixed tagging
    • added kudo’s multifilter code
    • cleaned up english language file
    • relocated several functions
    • reorganized debug class
    • cleaned up codebase
    • fixed randomize bug
    • the obligatory much much more

    For what was new in Beta 1, go here:
    http://modxcms.com/forums/index.php/topic,6924.msg48468.html#msg48468

    Install just like you would Ditto 1.0.2.
      • 12652
      • 228 Posts
      Excellent!

      Randomize working like a charm again!

      Thanks.
        | Identity Developments delivers SEO focused web design and web presence services
        - it's not about websites, it's about your identity. |
        • 23050
        • 1,842 Posts
        Hi, thanks Mark for this new beta.

        I’ve just built a blog with ditto and I would like to display a very short summary (around 60 characters) of an article in the blog home page.
        But, as I use characters with accents (french rolleyes ) some characters represent 8 characters (é) instead of 1 (é) and truncation is sometimes strange.

        See at the bottom of this page, under "domotique" the &agra and under Consommation the géopolitiqu which misses the final e (géopolitique)

        So my question : is there a way to add a feature to fix this ?

        Here is the snippet call :
        [!Ditto? &startID=`27` &tpl=`BlogInfosAccueil` &summarize=`4` &dateFormat=`%d/%m/%Y` &displayArchive=`0` &depth=`2` &hideFolders=`1` &sortBy=`id` &trunc=`1` &truncLen=`70` &truncSplit=`0` &truncOffset=`10` &truncChars=`1` !]


        Thank you for your help wink
          • 18397
          • 3,250 Posts
          The only thing I can think of that could solve this would be to create an algorithm that does the following:

          1. Finds all instances of &*;
          2. Counts the number of characters in each
          3. When truncating add the number of characters to the truncation point.
            • 6726
            • 7,075 Posts
            Very cool additions Mark cool

            I’ll upgrade my Ditto installs tomorrow and report smiley
              .: COO - Commerce Guys - Community Driven Innovation :.


              MODx est l'outil id
              • 16429
              • 254 Posts
              I don’t understand: it doesn’t works for me, even a simple [[Ditto]] call doesn’t gives any output.
                kudo
                www.kudolink.com - webdesign (surprised?)

                [img]http://www.kudolink.com/kudolinkcom.png[/img] [sup]proudly uses[/sup] [img]http://www.kudolink.com/modx.png[/img]
                • 23050
                • 1,842 Posts
                Hi Mark, thank you for your answer. As I don’t know php, I’m trying to see if another french would be interested in adding this feature.

                Another question : I’m testing PHx with Ditto (still with 1.1 beta 2) to strip tags from the summary Ditto build. So, I changed [+summary+] to [+summary:notags+] and it works fine !

                But, as I use GetField snippet in Ditto template, with PHx enabled, it doesn’t work anymore. I mean, GetField doesn’t return any output.

                Here is the template I use :
                <div class="infos">
                <h5><a href="[~[+id+]~]">[+title+]</a> - [+date+]</h5>
                <p class="dossier">>> [[GetField? &docid=`[+parent+]`]]</p>
                <div class="resume">[+summary+]<p><a href="[~[+id+]~]" title="[+longtitle+]">[...]</a></p></div>
                </div>


                Do you know any issue about that ?

                Thank you wink

                Edit : It seems that GetField doesn’t work with PHx, no matter if it is used with Ditto or not. See here for more detail
                  • 18397
                  • 3,250 Posts
                  I believe PHx has a parent field selector. You might want to check the docs for that.

                  Kudo, what version of MODx are you testing with?
                    • 4195
                    • 398 Posts
                    actually there is no default parent field selector in phx.. you have to create a custom modifier based on the getfield snippet..
                    more information on this is available in the wiki (the parent field selector is an example in the custom modifier section)
                      Armand Pondman
                      MODx Coding Team
                      :: Jot :: PHx
                      • 16429
                      • 254 Posts
                      Quote from: Mark at Nov 13, 2006, 08:55 PM

                      I believe PHx has a parent field selector. You might want to check the docs for that.

                      Kudo, what version of MODx are you testing with?

                      This is the thing I was thinking about.

                      I tried it on MODx 0.9.2.1
                        kudo
                        www.kudolink.com - webdesign (surprised?)

                        [img]http://www.kudolink.com/kudolinkcom.png[/img] [sup]proudly uses[/sup] [img]http://www.kudolink.com/modx.png[/img]