By mariner702 on
Does anyone in here know how to disable users’ pictures from displaying in teaser view only on their blog pages? Because someone is on another person’s blog page, I think it’s redundant to show his picture on all the teasers because they’re all the same. The path is mysite/blogs/[username].
Comments
=-=
depending on your skillet you could insert some conditional php in node.tpl should work or perhaps you could create a custom blog-node.tpl.php from a copy of node.tpl.php and remove the user picture code. Then clear the theme registry.
Yes, I know it's a theme
Yes, I know it's a theme issue. I just don't know how to write the code. Is it possible to provide some support?
=-=
to use a tpl.php file one doesn't need to write code. simply copy node.tpl.php to node-blog.tpl.php and remove the user picture variable.
I don't have the code at my fingertips nor do I have the time to research the snippet for you. However, there are quite a few snippets in the documentation area that you can try work through if you don't want to go the way of a custom node-CONTENTTYPE.tpl.php file as explained in the themeing documentation.
I tried your method and it
I tried your method and it worked except that it disabled the picture from showing in the site’s blog, i.e., mysite/blog. I only want to disable the pictures from showing in teaser view of an individual’s blog, i.e., mysite/blogs/[username], because on that page, the pictures are all the same because they belong to individual users themselves. Is there a way I can get this done by modifying node-blog.tpl.php?
This is what I did.
I found the images to be alittle awkward in the blog teasers. So I decided to make them 'dissappear' with this bit of CSS code in my theme css:
.node-teaser .user-picture {
display:none;
}
And bam...no more images in the teasers. Of course they are technically still loading but they don't show anymore at least. And in the future If I ever wanted to re-enable the images I can just comment out this little bit of CSS code and there they are, already cached :)
Full view too? try this:
.view-mode-full .user-picture {
display:none;
}
These probably are not the most efficient way to do the job but its a simple hack if you just want to change it for your specific theme and not for all of the themes.
NOTE: I realize this is an old message but I quickly found myself here when I sniffed around for existing solutions.
More simple solution: check your theme settings
I had the same issue, and i think the simpliest way is to check your theme's settings under admin/appearance/settings/mythemename
If your theme is a drupal standard theme (means it should work with your custom sub-theme too) you will find a chackboxes list, then choose if enabling "User pictures in posts" and/or "User pictures in comments."
as explained also in documentation for D7: http://drupal.org/node/22271
This is an old post, and a dummy question ;-) but hope this will be useful to other newbie like me :)
Thank you, tiikeri, this is
Thank you, tiikeri, this is exactly what I was searching for! Works in MAYO theme pretty well. I don't think that I'm a "newbie" but in D7 there's a lot of features different from D6 so I'm a little confused sometimes.
Working with skeleton theme
This way can be implemented to skeleton theme , thx