I want user profile pictures enabled on nodes like blogs, forums and content but not on weblinks for instance.

How do you disable user pictures per node ?

Comments

sami_k’s picture

$node->type i think knows what type of node it is... write some php code in your template that detects the node type and displays pictures on only certain ones. other than that, make special templates for certain node types that have pictures.... i don't believe that there is a checkbox to disable them via node type... perhaps that should be an option...?
--
showcase | blog | rob's book

prajakta’s picture

I m also having the same problem, I also want help how ro ADD Pictures on each page as welll as delete unwanted pictures

desm0n’s picture

yikes i was hoping the solution would be a lot easier than that.

Being new to drupal i assumed it was a setting i had missed somewhere and i'm not at all confident yet editing tpl files or adding php code as i have no idea where to even begin with something like that :(

So i'm faced now with either disabling members pictures for nodes or not using the weblinks module. Strange choices to make for something that i would assume was so bascially simpol i'm surprised its not in the core.

drubeedoo’s picture

desm0n, it's not as bad as you think. Take a look here:

http://drupal.org/node/45944

I believe the appropriate file you will need to edit is node.tpl.php, but use the above link as a guide.

In your node.tpl.php you might see something like this:

    <?php if ($picture) {
      print $picture;
    }?>

You can change it to:

    <?php if ($picture && in_array($node->type, array('blog', 'forum', 'story'))) {
      print $picture;
    }?>

One thing to note, make sure you make a copy of a theme, and make it unique to your site. Make changes in your unique theme, otherwise you will be overwriting any changes you made when a new version of Drupal is released.

Good luck!

desm0n’s picture

That worked like a charm and has got me looking at least in the template files now :)

Many thanks for setting me on another journey of discovery with drupal.

Also very handy tip regards backup of the theme and making it your own. I've already lost my CSS changes once for that very reason :)

Many thanks again ..

drubeedoo’s picture

You're welcome... I'm still learning every day. I love this project and am grateful to the super folks that have helped me along the way.

desm0n’s picture

I have to admit the learning curve has been greater thus far than any other CMS i've used but it has a "linux" open learning feel about the entire project which i am enjoying.

Its frustrating at times but also extremely rewarding when things work and work well :)

kamran-1’s picture

I found 4 files of name "node.tpl.php" but in these files I am couldn't able to find:
<?
php if ($picture)
{
print $picture;
}
?>

I would like to remove the user pictures from the pages but not from the forum, bolgs, stories and other stuf.

If any one help I will be very greatful

xano’s picture

I want something similar: I want user pictures available in every comment, but in the forum in firsts posts (which actually are nodes) as well.

Anyone got an idea how to do it this specifically?

Zen’s picture

You might want to have a look at: http://drupal.org/node/60959

-K