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
Hi, I want to theme a the links on the bottom of blog entries - so the when it says "read more", and "[user]'s blog" they are wrapped in a span or div with a class that puts in a bg-image and rollover info. I can't work out out where the $links array is constructed... is it deep inside Drupal? I tried tracing it back a few steps - but am worried that this might not be possible - because the further back you go the more generic the function seems to be - and determing whether something is a link in a node footer might not be possible. Thanks Josh
josh on wrote:
I want to theme a the links on the bottom of blog entries
In node.tpl.php <?php if ($links): ?> <div class="links"><?php print $links; ?></div> <?php endif; ?>
I can't work out out where the $links array is constructed
hook_link() That is the hook that Drupal modules use to construct the $node->links array.
On Fri, 03 Feb 2006 20:49:18 +0100, josh on <josh@theyrule.net> wrote:
I want to theme a the links on the bottom of blog entries - so the when it says "read more", and "[user]'s blog" they are wrapped in a span or div with a class that puts in a bg-image and rollover info.
I can't work out out where the $links array is constructed... is it deep inside Drupal? I tried tracing it back a few steps - but am worried that this might not be possible - because the further back you go the more generic the function seems to be - and determing whether something is a link in a node footer might not be possible.
$node->links is an array. You can foreach() over the array and output each link with a span or div. If you want to do a little more magic, perhaps you can use http://drupal.org/node/21538#comment-81773. -- http://pctips.ustilago.org
participants (3)
-
Heine Deelstra -
josh on -
Rowan Kerr