How can I display the author's informatio as a block in one side?

Shotokax - November 13, 2008 - 13:03

Hello everybody. This is my first post and I hope I have success. Thank you very much to read it.

As I say in the title, I need to display the data of the author of a story in a side as a block (photo included).

I have installed the module Nodeauthor, but it only displays the information on the bottom of the story. I have been trying to do it with the module Views but I couldn't because I can create a static block with the data of an user but not with the user of the CURRENT story. I think I should configure the field "relationships" but I don't know how.

Is there any module to do it automatically? If not, could you help me to do it with Views, please?

Thank you very much again.

Drupal-core has a block

betz - November 13, 2008 - 14:01

Drupal-core has a block called 'Author information'.
Just go to the blocks administration and enable that block where you want it to appear.

I don't find either a module

Shotokax - November 14, 2008 - 11:18

I don't find either a module in Drupal core or a block called "Author information".

I have also looked for a module in this website called like that but there isn't.

I have tried what I want

Shotokax - November 14, 2008 - 14:10

I have tried what I want with the module NodeAuthor, but that module only let you display the information on the bottom of the article. Do you know any similar module to display it on the right side?

Thank you very much again.

have you tried?

arhak - November 14, 2008 - 14:27

have you tried about_this_node module?
it seems to feet your needs, maybe currently doesn't support author's picture but you could request that feature or add it your self

OTOH, it can be done with views using an argument for the block display, just block displays doesn't get arguments that easy, so you would have to do it through PHP snippet, I think there are some sample snippets like that in this site, do some search

Thanks for your help. I have

Shotokax - November 19, 2008 - 11:17

Thanks for your help. I have not worked the last days. Sorry for not answering before.

I need this function for a news website. So, I need to display this information smartly. With the module you suggest, it's displayed technical information, even the node ID. I need to display the information of the author.

You can do this with views.

WorldFallz - November 19, 2008 - 14:04

You can do this with views2. Create a profile block view of the author information you wish to display, add an argument for "User: uid" and set the default argument to the following php code:

if (arg(0) == 'node' && is_numeric(arg(1))) {
  $node = node_load(arg(1));
  return $node->uid;
}
else {
  return FALSE;
}

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

Sorry to intrude on your

gbrussel - November 19, 2008 - 15:54

Sorry to intrude on your topic, I was just hoping for a little bit of clarification. I'm trying to control the block's visibility (I set up the block as WorldFallz instructed) with a PHP return statement to hide it on nodes where the author has a specific user id. I can't seem to get it to work, however.

<?php
if (arg(0) == 'node' && is_numeric(arg(1)) && (!arg(2))) {
 
$node = node_load(arg(1));
 
$userid = $node->uid;
  if (
$userid == '1' || $userid == '7') {
   
$check = FALSE;
  }
  else {
   
$check = TRUE;
  }
}
return
$check;
?>

It seems to be working fine

WorldFallz - November 19, 2008 - 16:10

It seems to be working fine on my dev site. How is it not working for you?

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

Er, I jumped the gun here.

gbrussel - November 19, 2008 - 16:22

Er, I jumped the gun here. I was using the wrong user ID values. *sheepish look*

lol, no worries. === "Give a

WorldFallz - November 19, 2008 - 19:46

lol, no worries.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz

Thanks!!!!! Perfect work in

vidals - July 27, 2009 - 22:50

Thanks!!!!!

Perfect work in my site, i would like understand how works arguments.

any resources for study?

_

WorldFallz - July 27, 2009 - 22:56

The best place for views documentation is the advanced help provided by views itself. Also, see the videos at: http://drupal.org/node/248766. Another screencast: http://gotdrupal.com/videos/drupal-views-arguments.

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

_

WorldFallz - July 27, 2009 - 22:52

To followup on my own comment, this is no longer necessary with views2- you can select "provide default argument", "User ID from URL", then check the "Also look for a node and use the node author " option

_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.

In response to the original

stGeorge - November 10, 2009 - 05:15

In response to the original question, I think 'Author Pane; is what you are looking for

http://drupal.org/project/author_pane

cheers
stGeorge

 
 

Drupal is a registered trademark of Dries Buytaert.