<![CDATA[ LatestComments Snippet - MODX Community Forums]]> https://forums.modx.com/thread/?thread=43335 <![CDATA[Re: LatestComments Snippet]]> https://forums.modx.com/thread/43335/latestcomments-snippet?page=3#dis-post-406904
Shit – Uploads are not attached here.]]>
Jako Jan 11, 2012, 08:40 AM https://forums.modx.com/thread/43335/latestcomments-snippet?page=3#dis-post-406904
<![CDATA[Re: LatestComments Snippet]]> https://forums.modx.com/thread/43335/latestcomments-snippet?page=3#dis-post-402306 ]]> mrhaw Dec 03, 2011, 05:16 PM https://forums.modx.com/thread/43335/latestcomments-snippet?page=3#dis-post-402306 <![CDATA[Re: LatestComments Snippet]]> https://forums.modx.com/thread/43335/latestcomments-snippet?page=3#dis-post-249917
Installation: Upload the LatestComments folder to assets/snippets and insert the following line as snippet code:
return include(MODX_BASE_PATH.'assets/snippets/LatestComments/LatestComments.snippet.php');
]]>
Jako Apr 28, 2011, 02:58 AM https://forums.modx.com/thread/43335/latestcomments-snippet?page=3#dis-post-249917
<![CDATA[Re: LatestComments Snippet]]> https://forums.modx.com/thread/43335/latestcomments-snippet?page=3#dis-post-249916
[[LatestComments? &count=`3` &tplComment=`tpl-comment`]]


If I call it from inside chunk as:
[[LatestComments? &count=`3` &customFields=`name,website` &tplComment=`tpl-comment`]]

I get a error
PHP error debug
Error: mysql_query() [function.mysql-query]: Access denied for user ’apache’@’localhost’ (using password: NO)


If I call as :
[!LatestComments? &count=`3` &customFields=`name,website` &tplComment=`tpl-comment`!]

I get [[LatestComments? &count=`3` &customFields=`name,website` &tplComment=`tpl-comment`]] in my chunk.
Anyone have any suggestions?


]]>
smesple Apr 11, 2011, 02:28 AM https://forums.modx.com/thread/43335/latestcomments-snippet?page=3#dis-post-249916
<![CDATA[Re: LatestComments Snippet]]> https://forums.modx.com/thread/43335/latestcomments-snippet?page=2#dis-post-249915
Unrecognized characters in the format string will be printed as-is.
...
You can prevent a recognized character in the format string from being expanded by escaping it with a preceding backslash. If the character with a backslash is already a special sequence, you may need to also escape the backslash.
So something like this should work; the CSS in your little block should break the text on the whitespaces nicely:
'M j Y'

Or this might even work (add more escape backslashes if necessary);
'M<b\r />j<b\r />Y'

]]>
sottwell Nov 10, 2010, 10:27 PM https://forums.modx.com/thread/43335/latestcomments-snippet?page=2#dis-post-249915
<![CDATA[Re: LatestComments Snippet]]> https://forums.modx.com/thread/43335/latestcomments-snippet?page=2#dis-post-249914 .css to the date. Now I have 2010-11-10 but I want something like this:


Now I have it like this:
<div class="date">[+createdon+]</div>
<div class="poster"><a href="[+jcf_website+]">[+jcf_name+]</a> on</div>
<div class="link"><h5><a href="[~[+doc_id+]~]">[+doc_pagetitle+]</a></h5></div>


and this is the output:

Nov-10-2010
Default admin account on
Post 3


Actually my problem is how to add a
or something like that to Nov-10-2010

$dateFormat = isset($dateFormat) && $dateFormat ? $dateFormat : 'Y-m-d';



Thanks. grin]]>
labanino Nov 10, 2010, 10:12 PM https://forums.modx.com/thread/43335/latestcomments-snippet?page=2#dis-post-249914
<![CDATA[Re: LatestComments Snippet]]> https://forums.modx.com/thread/43335/latestcomments-snippet?page=2#dis-post-249913 ]]> labanino Nov 08, 2010, 07:15 PM https://forums.modx.com/thread/43335/latestcomments-snippet?page=2#dis-post-249913 <![CDATA[Re: LatestComments Snippet]]> https://forums.modx.com/thread/43335/latestcomments-snippet?page=2#dis-post-249912
[[LatestComments? ... &trunc=`number-of-characters` ...]]
]]>
Alik Nov 08, 2010, 06:46 PM https://forums.modx.com/thread/43335/latestcomments-snippet?page=2#dis-post-249912
<![CDATA[Re: LatestComments Snippet]]> https://forums.modx.com/thread/43335/latestcomments-snippet?page=2#dis-post-249911
$trunc = isset($trunc) && $trunc ? $trunc : 0;

and change $trunc : number-of-characters;

Thank you very much! grin]]>
labanino Nov 08, 2010, 06:24 PM https://forums.modx.com/thread/43335/latestcomments-snippet?page=2#dis-post-249911
<![CDATA[Re: LatestComments Snippet]]> https://forums.modx.com/thread/43335/latestcomments-snippet?page=2#dis-post-249910 Alik Nov 07, 2010, 11:53 PM https://forums.modx.com/thread/43335/latestcomments-snippet?page=2#dis-post-249910