User Pictures In Posts
| Project: | Advanced Forum |
| Version: | 5.x-1.x-dev |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
My project utilizes user pictures, with maximum dimensions set at 250x250. When I enable "User Pictures In Posts" and "User Pictures In Comments" it allows the full size of the image to display, causing it to overflow and sit behind the text of the post. (See attached) I'm not sure if this is something that can be fixed in this module, or if it is functionality that is inherited from another portion of Drupal. Ideally, I would like to see the image scaled down proportionally to fit within an allowed space below the user name and post count.
Good work on this module; I have long desired a forum that is more like the traditional packages (phpBB, vbullettin, etc.)
I wish I could provide more assistance, but I am a designer, not a coder. I am using the module in an active project at work, so I will continue to monitor how it works and post issues as I can find them.
| Attachment | Size |
|---|---|
| advanced-forum-user-pictures-in-posts.jpg | 27.56 KB |

#1
Hmm... Not sure on this one. It's on the borderline of being out of scope. I think what would be better is to have the forum work with imagecache and use one of the presets. I think there's a lullabot tutorial on using imagecache with the user picture that may be worth looking at for this as well. I'm going to mark this postponed for now and look into it more when I get farther.
Michelle
#2
Yes, I think ImageCache is good way to get this functionality.
And, yes, Lullabot Nate Haug has a very good tutorial that should get you going: http://www.lullabot.com/articles/imagecache_example_user_profile_pictures
HTH,
Kevin
#3
I'm using Imagecache as kmilecam said.
I replaced the "$picture" line in the forum-thread.tpl.php to:
<?phpif($node->picture) {
print theme_imagecache('YOURPRESET', $node->picture);
} else if ($comment->picture) {
print theme('imagecache', 'YOURPRESET', $comment->picture);
}
?>
Replace YOURPRESET with the name of your ImageCache preset.
The code above displays 2 different ways to access the imagecache method. Don't know which one is more "drupal evangelistic" ;) I think it might be "theme('imagecache' ..."
Of course you could choose 2 different presets for topic and comments.
#4
theme('imagecache', 'YOURPRESET', $comment->picture); would be correct as all calls to theme_ functions should be run through theme(). Setting this to active as I could probably work this into the module itself as an alternate variable. I'll look at it a bit closer when I start actively coding on advforum again. Stuck in design mode right now.
Thanks,
Michelle
#5
This is fixed by CSS sizing in alpha 1. Imagecache is a nicer solution, though, so just marking this as postponed and will revist it at some point.
Michelle
#6
The ImageCache Profiles module is doing a fantastic job of this on my site.
#7
Looks perfect, thanks. I'll add that to the list in the docs.
Michelle
#8
Automatically closed -- issue fixed for two weeks with no activity.