Add link to usernode on profile page

Murz - March 7, 2008 - 09:32
Project:Usernode
Version:HEAD
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

I don't use Views module and want to edit usernode pages for users. But I can't find link to usernode for other users.
I write an easy patch that add link to usernode for all users in function usernode_user($op, &$edit, &$user, $category = NULL):

<?php
   
case 'view':
      if (
$user->uid && ($user->uid == $account->uid || user_access('administer nodes'))) {
       
$items['usernode'] = array(
         
'value' => l(t('View your usernode.'), 'node/'. $user->node_id),
         
'class' => 'member',
        );
        return array(
t('Usernode') => $items);
      }
?>

Maybe better to do it in another place, but this enough for me...

 
 

Drupal is a registered trademark of Dries Buytaert.