<![CDATA[ can Jot display one random comment? - MODX Community Forums]]> https://forums.modx.com/thread/?thread=43100 <![CDATA[Re: can Jot display one random comment?]]> https://forums.modx.com/thread/43100/can-jot-display-one-random-comment#dis-post-466647 ]]> mrhaw May 18, 2013, 08:32 AM https://forums.modx.com/thread/43100/can-jot-display-one-random-comment#dis-post-466647 <![CDATA[Re: can Jot display one random comment?]]> https://forums.modx.com/thread/43100/can-jot-display-one-random-comment#dis-post-392264
[!Jot? &tplForm=`myTmp` &docid=`8` &sortby=`createdon:a` &numdir=`0` &placeholders=`1` &output=`0` &pagination=`2`!]

[+jot.html.comments+]]]>
whitejapan Sep 03, 2011, 01:59 PM https://forums.modx.com/thread/43100/can-jot-display-one-random-comment#dis-post-392264
<![CDATA[Re: can Jot display one random comment?]]> https://forums.modx.com/thread/43100/can-jot-display-one-random-comment#dis-post-392248 Thank you very much.]]> whitejapan Sep 03, 2011, 12:06 PM https://forums.modx.com/thread/43100/can-jot-display-one-random-comment#dis-post-392248 <![CDATA[Re: can Jot display one random comment?]]> https://forums.modx.com/thread/43100/can-jot-display-one-random-comment#dis-post-248966
anyways ...

<?php
$rsContent = $modx->db->select("id,content", "modx_jot_content", "published=1", "RAND()", "1");
$arr = mysql_fetch_array($rsContent);
$id = $arr['id'];
$content = $arr['content'];

$rsFields = $modx->db->select("content", "modx_jot_fields", "label='name' AND id=".$id);
$arr = mysql_fetch_array($rsFields);
$name = $arr['content'];

$rsFields = $modx->db->select("content", "modx_jot_fields", "label='location' AND id=".$id);
$arr = mysql_fetch_array($rsFields);
$location = $arr['content'];

$strReturn = "<div id='TestimonialHighlightCopy'>".$content."</div><div id='TestimonialHighlightCredit'>- ".$name.", ".$location."</div>";

return $strReturn;
?>
]]>
highlander Jul 09, 2007, 04:42 AM https://forums.modx.com/thread/43100/can-jot-display-one-random-comment#dis-post-248966
<![CDATA[can Jot display one random comment?]]> https://forums.modx.com/thread/43100/can-jot-display-one-random-comment#dis-post-248965
i’m using Jot (1.1.2) to gather customer testimonials, which is working perfectly with moderation, notification, etc. however i need to be able to show a random "comment" on the homepage. is it possible to have Jot display one random comment?

many thanks smiley
]]>
highlander Jun 27, 2007, 04:17 AM https://forums.modx.com/thread/43100/can-jot-display-one-random-comment#dis-post-248965