- Posts: 16
COMMUNITY FORUM
K2 author avatar in category view
- Adam O.
- Topic Author
- Offline
- New Member
Less
More
10 years 7 months ago #125018
by Adam O.
K2 author avatar in category view was created by Adam O.
Hi there!
I've got simple question - how to load avatar author of article in category view?
In item view, code is very simple:
<img style="height:16px !important;" src="<?php echo $this->item->author->avatar; ?>" />
But in category view, I can't load the same avatar...
I've tried something like this:
<img src="<?php echo K2HelperUtilities::getAvatar($this->item->author->profile->avatar); ?>"/>
and many other paths but doesn't work :(
please... help.. :-)
best regards!
Adam
I've got simple question - how to load avatar author of article in category view?
In item view, code is very simple:
<img style="height:16px !important;" src="<?php echo $this->item->author->avatar; ?>" />
But in category view, I can't load the same avatar...
I've tried something like this:
<img src="<?php echo K2HelperUtilities::getAvatar($this->item->author->profile->avatar); ?>"/>
and many other paths but doesn't work :(
please... help.. :-)
best regards!
Adam
Please Log in or Create an account to join the conversation.
- YannisDr
- Offline
- Junior Member
Less
More
- Posts: 28
10 years 7 months ago - 10 years 7 months ago #125019
by YannisDr
Replied by YannisDr on topic Re: K2 author avatar in category view
Have you tried the following?
Go to Category tab (in K2) > Category you are interested for (or any category that inherits its options to other categories) > When you are in "Edit Category" window, look on the right for the "Item View options in category listings" > Author --> Turn it to "Show".
Hope this helps.
ps. Of course you must have loaded the avatars for each author from inside the K2 User's system.
Go to Category tab (in K2) > Category you are interested for (or any category that inherits its options to other categories) > When you are in "Edit Category" window, look on the right for the "Item View options in category listings" > Author --> Turn it to "Show".
Hope this helps.
ps. Of course you must have loaded the avatars for each author from inside the K2 User's system.
Please Log in or Create an account to join the conversation.
- YannisDr
- Offline
- Junior Member
Less
More
- Posts: 28
10 years 7 months ago #125020
by YannisDr
Replied by YannisDr on topic Re: K2 author avatar in category view
Warning: Spoiler!
Just writing this follow up as I forgot to tick for "Check this box to be notified of replies to this topic".
Generally speaking, this system sucks a bit. Should have been turned by default or at least be able to edit a previous reply for making this possible. Please any moderator see it, forward this for consideration.
Generally speaking, this system sucks a bit. Should have been turned by default or at least be able to edit a previous reply for making this possible. Please any moderator see it, forward this for consideration.
Please Log in or Create an account to join the conversation.
- Adam O.
- Topic Author
- Offline
- New Member
Less
More
- Posts: 16
10 years 7 months ago #125021
by Adam O.
Replied by Adam O. on topic Re: K2 author avatar in category view
I know about it, but it shows me only name of author :-)
I need to show name and avatar of this user....
any idea? :-)
regards!
Adam
I need to show name and avatar of this user....
any idea? :-)
regards!
Adam
Please Log in or Create an account to join the conversation.
- Kannan Naidu Venugopal
- Offline
- Platinum Member
- Aham Brahmasmi
10 years 7 months ago #125022
by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: K2 author avatar in category view
You can accomplish this by using this code, place it where you want to appear, add css class and style it
K2 Rocks \m/
Please Log in or Create an account to join the conversation.
- Adam O.
- Topic Author
- Offline
- New Member
Less
More
- Posts: 16
10 years 7 months ago #125023
by Adam O.
Replied by Adam O. on topic Re: K2 author avatar in category view
so looks more than simply ;-)
many thanks to you!!
best regards
Adam
many thanks to you!!
best regards
Adam
Please Log in or Create an account to join the conversation.
- Kannan Naidu Venugopal
- Offline
- Platinum Member
- Aham Brahmasmi
10 years 7 months ago #125024
by Kannan Naidu Venugopal
K2 Rocks \m/
Replied by Kannan Naidu Venugopal on topic Re: K2 author avatar in category view
You're welcome :)
K2 Rocks \m/
Please Log in or Create an account to join the conversation.