I want to achieve the same thing with views, ? anyone know how to do so ?

Thanks

Comments

pfaocle’s picture

Create your view called, say, 'user_content_view' with filters for node type, published etc and sorting. Then add the "User: UID is Author" argument.

Then you can call (Drupal 5):

  theme('view', $view_name, $limit = NULL, $use_pager = NULL, $type = 'embed', $view_args = array());

wherever you want. So, for example on a custom user profile where the user who's profile is being shown is available as $account, you could call:

  print theme('view', 'user_content_view', NULL, NULL, 'embed', array($account->uid));

and optionally do some checking on the logged in user's role before you print it.

pomliane’s picture

Status: Active » Closed (won't fix)

This version of Usercontent is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.