I downloaded your module and started to create new users, all of which had usernodes generated, node/272, for example's sake.

As that user, I created a person page, node/275.

I included the snippet:

      foreach ($node->children as $childnode) {
        print node_view($childnode);
      }
   

to the node.tpl.php page per your instructions.

When I go to admin/content and in the list click on the usernode for that specific user, node/272, I see the person page node (node/275) displayed. This is what I expected.

Then I created a view, and used "Usernode: name" as a field, I choose this over "Node: author name", because I had hoped that the link for the usernode name would be to the usernode corresponding to that user. This was not the case.

Creating the view displayed the names of all the users on the site, whose names were linked to their user profile- for example, user/15.

I am confused, for I had hoped that using nodeprofile with views, I would be able to produce links to the usernode page, not the user profile.

It is unclear to me how to make the usernode available to users of my site except while it is in the content/admin list; unclear how to make the link on a user name refer to the usernode, not the user profile.

Please advise,

Richard

Comments

fago’s picture

Status: Active » Fixed

use the node title field of the usernode, it contains the username and links to the usernode. So one has both possibilites, linking to the user page using the user field name or to the usernode using the node title

perhaps I could provide different handler for the username field, so that it's more visible

schavester’s picture

Thank you for the direction. I am now able to get a field to display a user name which is linked to the proper place, the Usernode.

My question now turns to a permutation of this problem, getting the a photo/avatar of the user to link to the Usernode.

Thanks to your direction I can start to construct some views:

--------------------+-------------------------------
bobsmith | a photo of bobsmith
link=>usernode | link=>user profile
node/273 | user/13
--------------------+--------------------------------

but this above view is not what I want, the photo is linked to the user profile, not the Usernode.

i can also construct a view where i get:

----------------------+----------------------------------------
bobsmith | a photo of bobsmith
link=>usernode :-) | no link pulled from
node/273 | image field of CCK node type
| attached to Usernode
----------------------+------------------------------------------

this above view is also not what I want, the photo has no link at all.

what I want:

----------------------+----------------------------------------
bobsmith | a photo of bob
link=>usernode | link=>usernode
node/273 | node/273
----------------------+----------------------------------------

the photo with a link to the CCK node connected to Usernode would be acceptable too.

Please advise,

Richard

schavester’s picture

Thank you for the direction. I am now able to get a field to display a user name which is linked to the proper place, the Usernode.

My question now turns to a permutation of this problem, getting the a photo/avatar of the user to link to the Usernode.

Thanks to your direction I can start to construct some views:

field one: bobsmith(text) linked to usernode

field two: a photo of bobsmith linked to userprofile (user/13)

but this above view is not what I want, the photo is linked to the user profile, not the Usernode.

i can also construct a view where i get:

field one: bobsmith (text) linked to his usernode

field two: photo of bobsmith, pulled from the CCK node attached to his usernode, but with no link.

this above view is also not what I want, the photo has no link at all.

what I want:

field one: bobsmith (text of his name) linked to his usernode

field two: a photo of bobsmith linked to his usernode
---------

the photo with a link to the CCK node connected to Usernode would be acceptable too.

Please advise,

Richard

fago’s picture

you 're right, the link should be changed to point to the usernode or it shouldn't be a link at all. I'll look at it

fago’s picture

linking to the usernode instead to the user's page can be achieved sitewide by overriding the theme_username and theme_user_picture functions.

I've just committed two functions which are working with phptemplate themes. please have a look at the latest source.
note: for use with views you might need this patch, usernames work without patching.

Anonymous’s picture

Status: Fixed » Closed (fixed)