Anyone can click on the user name in any content they created ie: forums, blogs, images etc. This takes them to that persons user page (account page). This is fine its easy every thing is on that page including the content profile, (or at least the link when someone setups up content profile for a link or teaser)

The issue is going the other way. Going from the content profile page ex: www.christianzest.com/content/mike to the users account page ex: www.christianzest.com/users/mike

The account page has info on it that the content profile doesnt like user relations, send message, users blog etc. Either the items that I mentioned should be brought into content profile or their needs to be a tab or large link from the users profile page to their account page.

How would I accomplish this, (I think its pretty important) Especially since you can't click on tags and such that are content profile based and go directly to the account page where you can do friend requests and such.

The whole idea is great for profiles as content and opens up alot of doors but this is pretty key.

Comments

As If’s picture

Here's a way to pull info from the user account into the content_profile. Do this in node-profile.tpl.php:

// THESE LINES PULL THE ACCOUNT OWNER'S STUFF INTO AN ARRAY:
$owneruid = $node->uid;
$owner = user_load($owneruid);
$ownerstuff = user_build_content($owner);
// AND THESE LINES DUMP IT OUT SO YOU CAN SEE IT:
echo "<textarea cols=100 rows=30>";
echo htmlentities(print_r($ownerstuff,1));
echo '</textarea><br>';
kevster111’s picture

Ill give a shot, so basically I could show user profiles and not have to show the user accounts.

As If’s picture

Correct. Of course you'll have to give people a way to get to the profile page.

Meanwhile, to manage that array of data created by the previous example, you'll need to loop through it. That will be something like this (the actual code depends on the modules you have installed. Below I will handle Favorites, Friendlist, and Activity):

foreach ($ownerstuff as $category => $vars) {
  switch($category) {
    case 'faveliste' :
      foreach ($vars as $key => $val) {
        if($key == 'Blog Entry') {
          $faveblock .= '<b>Favorite Blog Entries: </b><ul>';
          $faveblock .= $val['#value'];
          $faveblock .= '</ul>';
        }
      }
      break;
    case 'friendlist_ui' :
      foreach ($vars as $key => $val) {
        if($key == '#title' AND $val) { $friendblock .= '<b>' . $val . ': </b><ul>'; }
        if($key == '#value') {
          $friendblock .= $val;
          $friendblock .= '</ul>';
        }
      }
      break;
    case 'activity' :
      $activityblock .= '<b>Recent Activity: </b>';
      $activityblock .= '<ul>';
      $activityblock .= $vars[0]['#value'];
      $activityblock .= '</ul>';
      break;
  }
}
// AND NOW PRINT IT OUT...
echo $faveblock;
echo $friendblock;
echo $activityblock;