how to display view block in node page I have a block in view that is displaying the user details, i want to display that block in a nodes created by the respective users.

i am successfully using this block in user page now i want it on node page.

please help me.

For another block which is also coming from view is worked fine with this code
Show block on specific pages:

&lt;?php

//Read URL
$path=$_GET['q'];

//If URL is node page

if ( strpos($path,'node')===0){
//Parse URL to get nid
$links=explode("/",$_GET['q']);
$nid=$links[1];

//Load node

$node=node_load($nid);

//Display block only if node is of certain content type
if($node-&gt;type=='user_art'){
return TRUE;
}
}

return FALSE;
?&gt;


Thanks
It is better to check the arguments from arg() function, this way:

&lt;?php
// PHP VISIBILITY CODE:
// If URL is node page

if (arg(0) == 'node' &amp;&amp; is_numeric(arg(1))){
  $nid = arg(1);

  // Load node:
  $node=node_load($nid);

  // Display block only if node is of certain content type
  if ($node-&gt;type=='user_art') {
    return TRUE;
  }
}

return FALSE;
?&gt;


Maybe the problem is with the views argument to get $node->uid. Try this:

More info: https://groups.drupal.org/node/129979#comment-751473

1 - Create a new Block View to view Users (not Content)

2 - Filter Criteria should say User: Active (Yes)

3 - There is a default sort Criteria item. Remove it since it doesn't matter.

4 - Add a Relationship: Choose "User: Content authored"

5 - Add a Contextual Filter: Chose "Content: Nid"

6 - In the configuration options for the newly added Content: Nid, choose these options:
WHEN THE FILTER VALUE IS NOT AVAILABLE:
Provide default value
In the Select box, choose Content ID From URL.

WHEN THE FILTER VALUE IS AVAILABLE OR A DEFAULT IS PROVIDED
Specify validation criteria
Validator select box: Content
Content Types: choose the content types you want the view to work with.
Filter Value Format: Node ID
Action to take if the filter value does not validate: Hide View

7 - Save the View.

8 - Go to Structure -&gt; Blocks and configure the block to show on the types of content you want it to show on and position it wherever you want it to appear.

9 - Done.