We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8471
    • 333 Posts
    Hi, I’m trying to use this snippet in a document created with NewsPublisher, but with this simple call: [[AuthorTime]] it doesn’t show anything
      Sorry for my bad English grin
      • 7923
      • 4,213 Posts
      Have you saved the snippet with that name? Does the snippet work with other documents that are not made using newspublisher?


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 8471
        • 333 Posts
        Quote from: doze at Mar 24, 2007, 12:08 PM

        Have you saved the snippet with that name?
        Yes
        Quote from: doze

        Does the snippet work with other documents that are not made using newspublisher?
        No

        I’m using modx 0.9.5
          Sorry for my bad English grin
          • 27
          • 117 Posts
          same here. the pages generated made by newspublisher snippet doesnt work - but snippet does work for non-newspublisher pages...

          do i need an alternative to docinfo?
            • 352
            • 8 Posts
            Hi folks,

            I don’t get this snippet working. No matter what I choose (editeon, pub_date) it always shows "01-Jan-70 01:00" (author is correctly identified). I checked the snipet [[DateTime]], this works flawlessly. I’m using modx-0.9.6-rc3.

            BTW, I checked this on different servers with different versions of mysql and php. Same result.

            Ciao

            acepoint
              • 27
              • 117 Posts
              how about ’createdon’?
                • 352
                • 8 Posts
                Quote from: 0ad at May 18, 2007, 11:02 AM

                how about ’createdon’?

                Same. Anything I can do for debugging? I’m not experienced in php, but more than 10 years dealing with linux systems. A preposter also mentioned the same issue (longer ago) but didn’t tell whether he solved the problem or not. It bugs me that this happens on three different machines (a webhosted server without console access, my own server and a test installtion on a notebook).

                Ciao

                acepoint

                PS. I just took a look at the db with myswldumper. The table "modx_site_content" shows createdon and editedon with different dates. BTW, int the snippet there is a line

                $usedDate=’[variable]’ <--- in the examples it says "editeon", but the rows name is editedon. Anyway, I both tried

                $usedDate=’editeon’
                and
                $usedDate=’editedon’

                it still celebrates the unix’ birthday.
                  • 352
                  • 8 Posts
                  Don’t kill me, but after using the "d" in createdon or editedon and using the option "execute snippet after saving" it finally worked. "pub_date" coudn’t work because I don’t fill out that form. But it looks like the reason was the wrong naming of the rows.

                  Anyway, it might be a good idea to update the header of the snippet. In all examples it says "createon", editeon ..." and that seems to give back no error but an empty value. Nonetheless you put me into the right direction. Thx a lot!

                  Ciao

                  acepoint

                    • 18606
                    • 25 Posts
                    The snippet dosen’t works with NewsPublisher document..
                    Is there a simple solution to this problem?
                    Thanks a lot.
                      • 17412
                      • 270 Posts
                      Is it possible to display a date set by a custom TV ?

                      eg: [!AuthorTimestamp? &dateFormat=`%d %B %Y` &usedDate=`[*item-date*]` &tpl=`By <strong>[+Author+]</strong> on [+Date+]`!]