<![CDATA[ [Snippet] AuthorTime stamp - MODX Community Forums]]> https://forums.modx.com/thread/?thread=35648 <![CDATA[Re: [Snippet] AuthorTime stamp]]> https://forums.modx.com/thread/35648/snippet-authortime-stamp?page=2#dis-post-195497 http://modxcms.com/AuthorTimestamp-693.html
New support thread: http://modxcms.com/forums/index.php?topic=5701

Thread closed.
PaulGregory Jul 24, 2006, 06:17 PM https://forums.modx.com/thread/35648/snippet-authortime-stamp?page=2#dis-post-195497
<![CDATA[Re: [Snippet] AuthorTime stamp]]> https://forums.modx.com/thread/35648/snippet-authortime-stamp?page=2#dis-post-195496 PaulGregory Jul 03, 2006, 10:43 AM https://forums.modx.com/thread/35648/snippet-authortime-stamp?page=2#dis-post-195496 <![CDATA[Re: [Snippet] AuthorTime stamp]]> https://forums.modx.com/thread/35648/snippet-authortime-stamp#dis-post-195495 jwtyler May 25, 2006, 11:47 AM https://forums.modx.com/thread/35648/snippet-authortime-stamp#dis-post-195495 <![CDATA[Re: [Snippet] AuthorTime stamp v1.2 (Easily configurable)]]> https://forums.modx.com/thread/35648/snippet-authortime-stamp#dis-post-195494

  • You can choose the date format with &dateFormat parameter (see PHP documentation for the syntax)
  • you can choose the Date field to use (like createon, editeon, pub_date etc...) with &usedDate parameter
  • you can use a template to change or translate the output by using placeholders in the string ([+Author+] and [+Date+])

[[AuthorTime? &dateFormat=`%d %B %Y - %H:%M` &usedDate=`pub_date` &tpl=`Posté par <strong>[+Author+]</strong> le [+Date+]`]]

OncleBen31 May 24, 2006, 03:47 AM https://forums.modx.com/thread/35648/snippet-authortime-stamp#dis-post-195494
<![CDATA[Re: [Snippet] AuthorTime stamp]]> https://forums.modx.com/thread/35648/snippet-authortime-stamp#dis-post-195493 sottwell May 17, 2006, 07:09 PM https://forums.modx.com/thread/35648/snippet-authortime-stamp#dis-post-195493 <![CDATA[Re: [Snippet] AuthorTime stamp]]> https://forums.modx.com/thread/35648/snippet-authortime-stamp#dis-post-195492 values that are useful for display on the page" ? They sound pretty useful to me!

zenmaster May 17, 2006, 12:34 PM https://forums.modx.com/thread/35648/snippet-authortime-stamp#dis-post-195492
<![CDATA[Re: [Snippet] AuthorTime stamp]]> https://forums.modx.com/thread/35648/snippet-authortime-stamp#dis-post-195491
However, MODx offers another API function, getFullTableName:
$tbl = $modx->dbConfig['dbase'].".".$etomite->dbConfig['table_prefix']."user_attributes";

can be replaced with:
$tbl = $modx->getFullTableName('user_attributes');
sottwell Apr 22, 2006, 04:19 AM https://forums.modx.com/thread/35648/snippet-authortime-stamp#dis-post-195491
<![CDATA[Re: [Snippet] AuthorTime stamp]]> https://forums.modx.com/thread/35648/snippet-authortime-stamp#dis-post-195490

Can anyone check the code and confirm the suggestion by andrew_bernard that you can simply exchange all occurences of "etomite" with "modx", and that ($limit = 1) should be if ($limit == 1)?

Zzzeke Apr 22, 2006, 04:17 AM https://forums.modx.com/thread/35648/snippet-authortime-stamp#dis-post-195490
<![CDATA[Re: [Snippet] AuthorTime stamp]]> https://forums.modx.com/thread/35648/snippet-authortime-stamp#dis-post-195489
I will change that code. However, my php skills are nil. I understand syntax only as I stumble through pre written code. I could not code something from scratch to save my worthless hide.

thanks again.
jwtyler Mar 27, 2006, 01:28 PM https://forums.modx.com/thread/35648/snippet-authortime-stamp#dis-post-195489
<![CDATA[Re: [Snippet] AuthorTime stamp]]> https://forums.modx.com/thread/35648/snippet-authortime-stamp#dis-post-195488
Just what I have been looking for! Thanks. I am an old IT dog but an absolute MODx newbie, so I am just getting into the coding/development side of MODx. Just two comments:

  • The statement [tt]if ($limit = 1)[/tt] should be [tt]if ($limit == 1)[/tt] I suspect.
  • You can replace the older [tt]$etomite[/tt] variable with the newer [tt]$modx[/tt] variable. They are defined to be the same thing.

andrew_bernard Mar 25, 2006, 11:56 PM https://forums.modx.com/thread/35648/snippet-authortime-stamp#dis-post-195488