<DIV><FONT face=Arial>Hi Steve,</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Thanks for your reply. I tired to change it to the following:</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial><BR></FONT></DIV><FONT size=2>
<P><FONT face=Arial>function getUserDisplayName($number)</FONT></P>
<P><FONT face=Arial>{</FONT></P>
<P><FONT face=Arial>$fieldId = 19; </FONT></P>
<P><FONT face=Arial>$result = db_query("SELECT p.value FROM {profile_values} p WHERE p.fid = $fieldId AND p.uid = $number");</FONT></P>
<P><FONT face=Arial>while ($nameQuery = db_fetch_object($result)) {</FONT></P>
<P><FONT face=Arial>$displayName = $nameQuery;</FONT></P>
<P><FONT face=Arial>}</FONT></P>
<P><FONT face=Arial>return $displayName;</FONT></P>
<P><FONT face=Arial></FONT></P>
<P><FONT face=Arial>} </FONT></P>
<P><FONT face=Arial>/**</FONT></P>
<P><FONT face=Arial>* Implementation of hook_view().</FONT></P>
<P><FONT face=Arial>*/</FONT></P>
<P><FONT face=Arial>function blog_view($node, $teaser = FALSE, $page = FALSE) {</FONT></P>
<P><FONT face=Arial>if ($page) {</FONT></P>
<P><FONT face=Arial>// Breadcrumb navigation</FONT></P>
<P><FONT face=Arial>$breadcrumb[] = array('path' => 'blog', 'title' => t('Blogs'));</FONT></P>
<P><FONT face=Arial>$number = $node->uid;</FONT></P>
<P><FONT face=Arial>$breadcrumb[] = array('path' => 'blog/'. $node->uid, 'title' => t(getUserDisplayName($number) . "'s blog");</FONT></P>
<P><FONT face=Arial>$breadcrumb[] = array('path' => 'node/'. $node->nid);</FONT></P>
<P><FONT face=Arial>menu_set_location($breadcrumb);</FONT></P>
<P><FONT face=Arial>}</FONT></P>
<P><FONT face=Arial>return node_prepare($node, $teaser);</FONT></P>
<P><FONT face=Arial>}</FONT></P>
<DIV></FONT><FONT face=Arial>But it still isn't working.</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>What am I doing wrong?</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Sarah</FONT><BR>----- Original Message -----<BR>From: Steve Edwards <killshot91@comcast.net><BR>Date: Tuesday, December 11, 2007 12:35 pm<BR>Subject: Re: [support] changing the display of the breadcrumb trail in blog module<BR>To: support@drupal.org<BR><BR>> Yes, you can use hook_view() (the code from the blog module is <BR>> an implementation of hook_view).<BR>> <BR>> http://api.drupal.org/api/function/hook_view/5<BR>> <BR>> You just create the breadcrumb array the way it does below, <BR>> replacing the appropriate element with the custom field <BR>> data. I'm not <BR>> sure if custom fields become part of the $user object, so you <BR>> might have to query the database to get the field you <BR>> want. For <BR>> instance, if you were using the Profile module, you would need <BR>> to query profile_fields and profile_values to get what you want <BR>> and <BR>> then replace the user name with the custom field in the <BR>> $breadcrumb array.<BR>> <BR>> Steve<BR>> <BR>> <BR>> Sarah.Vardy@student.griffith.edu.au wrote:<BR>> > Hi,<BR>> > <BR>> > I was wondering if it's possible to alter this function in the <BR>> blog <BR>> > module, so that it displays a custom field from the user's <BR>> profile <BR>> > instead of the user name of the user:<BR>> > <BR>> > |<?php<BR>> > function blog_view($node, $teaser = FALSE, $page = FALSE) {<BR>> > if ($page) {<BR>> > // Breadcrumb navigation<BR>> > $breadcrumb[] = array('path' => <BR>> 'blog', 'title' => t('Blogs'));<BR>> > $breadcrumb[] = array('path' => <BR>> 'blog/'. $node->uid, 'title' => <BR>> > t("@name's blog", array('@name' => $node->profile_displayName)));<BR>> > $breadcrumb[] = array('path' => <BR>> 'node/'. $node->nid);<BR>> > menu_set_location($breadcrumb);<BR>> > }<BR>> > return node_prepare($node, $teaser);<BR>> > }<BR>> > ?>|<BR>> > <BR>> > Any help would be great!<BR>> > <BR>> > Sarah<BR>> > <BR>> -- <BR>> [ Drupal support list | http://lists.drupal.org/ ]<BR>> </DIV>