1
Hi there,
I'm using RM soft's MyFolder for my portofolio.
It has a build in field for a comment from the Client about the work.
These comments can be displayed in a block but it isn't random, it takes the last x comments.
Is there an easy way to get it to pull a random quote instead of the last ones?
I think this is the php code from the block:
function rmmf_bk_comments($options){
$db =& Database::getInstance();
$myts =& MyTextSanitizer::getInstance();
$result = $db->query("SELECT * FROM ".$db->prefix("rmmf_works")." ORDER BY id_w DESC LIMIT 0,$options[0]");
$block = array();
while ($row = $db->fetchArray($result)){
$rtn = array();
$rtn['id'] = $row['id_w'];
$rtn['titulo'] = $row['titulo'];
$rtn['texto'] = $myts->makeTareaData4Show($row['comentario']);
$rtn['cliente'] = $row['cliente'];
$block['works'][] = $rtn;
}
return $block;
}
function rmmf_bk_comments_edit($options){
$form = _BK_RMMF_NUMCOMMS."
$options[0]' />";
return $form;
}
And this is the block template:
<{foreach item=work from=$block.works}>
<div style="font-size: 10px; text-align: right;">
<span style="font-style: italic;">"<{$work.texto}>"span><br />
<a href="<{$xoops_url}>/modules/rmmf/view.php?id=<{$work.id}>"><{$work.cliente}>a>
div><br />
<{/foreach}>
I think it's an easy one if your good with php/mysql, which I'm not