[themes] formatting text

josh on josh at theyrule.net
Fri Feb 3 08:10:23 UTC 2006


I fixed the formatting problem... but I suspect it is a bad hack :(


function _myfunctions_latest_blog_entries($listlength, $userid) {
 $sql = "SELECT * FROM {node} n, users WHERE n.type = 'blog' AND n.uid = $userid AND n.status = 1
AND n.uid = users.uid ORDER BY n.created DESC LIMIT $listlength";
 $result = db_query($sql);
 while ($anode = db_fetch_object($result)) {
  $anode->body = _filter_autop($anode->body);
  $output .= theme('node', $anode, $teaser = FALSE, $page = FALSE);
 }
 return $output;
}


It wasn't calling the filter.module - so I forced it to [ $anode->body =
_filter_autop($anode->body); ] before it went to theme it... is this wrong?

Josh



More information about the themes mailing list