1 motoman Oct 23, 2010 22:52
3 motoman Oct 25, 2010 00:16
That's exactly what I had in mind...just put the poster's avatar right by their post (or comment).
I took a look through the .css for Mystique...
...let's pretend I have no idea what I'm doing. Which bits would I need to put into the .css I'm already using to get avatars on posts and comments/feeback?
I'm using the evocamp skin, which I've set about to customizing for my purpose...pretty much by trial and error. It's not "live" yet, so the content in there is just for fun - but it can be seen at:
4 motoman Nov 02, 2010 18:58
...can anyone direct me on how to adjust the code for the evocamp skin to do the avatars as mystique does? I've fiddled with it and can't seem to get it to work...
5 sam2kb Nov 02, 2010 19:57
Mystique skin uses its own avatars script, but you can add the following code to display post author avatar
/skins/evocamp/_item_block.inc.php
$Item->author( array(
'link_text' => 'avatar',
'link_rel' => 'nofollow',
'thumb_size' => 'crop-32x32',
'thumb_class' => 'leftmargin',
) );
6 motoman Nov 02, 2010 20:08
Awesome! I added the extra bits there into the array and it works great. Thanks!
7 motoman Nov 02, 2010 20:32
...or I thought it did...
This is what that array looks like now:
$Item->author( array(
'before' => T_('By').' ',
'after' => ' ',
'link_text' => 'avatar',
'link_rel' => 'nofollow',
'thumb_size' => 'crop-60x60',
'thumb_class' => 'leftmargin',
) );
The first two bits, the before and after, were already there. They seem to inssert the "By [author name]" with a link to the author's profile. So that before I made this change, the author's name was linked on each post as a link.
Now, though, the avatar shows up and provides a link to the author's profile...but the author name does not show up after "By" - it's just a blank space. I tried moving the new bits around some, but either wind up with something that doesn't render the main screen at all, or with the same effect.
Any ideas?
8 mel_t Dec 24, 2010 21:02
Hi,
I want the opposite : keeping the name of the author (in addition to the link on avatar). Whatever I try, the author's name disappear. Do someone know why?
<?php
$Item->author( array(
'before' => '<li class="author">'.T_( 'By').' ',
'after' => '</li>',
'link_text' => 'avatar',
'link_rel' => 'nofollow',
'thumb_size' => 'crop-32x32',
'thumb_class' => 'leftmargin',
) );
?>
EDIT: Reading Docs section, its seems impossible to get both. I solved my problem, just by adding a second block $Item->author and it works ok to me.
There's an avatars widget in b2evo 4, but you don't really need it for what you wrote above.
See how evopress skin displays post author's avatar and copy the code into your skin. You can also install a skin that supports avatars http://skins.b2evolution.net/two.php/2010/07/14/mystique ;)